Skip to content

Verify Azure AD OAuth id_token signatures by default in FAB auth manager - #69374

Merged
potiuk merged 3 commits into
apache:mainfrom
potiuk:fix-fab-azure-oauth-verify-signature-default
Jul 7, 2026
Merged

Verify Azure AD OAuth id_token signatures by default in FAB auth manager#69374
potiuk merged 3 commits into
apache:mainfrom
potiuk:fix-fab-azure-oauth-verify-signature-default

Conversation

@potiuk

@potiuk potiuk commented Jul 4, 2026

Copy link
Copy Markdown
Member

The FAB auth manager's Azure AD OAuth provider decoded the incoming id_token
with verify_signature defaulting to False, so the token payload was accepted
without verifying its signature unless a deployment explicitly set the option.
The Authentik OAuth provider in the same security manager already defaults
verify_signature to True.

This change:

  • defaults verify_signature to True for the Azure AD provider, so id_token
    signatures are verified against the Microsoft JWKS by default, consistent with
    the Authentik provider;
  • logs a warning when signature verification is skipped, matching the Authentik
    code path.

Behaviour change / migration: deployments that intentionally relied on the
previous default must now set verify_signature: False explicitly in the Azure
provider client_kwargs to keep the old behaviour.

Tests

  • test_decode_and_validate_azure_jwt_verifies_signature_by_default
  • test_decode_and_validate_azure_jwt_skips_verification_when_opted_out
Was generative AI tooling used to co-author this PR?
  • Yes — Claude Opus 4.8 (1M context)

Generated-by: Claude Opus 4.8 (1M context) following the guidelines at
https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions

@potiuk
potiuk requested a review from vincbeck as a code owner July 4, 2026 12:18
@potiuk
potiuk force-pushed the fix-fab-azure-oauth-verify-signature-default branch from d95dabf to 210081b Compare July 4, 2026 12:30
@vincbeck

vincbeck commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Some spelling errors

The FAB auth manager's Azure AD OAuth provider decoded the incoming id_token
with verify_signature defaulting to False, so the token payload was accepted
without verifying its signature unless a deployment explicitly set the option.
The Authentik OAuth provider in the same security manager already defaults
verify_signature to True.

Default verify_signature to True for the Azure AD provider, so id_token
signatures are verified against the Microsoft JWKS by default, consistent with
the Authentik provider, and log a warning when signature verification is
skipped.

Deployments that intentionally relied on the previous default must set
verify_signature: False explicitly in the Azure provider client_kwargs to keep
the old behaviour.

Generated-by: Claude Opus 4.8 (1M context) following the guidelines at
https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
@potiuk
potiuk force-pushed the fix-fab-azure-oauth-verify-signature-default branch from 210081b to 196acae Compare July 7, 2026 01:02
potiuk added 2 commits July 7, 2026 03:04
The FAB changelog note references the Authentik OAuth provider by name,
which the spellchecker rejects as an unknown word. Authentik is a proper
product name, so add it to the shared wordlist.

Generated-by: Claude Opus 4.8 (1M context)
@potiuk
potiuk force-pushed the fix-fab-azure-oauth-verify-signature-default branch from 196acae to d15ac85 Compare July 7, 2026 01:05
@potiuk

potiuk commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

fixed - maybe not too late to include it

@potiuk
potiuk merged commit 54259ae into apache:main Jul 7, 2026
79 checks passed
@potiuk
potiuk deleted the fix-fab-azure-oauth-verify-signature-default branch July 7, 2026 09:59
@vincbeck

vincbeck commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

fixed - maybe not too late to include it

Too late :) Will be part of the next one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants