Support Azure national clouds in FAB Azure AD id_token validation - #72010
Merged
hussein-awala merged 1 commit intoAug 24, 2026
Merged
Conversation
hussein-awala
force-pushed
the
fab-azure-sovereign-clouds
branch
from
August 24, 2026 20:13
db7d67c to
cce72cf
Compare
hussein-awala
marked this pull request as ready for review
August 24, 2026 20:17
vincbeck
approved these changes
Aug 24, 2026
Contributor
|
Nice, thanks! |
12 tasks
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.
Support Azure national clouds in the FAB auth manager's Azure AD id_token validation.
Why
Before #71735,
_decode_and_validate_azure_jwtverified the signature and calledclaims.validate()with no issuer check, so any Azure cloud worked. #71735 added issuerpinning built around a hard-coded
login.microsoftonline.com, which means deployments onAzure Government (
login.microsoftonline.us) or Azure operated by 21Vianet(
login.partner.microsoftonline.cn) can no longer authenticate at all: the tenant cannot bederived from their endpoints, so validation raises before a token is ever examined.
There is a second, older problem in the same path.
_get_microsoft_jwksfetches keys fromMICROSOFT_KEY_SET_URL, the commercial cloud'scommonkey set. National clouds sign withtheir own keys, so even with the issuer fixed, signature verification would fail.
apache-airflow-providers-fabwas excluded from the 2026-08-18 provider wave over thetenant-canonicalisation regression fixed in #71920; this is the remaining issue from the same
change, and it should land before 3.8.1 ships.
What this does
Rather than hard-coding each cloud's issuer and key set — values that are easy to get subtly
wrong — the acceptable issuers and the
jwks_uriare read from the tenant's own OpenIDdiscovery metadata:
hard-coded host when deriving the tenant from configured endpoints;
issvaluesand the
jwks_uri, cached per (authority host, tenant);no network call, so existing deployments see no new latency and no behaviour change.
Both the issuer and the
jwks_uriare required to live on the configured authority host, so atampered discovery document cannot point verification at another host. Every failure path
raises
AzureTenantResolutionError; if the v1.0 document cannot be read, the v1.0 issuer issimply not accepted, which denies a login rather than widening what is trusted. Failures are
not cached.
Azure AD B2C is deliberately out of scope: its authority is per-tenant
(
<tenant>.b2clogin.com) and its metadata is addressed by policy, which does not fit atenant-only lookup. That is now stated in the docs rather than left to be discovered.
Tests
Nine tests: end-to-end validation on both national clouds asserting the key set comes from the
tenant's metadata; a negative test that a commercial-issued token is rejected for a national
cloud tenant; fail-closed cases for an issuer or
jwks_uripointing off the configuredauthority and for missing fields; a v1.0-document-unavailable case; caching; and authority
host derivation including the fallback to commercial.
related: #71735, #71920
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines