This is an automated email from the ASF dual-hosted git repository.

vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new e026d91e42e Fix `conf.get_boolean("api", "ssl_cert")` (#48465)
e026d91e42e is described below

commit e026d91e42e4c9f7eda1dc7ce5c09816118ecd43
Author: Vincent <[email protected]>
AuthorDate: Thu Mar 27 18:23:52 2025 -0400

    Fix `conf.get_boolean("api", "ssl_cert")` (#48465)
---
 airflow-core/docs/core-concepts/auth-manager/index.rst                  | 2 +-
 .../src/airflow/api_fastapi/auth/managers/simple/routes/login.py        | 2 +-
 .../src/airflow/providers/amazon/aws/auth_manager/router/login.py       | 2 +-
 providers/fab/src/airflow/providers/fab/www/views.py                    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/airflow-core/docs/core-concepts/auth-manager/index.rst 
b/airflow-core/docs/core-concepts/auth-manager/index.rst
index e07ea5a30c4..2826dda0a67 100644
--- a/airflow-core/docs/core-concepts/auth-manager/index.rst
+++ b/airflow-core/docs/core-concepts/auth-manager/index.rst
@@ -146,7 +146,7 @@ delete the cookie.
 
     response = RedirectResponse(url="/")
 
-    secure = conf.getboolean("api", "ssl_cert")
+    secure = conf.has_option("api", "ssl_cert")
     response.set_cookie(COOKIE_NAME_JWT_TOKEN, token, secure=secure)
     return response
 
diff --git 
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/routes/login.py 
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/routes/login.py
index a9dd3ff6217..439e86eefa7 100644
--- a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/routes/login.py
+++ b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/routes/login.py
@@ -64,7 +64,7 @@ def create_token_all_admins() -> RedirectResponse:
 
     response = RedirectResponse(url=conf.get("api", "base_url"))
 
-    secure = conf.getboolean("api", "ssl_cert")
+    secure = conf.has_option("api", "ssl_cert")
     response.set_cookie(
         COOKIE_NAME_JWT_TOKEN,
         get_auth_manager().generate_jwt(user),
diff --git 
a/providers/amazon/src/airflow/providers/amazon/aws/auth_manager/router/login.py
 
b/providers/amazon/src/airflow/providers/amazon/aws/auth_manager/router/login.py
index b1c77154312..68e0e3ddc0b 100644
--- 
a/providers/amazon/src/airflow/providers/amazon/aws/auth_manager/router/login.py
+++ 
b/providers/amazon/src/airflow/providers/amazon/aws/auth_manager/router/login.py
@@ -84,7 +84,7 @@ def login_callback(request: Request):
     token = get_auth_manager().generate_jwt(user)
     response = RedirectResponse(url=url, status_code=303)
 
-    secure = conf.getboolean("api", "ssl_cert")
+    secure = conf.has_option("api", "ssl_cert")
     response.set_cookie(COOKIE_NAME_JWT_TOKEN, token, secure=secure)
     return response
 
diff --git a/providers/fab/src/airflow/providers/fab/www/views.py 
b/providers/fab/src/airflow/providers/fab/www/views.py
index b14d2eb22c1..f4e22508c5f 100644
--- a/providers/fab/src/airflow/providers/fab/www/views.py
+++ b/providers/fab/src/airflow/providers/fab/www/views.py
@@ -70,7 +70,7 @@ class FabIndexView(IndexView):
             token = get_auth_manager().generate_jwt(g.user)
             response = make_response(redirect(f"{conf.get('api', 
'base_url')}", code=302))
 
-            secure = conf.getboolean("api", "ssl_cert")
+            secure = conf.has_option("api", "ssl_cert")
             response.set_cookie(COOKIE_NAME_JWT_TOKEN, token, secure=secure)
 
             return response

Reply via email to