Feature #16679
closedOption to store token in session storage & idle timeout
Description
Option for Workbench 2 to store token in session storage instead of local storage, so that when the tab/browser is closed, the token is discarded.
"Open in new tab" operations should pass along the token (if possible) to avoid making the user log in again.
We should also add an idle timeout, it looks like we can do this via a react component:
https://blog.bitsrc.io/how-to-implement-idle-timeout-in-react-830d21c32942
Confirm (with tests) that Workbench 2 normal logout hits the API logout endpoint and expires the token.
Updated by Peter Amstutz over 4 years ago
- Related to Idea #16520: GxP Qualification added
Updated by Peter Amstutz over 4 years ago
- Target version set to 2020-09-09 Sprint
Updated by Lucas Di Pentima over 4 years ago
- Assigned To set to Lucas Di Pentima
Updated by Lucas Di Pentima over 4 years ago
From chat: We could publish the Login.TokenLifetime
setting and use that to decide where to store the token.
Updated by Peter Amstutz over 4 years ago
- Description updated (diff)
- Subject changed from Option to store token in session storage to Option to store token in session storage & idle timeout
Updated by Lucas Di Pentima over 4 years ago
- Status changed from New to In Progress
Updated by Lucas Di Pentima over 4 years ago
Updates at 201e2b7e3 - branch 16679-wb2-idle-timeout-config
Test run: developer-run-tests: #2061
- Adds
Workbench.IdleTimeout
config knob for workbench2
Updated by Lucas Di Pentima over 4 years ago
Update at 0b38c1d85
- Exports
Login.TokenLifetime
so that can be used by Workbench2 to store tokens on session storage.
Updated by Peter Amstutz over 4 years ago
Lucas Di Pentima wrote:
Update at 0b38c1d85
- Exports
Login.TokenLifetime
so that can be used by Workbench2 to store tokens on session storage.
LGTM
Updated by Lucas Di Pentima over 4 years ago
Updates at arvados-workbench2|2a15974a - branch 16679-token-security-enhancements
Test run: developer-tests-workbench2: #88
- Adds tests confirming that the logout endpoint is hit on logout.
- Adds auto logout component that gets used when
Workbench.IdleTimeout
config is non-zero, with tests. - Uses session storage on auth services when
Login.TokenLifetime
config is non-zero. - Removes
sessions
list from storage on logout, as tokens are also saved there.
Updated by Peter Amstutz over 4 years ago
My only comment is that switching to session storage should probably be linked to enabling Workbench.IdleTimeout, not TokenLifetime. The rest LGTM.
Updated by Anonymous over 4 years ago
- % Done changed from 50 to 100
- Status changed from In Progress to Resolved
Applied in changeset arvados-workbench2|ecd0b3c069eed7d411e3cec7d707b43ab6675081.