Start with when to set allowed_login_redirect_hosts and how a site links
to the login page, then the entry rules, what trusting a host means and
how to tell why a target was refused. Drop details of how the check
works.
Cover percent-encoding the target, the entry format, the log message for
refused targets, when users land on the linked identities page instead,
and what trusting a host implies.
Admins can list external https hosts that the login redirect may send
users back to. is_safe_login_redirect accepts what is_safe_local_redirect
accepts plus https URLs on those hosts; root.login and password login use
it, and the client's logged-in guard follows allowed external targets.
The option is empty by default, which keeps the current behaviour.
LoginForm no longer runs the returned redirect through encodeURI, which
double-encoded percent-escapes already in the target.
acr_values, login_hint, max_age, ui_locales and display already work through
oidc_config.xml Setters (social-auth-core >= 4.7.0), per provider via the PSA
backend-name prefix. Document the prefix rule, the names that differ from the
provider name, and that acr_values is a request Galaxy does not verify.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OIDC account confirmation (#24084 via 26.0/26.1): dev's PKCE cookie
code goes away the same way as on 26.1, and the integration test helpers
drop the remove_cookie option. The two dev-only authenticate() scope tests
patch out FlowState, since their mocked do_auth sets no OAuth state.
flow_state.py gets the type arguments dev's strict mypy needs. The
NewUserConfirmation tests are ported to Vue 3 test utils (props/global,
setValue, currentRoute.value, aria-disabled on GButton).
#24071: keep dev's requests-based http.py, as the PR asks; port the two
tests whose behaviour dev shares (unsafe query characters are encoded,
already-encoded URLs are unchanged) to the responses mock. Dev normalizes
invalid and unreserved escapes and IDNA-encodes hosts, so the other new
26.1 tests don't apply.
The pulsar-galaxy-lib cap (#24056) is not carried to dev, per that PR.
Port the OIDC account confirmation fix to 26.1's PSA backend. The
authentication record in FlowState now carries the PKCE code verifier
to the callback, replacing the encrypted verifier cookie from #23836
(the cookie helpers, their constants and the cookie test go away, and
the admin PKCE docs describe the server-side record). Deferred account
creation keeps 26.1's activation policy (create_and_activate_oidc_user)
and the GALAXY_TRANS pipeline config. The Keycloak integration tests
keep 26.1's driver restart and extra_provider_config setup.
Keep the pulsar-galaxy-lib <0.16 cap on top of 26.1's >=0.15.15 floor.
With pkce_support enabled, a callback without a verifier (cookie blocked,
expired, or removed) now fails in Galaxy before the token request, with a
message pointing at the cookie. The login no longer depends on the IdP
rejecting a code exchange without a verifier.
The PKCE session key and the new exception live in oidc_utils, so
psa_authnz and managers import without the conditional pkce dependency;
galaxy.tools.data_fetch_utils imports psa_authnz on every Galaxy server.
I pulled in this doc https://galaxyproject.org/develop/authentication/ which was very dated and somewhat incorrect and I filled it out with more details, updated configuration information, and a whole new section on the authentication framework. I also pulled in this doc https://galaxyproject.org/admin/user-accounts/ which was pretty good and I left it largely unchanged.
Rebased to fix index inclusion and with edits suggested by :eagle:👀.