vincbeck commented on code in PR #72825:
URL: https://github.com/apache/airflow/pull/72825#discussion_r3990624349


##########
providers/fab/provider.yaml:
##########
@@ -208,11 +208,34 @@ config:
       session_lifetime_minutes:
         description: |
           The UI cookie lifetime in minutes. User will be logged out from UI 
after
-          ``[fab] session_lifetime_minutes`` of non-activity
+          ``[fab] session_lifetime_minutes`` of inactivity: the deadline 
slides forward on every
+          request, so it is only reached once the session has been idle for 
the whole period.
+
+          Note that leaving an Airflow UI tab open counts as activity even 
when nobody is at the
+          keyboard. The UI polls the API in the background and silently 
re-authenticates whenever
+          its API token expires, which keeps sliding the deadline, so a 
session with an open tab is
+          never idle and never expires. Use ``[fab] 
session_max_lifetime_minutes`` to log users out
+          after a fixed period regardless of activity.
         version_added: 2.0.0
         type: integer
         example: ~
         default: "43200"
+      session_max_lifetime_minutes:
+        description: |
+          Maximum lifetime of a UI session in minutes, counted from the login 
time and never
+          extended by activity. Unlike ``[fab] session_lifetime_minutes``, 
this deadline is
+          reached even when the user keeps working in the UI, so it forces 
periodic
+          re-authentication. Set to ``0`` (the default) to disable it.
+
+          The session is only checked when the UI talks to the auth manager, 
which it does when
+          its API token expires, so ``[api_auth] jwt_expiration_time`` bounds 
how precisely the
+          deadline is enforced: with the default 24 hour token, a shorter 
maximum lifetime still
+          takes up to 24 hours to log the user out. Set ``[api_auth] 
jwt_expiration_time`` no

Review Comment:
   I agree actually and I fixed it. Now it takes the min between 
`jwt_expiration_time` and this new config



-- 
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