Docs: refresh JWT and security model for v3.2 with mermaid diagrams#67435
Open
potiuk wants to merge 3 commits into
Open
Docs: refresh JWT and security model for v3.2 with mermaid diagrams#67435potiuk wants to merge 3 commits into
potiuk wants to merge 3 commits into
Conversation
Member
Author
Member
Author
|
Also cc: @vatsrahul1001 -> we should include it in rc2 |
Member
Author
|
Below are the six mermaid diagrams introduced in this PR (updated for higher contrast and an easier-to-read credential matrix), rendered inline via GitHub's native mermaid support. They are identical to what
|
kaxil
reviewed
May 24, 2026
Catch up the public security documentation to match the security-relevant changes flowing into the 3.2 release branch. Adds six mermaid diagrams (four in jwt_token_authentication.rst, two in security_model.rst) and documents: - Typed TIClaims Pydantic schema validation of Execution API tokens. - Unconditional revoke_token() on /auth/logout so external IdP redirects no longer leave the Airflow JWT valid. - Router-level Depends(get_user) as a defense-in-depth backstop on /api/v2 and /ui. - ExecutionAPISecretsBackend raising PermissionError on 401/403 so a deny no longer falls through to less-restrictive backends. - Tightened deserialization allowlist regex (full-string match). Registers sphinxcontrib-mermaid as a new docs dependency in devel-common and BASIC_SPHINX_EXTENSIONS.
- Replace the arrow-spaghetti credential-distribution mermaid with a component-grouped layout (least- to most-privileged left-to-right) plus an explicit RST table for true matrix lookup. - Bump all six security-diagram color palettes from very-pale tints to medium-saturation fills with explicit black text and 2px strokes, so labels stay readable in both light and dark mode renderers.
The /run endpoint is PATCH /{task_instance_id}/run, not POST.
Spotted in review of apache#67435.
e6a0a7c to
5c989d2
Compare
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.
Catch up the public security documentation to match the security-relevant
changes flowing into the 3.2 release branch. Adds six mermaid diagrams
and re-aligns prose with the current code.
What changed in the docs
airflow-core/docs/security/jwt_token_authentication.rst:asymmetric signing; two-token sequence (Scheduler → executor queue →
worker
/run→ refreshed execution token); request-time validationpipeline (signature → standard claims →
TIClaimsschema →require_authscope →ti:self).TIClaimsPydantic claims validation (Validate task identity token claims with a typed schema #63604)./auth/logoutnow invokesauth_manager.revoke_token()unconditionally, even when the auth manager redirects to an external
IdP logout URL (Revoke JWT on /auth/logout regardless of auth manager logout URL #67289).
airflow-core/docs/security/security_model.rst:worker plane, DFP/Triggerer's in-process Execution API bypass);
per-component credential-distribution matrix for sensitive values.
router-level
Depends(get_user)onauthenticated_routerandui_router(Default-deny auth at the API and UI router level #66505).ti:self:ExecutionAPISecretsBackendraisesPermissionErroron 401/403instead of letting the dispatcher fall through to a less-restrictive
backend (Refuse secrets-backend fallback on Execution-API authz deny #66575); tightened deserialization allowlist regex requires a
full-string match (Tighten deserialization allowlist regex to require full-string match #66499); typed claims schema rejects non-UUID
subor unknownscope.Tooling change
Registers
sphinxcontrib-mermaid>=1.0.0as a new dependency indevel-common[docs]and addssphinxcontrib.mermaidtoBASIC_SPHINX_EXTENSIONSso every Airflow Sphinx build (core,providers, chart, docker-stack) can use
.. mermaid::directives.uv.lockis regenerated.Verification
breeze build-docs --package-filter apache-airflow→"Documentation build is successful", 0 build errors, 0 spelling errors.
prek run --from-ref upstream/main --stage pre-commitand--stage manualboth pass.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines