server
server copied to clipboard
[PM-5518] Sql-backed IDistributedCache
Type of change
- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
Objective
Self-hosted customers and dev environments need a Distributed Cache store. Use SQL, with the ofifical Microsoft library for SQL Server and a custom implementation for EF. EF implementation copies the official SQL Server one pretty closely.
Code changes
See inline self-review comments.
Before you submit
- Please check for formatting errors (
dotnet format --verify-no-changes) (required) - If making database changes - make sure you also update Entity Framework queries and/or migrations
- Please add unit tests where it makes sense to do so (encouraged but not required)
- If this change requires a documentation update - notify the documentation team
- If this change has particular deployment requirements - notify the DevOps team
Codecov Report
Attention: Patch coverage is 14.02214% with 233 lines in your changes missing coverage. Please review.
Project coverage is 41.16%. Comparing base (
e8c5d73) to head (59529e5). Report is 5 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3791 +/- ##
==========================================
+ Coverage 40.90% 41.16% +0.25%
==========================================
Files 1260 1265 +5
Lines 60106 60357 +251
Branches 5489 5524 +35
==========================================
+ Hits 24589 24845 +256
+ Misses 34382 34367 -15
- Partials 1135 1145 +10
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Checkmarx One – Scan Summary & Details – 32e39ecc-b288-44ea-83a3-a95502866ec1
New Issues
| Severity | Issue | Source File / Package | Checkmarx Insight |
|---|---|---|---|
![]() |
Privacy_Violation | /src/Core/Services/Implementations/UserService.cs: 336 | Attack Vector |
Fixed Issues
| Severity | Issue | Source File / Package |
|---|---|---|
![]() |
CSRF | /src/Api/Auth/Controllers/TwoFactorController.cs: 411 |
![]() |
CSRF | /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 218 |
![]() |
CSRF | /src/Api/Auth/Controllers/AccountsController.cs: 579 |
![]() |
Log_Forging | /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 456 |
![]() |
Log_Forging | /src/Identity/Controllers/AccountsController.cs: 107 |
![]() |
Log_Forging | /src/Identity/Controllers/AccountsController.cs: 107 |
![]() |
Log_Forging | /src/Identity/Controllers/AccountsController.cs: 107 |
![]() |
Log_Forging | /src/Identity/Controllers/AccountsController.cs: 107 |
@justindbaur @rkac-bw this is ready for review again!
@justindbaur awesome tests! @rkac-bw can you give a final review stamp?

