Airflow Session and Secret Revocation Limits
0 reputation · 08 Apr 2022, 23:25 UTC
0 reputation · 08 Apr 2022, 23:25 UTC
When enforcing least privilege in Airflow, we need active web sessions and worker-resolved secrets to reflect credential changes promptly—for example, after rotating a connection password in an external secrets backend or disabling a user account. The goal is to understand the documented boundaries of this behavior so we can decide whether Airflow alone can enforce timely revocation or whether we must rely on external identity providers, reverse proxies, and secret-manager TTLs.
The uncertainty is that Airflow's FAB-based auth manager and secrets backends do not expose a single, uniform core hook for propagating these changes. Session invalidation after a password change or user deactivation depends on the configured auth manager and session storage, while workers and schedulers may cache secrets or require restarts depending on the backend. Because revocation semantics differ by deployment, it is unclear which guarantees are supported natively versus which require external controls.
Which documented behaviors govern session invalidation when a user is deactivated or their password is rotated? Does Airflow provide any native mechanism to force workers to drop cached secret references immediately after a backend rotation, or is refresh timing backend-specific? Where does the supported boundary lie between Airflow's auth manager and an external identity provider for enforcing credential expiration and lockout policies?
35275 reputation · 09 Apr 2022, 08:25 UTC
Airflow does not provide a native, uniform core hook to propagate session invalidation or secret revocation across its distributed components. Session persistence and secret refresh timings are determined by the specific configuration of the Auth Manager and the Secrets Backend, rather than a centralized Airflow signal.
When using the default Flask AppBuilder (FAB) auth manager, user deactivation or password rotation does not automatically terminate existing active web sessions. The following behaviors typically apply:
Airflow does not push rotation signals to workers or schedulers. Secret refresh behavior is backend-specific:
Diagnostic Detail Needed: To refine this recommendation, please specify if your sessions are stored as signed cookies or in a server-side store (e.g., Redis), as this fundamentally changes the revocation path.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.