Fix Azure AD tenant identifier canonicalization in FAB auth manager - #71920
Open
aaron-y-chen wants to merge 2 commits into
Open
Fix Azure AD tenant identifier canonicalization in FAB auth manager#71920aaron-y-chen wants to merge 2 commits into
aaron-y-chen wants to merge 2 commits into
Conversation
…clarify validation of issuer and audience claims, and support for tenant domain and GUID authorities.
aaron-y-chen
marked this pull request as ready for review
August 21, 2026 04:32
vincbeck
reviewed
Aug 21, 2026
| 3.8.1 | ||
| ..... | ||
|
|
||
| .. note:: |
Contributor
There was a problem hiding this comment.
Please remove. Changelog are supposed to be updated by release managers
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.
related: #71735
Why
In
apache-airflow-providers-fab==3.8.1rc1(#71735), Azure AD token validation uses the configured tenant identifier directly as the expectedissclaim. But Azure mints the issuer published in the tenant's OpenID Connect metadata, which always carries the canonical lowercase tenant GUID-- see Microsoft Entra ID guidance on validating the issuer. Deployments configured with a domain name (e.g.*.onmicrosoft.comor a custom domain) or an uppercase GUID therefore fail login withInvalidClaimError.How to Reproduce
In an environment with
apache-airflow-providers-fab==3.8.1rc1installed, running token validation against domain or uppercase GUID authorities fails:Summary of Changes
_resolve_azure_tenant_guid()to normalize GUIDs locally and resolve domain names to canonical tenant GUIDs via Microsoft OpenID Connect discovery (with in-memory caching).urllib.parse.urlsplitto safely extract configured tenant identifiers from HTTPSlogin.microsoftonline.comendpoints, and addedAzureTenantResolutionError(FabException)for discovery/validation failures.tenant_identifier_resolve_azure_tenant_guidOutput72f988bf-86f1-41af-91ab-2d7cd011db47)72f988bf-86f1-41af-91ab-2d7cd011db4772F988BF-86F1-41AF-91AB-2D7CD011DB47)72f988bf-86f1-41af-91ab-2d7cd011db47microsoft.onmicrosoft.com)72f988bf-86f1-41af-91ab-2d7cd011db47contoso.com)<canonical-tenant-guid>Was generative AI tooling used to co-author this PR?
Generated-by: [GPT 5.6-sol] following the guidelines