Add sovereign cloud support to next/core (GCCH, DoD, China)#413
Draft
Add sovereign cloud support to next/core (GCCH, DoD, China)#413
Conversation
Introduce CloudEnvironment class that bundles all cloud-specific service endpoints, with predefined instances for Public, USGov (GCCH), USGovDoD, and China (21Vianet). Thread the cloud environment through ClientCredentials, token clients, validation settings, and DI host builders so that all previously hardcoded endpoints are now configurable per cloud. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow users to override specific CloudEnvironment endpoints (e.g. LoginEndpoint, LoginTenant) via appsettings.json, enabling scenarios like China single-tenant bots that require a tenant-specific login URL. - Add CloudEnvironment.WithOverrides() for layering nullable overrides - Add 8 endpoint override properties + ResolveCloud() helper to TeamsSettings - Unify cloud resolution across Apply(), AddTeamsCore(), and AddTeamsTokenAuthentication() - Add WithOverrides unit tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ated files - Keep static BotTokenClient.BotScope unchanged (avoids breaking change) - Add ActiveBotScope instance property for per-cloud scope configuration - Remove CLAUDE.md, Claude-KB.md, and .gitignore session file entries that were unrelated to sovereign cloud support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CloudEnvironmentTests: ClientCredentials cloud property defaults and assignment - BotTokenClientTests: ActiveBotScope defaults, overrides, and usage in GetAsync - TeamsValidationSettingsTests: sovereign cloud issuers, JWKS, login endpoints, tenant-specific URLs, and audience handling Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Thread CloudEnvironment through the core/ MSAL-based architecture: - BotConfig: resolve Cloud from configuration (Cloud/CLOUD key) across all 3 config formats (BF, Core env vars, AzureAd section) - BotClientOptions: Cloud property for scope and instance resolution - AddBotApplicationExtensions: use cloud.LoginEndpoint for MSAL Instance (resolves 3 TODO comments), cloud-aware default scope - UserTokenClient: cloud-aware default token service endpoint Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
BotConfigcloud resolution, MSAL Instance fromCloudEnvironment.LoginEndpoint, cloud-aware default scope, cloud-awareUserTokenClientendpointcore/ changes
core/src/.../Hosting/BotConfig.csCloudproperty, resolved from config key in all 3 formats (BF, Core, AzureAd)core/src/.../Hosting/BotClientOptions.csCloudproperty, scope defaults from cloudcore/src/.../Hosting/AddBotApplicationExtensions.csInstance, resolves cloud from config, threads through all auth methodscore/src/.../UserTokenClient.csTest plan
dotnet build— 0 errorsdotnet test— 42 sovereign cloud tests pass (24 CloudEnv + 9 BotTokenClient + 9 TeamsValidationSettings)Depends on
🤖 Generated with Claude Code