From b593ebcf604ec44c1d53d1e695b2a659c6276330 Mon Sep 17 00:00:00 2001 From: "Zhen-Lun (Kevin) Hong" Date: Mon, 30 Jun 2025 21:09:42 +0800 Subject: [PATCH] fix: enable iframe script execution (#52257) * fix: enable iframe script execution * fix: include vite env variables when transpiling typescripts * fix: add explanations to sandbox settings * fix: remove csp change (cherry picked from commit 4c7d43c4f30f6e09b4afd90e7c0a240cc32ea09b) --- airflow-core/src/airflow/ui/src/pages/Security.tsx | 13 +++++++------ scripts/ci/pre_commit/ts_compile_lint_ui.py | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/airflow-core/src/airflow/ui/src/pages/Security.tsx b/airflow-core/src/airflow/ui/src/pages/Security.tsx index 3a6061478ebad..9de11fc8771c0 100644 --- a/airflow-core/src/airflow/ui/src/pages/Security.tsx +++ b/airflow-core/src/airflow/ui/src/pages/Security.tsx @@ -43,14 +43,15 @@ export const Security = () => { return ; } + // The following iframe sandbox setting is intentionally less restrictive. + // This is considered safe because the framed content originates from the Auth manager, + // which is part of the deployment of Airflow and trusted as per our security policy. + // https://airflow.apache.org/docs/apache-airflow/stable/security/security_model.html + const sandbox = "allow-scripts allow-same-origin allow-forms"; + return ( -