Add sovereign cloud support (GCCH, DoD, China)#500
Draft
Conversation
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>
063932f to
837bcd3
Compare
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.
Summary
CloudEnvironmenttype with predefined presets (PUBLIC,US_GOV,US_GOV_DOD,CHINA) bundling all cloud-specific service endpointsApp,TokenManager,ApiClient,JwtValidator, andServiceTokenValidatorCLOUDenvironment variable and programmaticAppOptions.cloudconfigurationFiles changed
packages/api/src/auth/cloud-environment.tspackages/api/src/auth/cloud-environment.spec.tspackages/api/src/auth/index.tspackages/api/src/clients/api-client-settings.tspackages/api/src/clients/index.tspackages/apps/src/app.tspackages/apps/src/token-manager.tspackages/apps/src/middleware/auth/jwt-validator.tspackages/apps/src/middleware/auth/service-token-validator.tspackages/apps/src/middleware/jwt-validation-middleware.tspackages/apps/src/http/http-server.tsTest plan
npm run build— 34/34 tasks passnpm test— 581 tests pass (30 new sovereign cloud tests)CLOUD=USGovagainst GCCH tenant — JWT validated, echo reply sent🤖 Generated with Claude Code