Add OIDC worker token verification to Edge3 - #72262
Open
robertpofuk wants to merge 1 commit into
Open
Conversation
robertpofuk
requested review from
dheerajturaga,
jscheffl and
shubhamraj-git
as code owners
August 29, 2026 16:12
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
robertpofuk
force-pushed
the
edge3-oidc-worker-token-auth
branch
from
August 29, 2026 20:56
f4c978c to
94c638d
Compare
Author
|
Tested on our internal environment by vendoring edge3 and re-building. Works nicely and makes our setup super simple since workers just order therir access via central IDP. |
robertpofuk
force-pushed
the
edge3-oidc-worker-token-auth
branch
from
August 30, 2026 18:20
94c638d to
0be8d57
Compare
The Edge worker API currently only verifies worker tokens signed with the shared `[api_auth] jwt_secret` (symmetric HS512). This adds optional verification against a trusted OpenID Connect provider so edge workers can authenticate with tokens minted by an external identity provider. When `[edge] oidc_jwks_url` is set, worker tokens are verified against the provider JWKS using asymmetric signatures, checking the `iss` and optionally `aud` claims. New `[edge]` options: - oidc_jwks_url: provider JWKS URL; enables OIDC verification when set - oidc_issuer: expected `iss` claim - oidc_audience: expected `aud` claim; empty skips audience verification for tokens that carry no `aud` - oidc_algorithms: accepted signing algorithms (default RS256) When `oidc_jwks_url` is empty (the default) the existing shared-secret verification is used unchanged. The per-request signed `method` claim check is skipped in OIDC mode because externally issued tokens do not carry it. Uses the existing core `JWKS`/`JWTValidator`; no new dependencies. Signed-off-by: Robert POFUK <robert.pofuk@rbinternational.com>
robertpofuk
force-pushed
the
edge3-oidc-worker-token-auth
branch
from
August 30, 2026 18:33
0be8d57 to
203ac0c
Compare
Author
|
Fixed CI failures and rebased on main. |
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.
Why
The Edge worker API currently only verifies worker tokens signed with the shared
[api_auth] jwt_secret(symmetric HS512). This adds optional verification against a trusted OpenID Connect provider, so edge workers can authenticate with tokens minted by an external identity provider instead of the shared secret.What
When
[edge] oidc_jwks_urlis set, worker tokens are verified against the provider JWKS using asymmetric signatures, checking theissand (optionally)audclaims. New[edge]options:oidc_jwks_url— provider JWKS URL; enables OIDC verification when setoidc_issuer— expectedissclaimoidc_audience— expectedaudclaim; leave empty to skip audience verification (for tokens that carry noaud)oidc_algorithms— accepted signing algorithms, comma-separated (defaultRS256)When
oidc_jwks_urlis empty (the default), the existing shared-secret verification is used unchanged, so existing deployments are unaffected. The per-request signedmethodclaim check is skipped in OIDC mode because externally issued tokens do not carry it.Uses the existing core
JWKS/JWTValidator; no new dependencies. Adds unit tests for validator selection, the config options, and the method-claim behavior (the module had no test module before).Known limitation / follow-up
Some identity providers publish JWKS keys without an
algfield. PyJWT then defaults such keys toRS256and rejects tokens signed with another algorithm even whenalgorithmsis passed tojwt.decode. That looks like it should be addressed in coreJWTValidatorrather than here, so it is intentionally out of scope for this PR. Happy to follow up separately if maintainers agree.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.