You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reviewed the feature flag gating for Secrets Manager version history: a class-level [RequireFeature(FeatureFlagKeys.SecretsVersioning)] on SecretVersionsController and an IsEnabled check on the version-recording branch in SecretsController.UpdateSecretAsync. The gating itself is correct and complete — both version write paths (secret update and version restore) and all read/delete endpoints are covered, UseFeatureFlagChecks() is already wired in src/Api/Startup.cs, the flag key exists in Constants.cs, and the fully-qualified Bitwarden.Server.Sdk.Features.IFeatureService injection matches the pattern used by SyncController and SendsController. One defect in the gated branch surfaced while tracing the new tests: the version record captures the post-update value rather than the previous one. That behavior predates this PR, but this PR modifies the branch condition and adds the tests that assert the branch, and the new assertions pass either way.
Code Review Details
⚠️ : Gated branch stores the new secret value as the version record because ToSecret has already mutated secret.Value; version history loses the previous value and restore becomes a no-op
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/SM-2083
📔 Objective
Add Feature Flag Gating to Server Side Secret Versioning Changes