-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2954 - Remove SESSION_TIMEOUT #3020
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3020 +/- ##
===========================================
- Coverage 92.71% 92.71% -0.01%
===========================================
Files 277 277
Lines 7486 7478 -8
Branches 672 672
===========================================
- Hits 6941 6933 -8
Misses 443 443
Partials 102 102
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
|
||
This is managed in `tdrs-backend/tdpservice/settings/common.py` with the following setting: | ||
```python | ||
SESSION_COOKIE_AGE = 15 * 60 # 30 minutes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit: should be # 15 minutes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be curious to know if Alex knows that the timeout is going to be even shorter now? I know the 30 minute timeout was not something she liked. Otherwise, this all looks good!
SESSION_EXPIRE_AT_BROWSER_CLOSE = True | ||
SESSION_COOKIE_AGE = 30 * 60 # 30 minutes | ||
SESSION_COOKIE_AGE = 15 * 60 # 15 minutes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find out what prod exp is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: If @ADPennington want to have extended session cookie, then you should be able to set the session at login to a different value for admin users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtimpe lgtm 🚀 thanks for cleaning up the session-related code. Please note:
- tested that session ends after 15 minutes for acf and login.gov users
- the session is ultimately too short, especially for ACF users actively using the system during the day, so @robgendron we recommend moving up As a TDP user, I need to stay logged in when I'm actively using the system #3060 in the sprint backlog. cc: @lfrohlich @ttran-hub
Summary of Changes
Pull request closes #2954
SESSION_TIMEOUT
which hasn't controlled the session timeout since 2822 fix webinspect medium priority - persistent session #2911extendSESSION_COOKIE_AGE
to match the expiration of the jwt provided by login.gov - the expiration in the dev environment was only 15 minutesHow to Test
That's basically it, nothing changes about our signin workflow. The values set by
SESSION_TIMEOUT
were being overriden bySESSION_EXPIRE_AT_BROWSER_CLOSE
's behavior of removing theExpires=
from the cookie. You can run the tests from #2911 that verify the session cookie behavior.Deliverables
More details on how deliverables herein are assessed included here.
Deliverable 1: Accepted Features
Checklist of ACs:
SESSION_COOKIE_AGE
(match or lower than login.gov jwt expiration)SESSION_TIMEOUT
variable incommon.py
and usages throughout the authentication apilfrohlich
and/oradpennington
confirmed that ACs are met.Deliverable 2: Tested Code
CodeCov Report
comment in PR)CodeCov Report
comment in PR)Deliverable 3: Properly Styled Code
Deliverable 4: Accessible
iamjolly
andttran-hub
using Accessibility Insights reveal any errors introduced in this PR?Deliverable 5: Deployed
Deliverable 6: Documented
Deliverable 7: Secure
Deliverable 8: User Research
Research product(s) clearly articulate(s):