Require logging in again when OIDC tokens can't be refreshed#22449
Require logging in again when OIDC tokens can't be refreshed#22449nuwang merged 24 commits intogalaxyproject:devfrom
Conversation
|
@uwwint do you want to take a look at this ? |
nuwang
left a comment
There was a problem hiding this comment.
Looks good to me except for one minor issue.
Code Review — Require logging in again when OIDC tokens can't be refreshedCode Structure (type annotations & imports)lib/galaxy/authnz/managers.py — typing gaps on new/touched signatures:
lib/galaxy/webapps/base/webapp.py — lib/galaxy/config/init.py, test/unit/authnz/test_authnz.py — clean. Minor: the relative import Dependency InjectionNo new DI violations. Both Tests (mocking / patches)Four/five new tests. The first two exercise real manager logic with a mocked backend; the last three stub the manager wholesale, which weakens them. Concerns:
Top recommendations
Overall: small, focused change that follows surrounding patterns. Fixes are minor — primarily typing polish and test quality improvements. |
|
The package unit test failures are real though. |
|
Thanks @mvdbeek - test failures should be fixed now |
| default: false | ||
| required: false | ||
| desc: | | ||
| Require a current OIDC session. Users will be redirected to OIDC login if refresh fails. |
There was a problem hiding this comment.
This can only be enabled if all OIDC backends support refresh, right ? I think that's an important gotcha and maybe reason enough to push this into the backend instead ?
There was a problem hiding this comment.
@mvdbeek Can you clarify what you meant by push this into the backend? But in any case, @marius-mather, perhaps a clarifying note indicating that all OIDC backends will need to support refresh would be useful?
There was a problem hiding this comment.
Push that setting into the OIDC backend config
There was a problem hiding this comment.
@mvdbeek the refresh config has been pushed down to the individual provider level now
nuwang
left a comment
There was a problem hiding this comment.
Looks great to me @marius-mather!
We want to ensure users have a current, valid access token from the OIDC provider, so when attempting to refresh (due to access token expiry), log the user out and redirect to OIDC login. This is gated behind an
oidc_require_refreshconfig flag.How to test the changes?
(Select all options that apply)
License