Add sovereign cloud support for Bleu, Delos, and GovSG#5671
Conversation
Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com>
059c1c8 to
e7bdeee
Compare
tests/Microsoft.Identity.Test.Unit/CoreTests/InstanceTests/InstanceProviderTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: gladjohn <90415114+gladjohn@users.noreply.github.com>
|
Failed KnownInstanceMetadataIsUpToDateAsync [68 ms] |
…omparison The new sovereign clouds (Bleu, Delos, GovSG) are client-side only and not part of the public discovery endpoint responses. Updated KnownInstanceMetadataIsUpToDateAsync test to filter out these clouds when comparing with discovery responses. Co-authored-by: gladjohn <90415114+gladjohn@users.noreply.github.com>
Fixed the test by filtering out the new sovereign clouds (Bleu, Delos, GovSG) from the discovery comparison. These clouds are client-side only and not part of the public discovery endpoint responses, so they should be excluded from the assertion. Commit: 1abc2c5 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
tests/Microsoft.Identity.Test.Unit/PublicApiTests/InstanceDiscoveryTests.cs
Outdated
Show resolved
Hide resolved
* Add support for new sovereign clouds (Bleu, Delos, GovSG) Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com> * Refactor test to use data-driven approach with DataTestMethod Co-authored-by: gladjohn <90415114+gladjohn@users.noreply.github.com> * Fix integration test to exclude new sovereign clouds from discovery comparison The new sovereign clouds (Bleu, Delos, GovSG) are client-side only and not part of the public discovery endpoint responses. Updated KnownInstanceMetadataIsUpToDateAsync test to filter out these clouds when comparing with discovery responses. Co-authored-by: gladjohn <90415114+gladjohn@users.noreply.github.com> * Add more tests * Spacing * fix * Fix * Update --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com> Co-authored-by: Gladwin Johnson <90415114+gladjohn@users.noreply.github.com> Co-authored-by: Bogdan Gavril <bogavril@microsoft.com>
Changes proposed in this request
MSAL performs instance discovery to resolve cloud aliases and ensure token cache compatibility. For known clouds, instance discovery must target the cloud-specific endpoint rather than the global cloud (
login.microsoftonline.com).Added three new sovereign clouds to
KnownMetadataProvider:login.sovcloud-identity.frlogin.sovcloud-identity.delogin.sovcloud-identity.sgEach cloud entry follows the existing pattern:
Instance discovery for these clouds now routes to the cloud-specific endpoint, not the global cloud.
These new sovereign clouds rely on client-side authority validation only (no calls to eSTS). Updated the
KnownInstanceMetadataIsUpToDateAsyncintegration test to exclude these clouds from the discovery endpoint comparison, as they are not part of the public discovery responses.Testing
KnownMetadataProvider_NewSovereignCloudsdata-driven test using[DataTestMethod]with[DataRow]attributes to validate metadata retrieval for all three cloudsKnownMetadataProvider_IsKnownto verify case-insensitive recognitionKnownMetadataProvider_publicEnvironmentto ensure new clouds are not treated as public cloudKnownInstanceMetadataIsUpToDateAsyncintegration test to filter out client-side sovereign clouds from discovery endpoint comparisonAll tests pass. The data-driven test approach ensures each sovereign cloud is tested individually with consistent assertions.
Performance impact
None. Static initialization only, no runtime changes.
Documentation
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.