Skip to content

Add sovereign cloud support (GCCH, DoD, China)#500

Draft
corinagum wants to merge 3 commits intomainfrom
cg/sovereign-cloud
Draft

Add sovereign cloud support (GCCH, DoD, China)#500
corinagum wants to merge 3 commits intomainfrom
cg/sovereign-cloud

Conversation

@corinagum
Copy link
Copy Markdown
Collaborator

Summary

  • Introduces CloudEnvironment type with predefined presets (PUBLIC, US_GOV, US_GOV_DOD, CHINA) bundling all cloud-specific service endpoints
  • Threads cloud environment through App, TokenManager, ApiClient, JwtValidator, and ServiceTokenValidator
  • Supports CLOUD environment variable and programmatic AppOptions.cloud configuration

Files changed

Action File
New packages/api/src/auth/cloud-environment.ts
New packages/api/src/auth/cloud-environment.spec.ts
Modified packages/api/src/auth/index.ts
Modified packages/api/src/clients/api-client-settings.ts
Modified packages/api/src/clients/index.ts
Modified packages/apps/src/app.ts
Modified packages/apps/src/token-manager.ts
Modified packages/apps/src/middleware/auth/jwt-validator.ts
Modified packages/apps/src/middleware/auth/service-token-validator.ts
Modified packages/apps/src/middleware/jwt-validation-middleware.ts
Modified packages/apps/src/http/http-server.ts

Test plan

  • npm run build — 34/34 tasks pass
  • npm test — 581 tests pass (30 new sovereign cloud tests)
  • E2E: Echo bot with CLOUD=USGov against GCCH tenant — JWT validated, echo reply sent

🤖 Generated with Claude Code

Corina Gum and others added 2 commits March 25, 2026 12:18
Introduce CloudEnvironment type with predefined presets (PUBLIC, US_GOV,
US_GOV_DOD, CHINA) bundling all cloud-specific service endpoints. Thread
cloud environment through App, TokenManager, ApiClient, JwtValidator, and
ServiceTokenValidator so previously hardcoded endpoints are configurable
per cloud.

Supports programmatic configuration via AppOptions.cloud or CLOUD
environment variable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CloudEnvironment: preset values, fromName(), withOverrides(), frozen checks
- ServiceTokenValidator: verify cloud-specific issuer and JWKS URI for US_GOV/CHINA
- JwtValidator: loginEndpoint for JWKS URI construction and issuer prefix validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@corinagum corinagum force-pushed the cg/sovereign-cloud branch 2 times, most recently from 063932f to 837bcd3 Compare April 3, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant