Skip to content

Support for maximum session lifetime#49

Merged
dave2wave merged 6 commits intoapache:mainfrom
alitheg:patch-1
Feb 20, 2026
Merged

Support for maximum session lifetime#49
dave2wave merged 6 commits intoapache:mainfrom
alitheg:patch-1

Conversation

@alitheg
Copy link
Contributor

@alitheg alitheg commented Feb 2, 2026

We implemented a maximum session lifetime as part of the Trusted Releases platform, but thought we should contribute it back. Feedback welcome!

@gstein
Copy link
Member

gstein commented Feb 2, 2026

I implemented cookie/session lifetimes in infrastructure-idm ... I believe that the lifetime is an application concern, rather than a parameter to the .read() method. To this end, I'd suggest something in config.yaml and/or a parameter when the app is constructed, which is then used to restrict all session lifetimes regardless of .read() usage.

And to be clear: the quart session cookie has an HMAC on it, to prevent tampering. That is the purpose of secret_key. (IDM didn't have asfquart, so it was doing the HMAC on its own)

@alitheg
Copy link
Contributor Author

alitheg commented Feb 2, 2026

I've put it in there as a config parameter instead of an argument. In ATR we load our config programmatically (app.config.from_object(app_config)) and I thought it would be less clean to pass one of the app_config properties into asfquart.construct before then passing the whole config in again once the app exists.

@alitheg
Copy link
Contributor Author

alitheg commented Feb 10, 2026

@dave2wave I pulled my fork into my local copy of ATR - setting this setting makes the app redirect to the login page once the session expires, and on logging back in the user goes right back where they wanted to be.

@dave2wave dave2wave merged commit 64f2074 into apache:main Feb 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants