pierrejeambrun commented on code in PR #55506:
URL: https://github.com/apache/airflow/pull/55506#discussion_r2394789160


##########
providers/fab/src/airflow/providers/fab/www/views.py:
##########
@@ -70,8 +70,8 @@ def index(self):
             token = get_auth_manager().generate_jwt(g.user)
             response = make_response(redirect(f"{conf.get('api', 'base_url', 
fallback='/')}", code=302))
 
-            secure = bool(conf.get("api", "ssl_cert", fallback=""))
-            response.set_cookie(COOKIE_NAME_JWT_TOKEN, token, secure=secure)
+            secure = request.scheme == "https" or bool(conf.get("api", 
"ssl_cert", fallback=""))
+            response.set_cookie(COOKIE_NAME_JWT_TOKEN, token, secure=secure, 
httponly=True)

Review Comment:
   This just made me realize that new version of the provider that sets 
`httponly=True` won't be compatible with older airflow version where the UI 
still manipulates the cookie with JS.
   
   Should we have a new major version or something for providers ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to