Commit 2f5e2c6
committed
feat(server): add Gov CloudRegion enum value, bitwarden-gov.com domains, and Gov vault URL
Adds Gov region support across three layers:
1. Enum value: adds Gov=2 to src/Core/Enums/CloudRegion.cs
(Bit.Core.Enums.CloudRegion). The Setup-layer enum was removed in the
preceding commit; there is now a single canonical enum in Core.
2. CloudRegionConfig.All: appends Gov entry with bitwarden-gov.com domains
(API, identity, vault, notifications, icons, events, SSO callback).
Because BitwardenCloudDomains and BitwardenMobileSsoCallbackUris in
Constants.cs already derive from CloudRegionConfig.All via LINQ spread,
Gov is automatically included in both allowlists at no extra cost.
3. Tests:
- ConstantsTests: BitwardenCloudDomains_ContainsAllProductionDomains and
BitwardenMobileSsoCallbackUris_ContainsAllRegionCallbacks are parametrized
over US/EU/Gov to assert domain and SSO-callback presence
- HandlebarsMailServiceTests: GetCloudVaultSubscriptionUrl_ResolvesPerRegion
parametrized over us/eu/gov to assert vault URL prefix resolution
Implementation note: the prior coordinator's decision to create a new
Bit.Core.Enums.CloudRegion (rather than keep it in Bit.Setup.Enums) was
correct to avoid a circular project dependency (Core must not reference
Setup). Now that the Setup enum is deleted, adding a new region requires
only a single enum update in src/Core/Enums/CloudRegion.cs.
Refs: PM-35089, PM-350871 parent 86852b4 commit 2f5e2c6
4 files changed
Lines changed: 47 additions & 1 deletion
File tree
- src/Core
- Enums
- Settings
- test/Core.Test
- Services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
69 | 87 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
367 | 383 | | |
0 commit comments