Skip to content

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

Draft
corinagum wants to merge 1 commit intomainfrom
cg/sovereign-cloud
Draft

Add sovereign cloud support (GCCH, DoD, China)#354
corinagum wants to merge 1 commit intomainfrom
cg/sovereign-cloud

Conversation

@corinagum
Copy link
Copy Markdown
Contributor

Summary

  • Introduces CloudEnvironment frozen dataclass with predefined presets (PUBLIC, US_GOV, US_GOV_DOD, CHINA) bundling all cloud-specific service endpoints
  • Threads cloud environment through App, TokenManager, BotTokenClient, TokenValidator, and ApiClientSettings
  • Supports CLOUD environment variable and programmatic AppOptions.cloud configuration

Files changed

Action File
New packages/api/src/microsoft_teams/api/auth/cloud_environment.py
New packages/api/tests/unit/test_cloud_environment.py
Modified packages/api/src/microsoft_teams/api/auth/__init__.py
Modified packages/api/src/microsoft_teams/api/clients/api_client_settings.py
Modified packages/api/src/microsoft_teams/api/clients/bot/token_client.py
Modified packages/apps/src/microsoft_teams/apps/app.py
Modified packages/apps/src/microsoft_teams/apps/options.py
Modified packages/apps/src/microsoft_teams/apps/token_manager.py
Modified packages/apps/src/microsoft_teams/apps/auth/token_validator.py
Modified packages/apps/src/microsoft_teams/apps/auth/jwt_middleware.py
Modified packages/apps/src/microsoft_teams/apps/http/http_server.py

Test plan

  • pytest packages/api/tests/ — 161 tests pass (23 new sovereign cloud tests)
  • pytest packages/apps/tests/ — 190 tests pass
  • E2E: Echo bot with CLOUD=USGov against GCCH tenant — message received, echo reply sent

🤖 Generated with Claude Code

Introduce CloudEnvironment frozen dataclass with predefined presets
(PUBLIC, US_GOV, US_GOV_DOD, CHINA) bundling all cloud-specific service
endpoints. Thread cloud environment through App, TokenManager,
BotTokenClient, TokenValidator, and ApiClientSettings so previously
hardcoded endpoints are configurable per cloud.

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

Includes comprehensive tests for CloudEnvironment presets, from_name(),
and with_overrides().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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