Skip to content

Require logging in again when OIDC tokens can't be refreshed#22449

Open
marius-mather wants to merge 9 commits intogalaxyproject:devfrom
AustralianBioCommons:oidc-require-refresh
Open

Require logging in again when OIDC tokens can't be refreshed#22449
marius-mather wants to merge 9 commits intogalaxyproject:devfrom
AustralianBioCommons:oidc-require-refresh

Conversation

@marius-mather
Copy link
Copy Markdown
Contributor

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_refresh config flag.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added area/testing area/auth Authentication and authorization labels Apr 10, 2026
@github-actions github-actions bot added this to the 26.1 milestone Apr 10, 2026
@mvdbeek
Copy link
Copy Markdown
Member

mvdbeek commented Apr 14, 2026

@uwwint do you want to take a look at this ?

Copy link
Copy Markdown
Member

@nuwang nuwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me except for one minor issue.

log.info("OIDC refresh failed terminally for provider `%s`, forcing re-login", reauth_provider)
if self.galaxy_session:
self.handle_user_logout()
if self.environ.get("is_api_request", False):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a test case for the API auth case may be missing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries, I've added unit tests for API requests

@uwwint
Copy link
Copy Markdown
Contributor

uwwint commented Apr 15, 2026

@uwwint do you want to take a look at this ?

I was involved in this one @mvdbeek ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication and authorization area/testing

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

4 participants