feat(server): add Gov cloud region#7730
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7730 +/- ##
==========================================
+ Coverage 60.58% 60.60% +0.01%
==========================================
Files 2146 2147 +1
Lines 95074 95093 +19
Branches 8507 8507
==========================================
+ Hits 57598 57628 +30
+ Misses 35451 35439 -12
- Partials 2025 2026 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds the Gov cloud region across three layers. Enum: Gov = 2 in Bit.Core.Enums.CloudRegion. Config: Gov entry in CloudRegionConfig.All (bitwarden-gov.com domain, API, identity, vault, and SSO-callback URLs). Because Constants.BitwardenCloudDomains and BitwardenMobileSsoCallbackUris derive from CloudRegionConfig.All, and ServiceCollectionExtensions iterates All for Swagger server registration, Gov flows into HTTPS-redirect allowlists, mobile SSO callback validation, and OpenAPI server definitions without further code changes. Tests: first coverage for BitwardenCloudDomains and BitwardenMobileSsoCallbackUris membership and for GetCloudVaultSubscriptionUrl URL resolution, parametrized over US/EU/Gov. Server-side foundation for the Bitwarden Gov cloud environment, independent of any feature flag. Stacked on PM-38015's consolidation work; adding Gov required only one enum value and one CloudRegionConfig.All entry. Refs: PM-38016
01337bd to
65ad821
Compare
|
dani-garcia
approved these changes
May 29, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/PM-38016
Stacked on #7728
📔 Objective
Adds the Gov cloud region to
CloudRegionConfig, following up on the refactor to createCloudRegionConfigon #7728. This applys the Gov region across different services in the server, like Swagger, Handlebars,CloudDomains, and mobile SSO.