Arch/qa env seeding tweaks#7430
Conversation
|
New Issues (2)Checkmarx found the following issues in this Pull Request
|
7af0b81 to
c19faae
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7430 +/- ##
==========================================
+ Coverage 58.53% 58.98% +0.45%
==========================================
Files 2069 2076 +7
Lines 91306 91466 +160
Branches 8128 8130 +2
==========================================
+ Hits 53443 53952 +509
+ Misses 35954 35590 -364
- Partials 1909 1924 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
kdenney
left a comment
There was a problem hiding this comment.
Logic looks good! Only thing I'd ask is if you could add some unit tests to cover the new changes? We've had issues in the past with changes to the licensing logic causing regressions so I like to make sure we cover that area pretty thoroughly. Thanks!
kdenney
left a comment
There was a problem hiding this comment.
Approving after our convo in slack. Tests are complicated without giving the licenses to CI. Ideally we refactor this in the future into two services but not needed for this fix.
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR adjusts licensing, PlayId tracking, and data protection services to support QA automation testing in non-production environments. The licensing service now separates creation and verification certificates, allowing self-hosted non-production instances to verify both production- and dev-signed licenses. PlayId services consistently gate on All findings from the previous review round have been addressed in fixup commits, including the build failure from mismatched constant names, the inconsistent Code Review DetailsNo new findings. All previously identified issues have been resolved. |
kdenney
left a comment
There was a problem hiding this comment.
After looking at this again, I have a couple questions.
This reverts the potential new environment change identified
this way we don't need to run distinct
| || _verificationCertificates.Any(c => !allowedThumbprints.Contains(c.Thumbprint))) | ||
| { | ||
| throw new Exception("Invalid license verifying certificate."); | ||
| } |
Co-authored-by: Kyle Denney <4227399+kdenney@users.noreply.github.com>
| "B34876439FCDA2846505B2EFBBA6C4A951313EBE"; | ||
|
|
||
| // Load license creation cert | ||
| var creationCertThumbprint = environment.IsDevelopment() ? developmentCertThumbprint : productionCertThumbprint; |
There was a problem hiding this comment.
❌ CRITICAL: Build failure -- constant references do not match renamed declarations
Details and fix
Commit 4028107 renamed the constants to _productionCertThumbprint and _developmentCertThumbprint (with underscore prefix), but the references on lines 71, 118, and 119 still use the old names without the prefix. This will fail to compile.
| var creationCertThumbprint = environment.IsDevelopment() ? developmentCertThumbprint : productionCertThumbprint; | |
| var creationCertThumbprint = environment.IsDevelopment() ? _developmentCertThumbprint : _productionCertThumbprint; |
The same fix is needed on lines 118-119:
CoreHelpers.CleanCertificateThumbprint(_productionCertThumbprint),
CoreHelpers.CleanCertificateThumbprint(_developmentCertThumbprint)
|
| this IServiceCollection services, IWebHostEnvironment env, GlobalSettings globalSettings) | ||
| { | ||
| var builder = services.AddDataProtection().SetApplicationName("Bitwarden"); | ||
| if (env.IsDevelopment()) |
There was a problem hiding this comment.
@MGibson1 this introduced a regression in development self-hosted environment. It is not impossible to run Api Self-Hosted, which now tries to load data protection from /etc/bitwarden, which does not exist in most dev environments





🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-34880
https://bitwarden.atlassian.net/browse/PM-34881
https://bitwarden.atlassian.net/browse/PM-34886
📔 Objective
Various tweaks to smooth qa automation testing.
📸 Screenshots