Apache Airflow version
3.1.7
If "Other Airflow 3 version" selected, which one?
No response
What happened?
A regression was introduced in PR #58997 regarding how the security iframe handles redirection. The current logic checks for a hardcoded pathname starting with /auth/, which fails when Airflow is configured with a non-root base_url (e.g., when hosted at /airflow/).
|
const onLoad = () => { |
|
const iframe: HTMLIFrameElement | null = document.querySelector("#security-iframe"); |
|
|
|
if (iframe?.contentWindow && !iframe.contentWindow.location.pathname.startsWith("/auth/")) { |
|
void Promise.resolve(navigate("/")); |
|
} |
|
}; |
What you think should happen instead?
No response
How to reproduce
- Configure Airflow to run behind a prefix (e.g., AIRFLOW__API__BASE_URL=/airflow).
- Access the UI and navigate to security tabs.
- The onLoad handler in the security iframe triggers.
- iframe.contentWindow.location.pathname returns /airflow/auth/....
- The check .startsWith("/auth/") returns false.
- The router incorrectly calls navigate("/"), redirecting the user to the root instead of the dashboard.
Operating System
Debian GNU/Linux 12 (bookworm)
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
3.1.7
If "Other Airflow 3 version" selected, which one?
No response
What happened?
A regression was introduced in PR #58997 regarding how the security iframe handles redirection. The current logic checks for a hardcoded pathname starting with /auth/, which fails when Airflow is configured with a non-root base_url (e.g., when hosted at /airflow/).
airflow/airflow-core/src/airflow/ui/src/pages/Security.tsx
Lines 43 to 49 in d384009
What you think should happen instead?
No response
How to reproduce
Operating System
Debian GNU/Linux 12 (bookworm)
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct