Honour OIDC prompt=login / select_account / max_age in /oauth/login #4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split out from #2 (the consent-screen "use a different account" affordance and the Phase 1 account chooser shipped in PR #3; this is the remaining optional thread).
/oauth/login(src/oauth/login.rs) accepts the existing Kratos session whenever one is present and only forces re-auth for anacr_values=aal2step-up. It does not honour the OIDCpromptandmax_ageparameters, so a relying party cannot force re-authentication or account selection.Goal
Honour, at the Hydra login phase:
prompt=login- force a fresh authentication even when a Kratos session exists.max_age=N- force re-auth when the session'sauthenticated_atis older than N seconds.prompt=select_account- force account selection (in practice, the logout + fresh login path the chooser already uses).Why it was deferred (design constraints)
OAuth2ConsentRequestOpenIdConnectContext) does not exposepromptormax_age; they have to be parsed out ofrequest_url(the same pattern as the existingorganization_idparsing).skipalone can't drive this:skip=falseis also the normal first-time SSO case, so forcing re-auth onskip=falsewould break SSO. Theprompt/max_agevalues must be read explicitly.prompt=loginand bouncing to/loginreturns to the samelogin_challengewithprompt=loginstill inrequest_url, which re-forces indefinitely.max_age=N(N>0) breaks the loop naturally becauseauthenticated_atupdates after a refresh login (state-based, like the AAL2 step-up);prompt=login(andmax_age=0) need a one-shot marker carried on Forseti's ownreturn_toto break it.prompt=select_accountis accepted but ignored by Hydra (ory/hydra#1943), so Forseti must drive it itself (the chooser's logout + login path).max_age=0has a Hydra skip bug (ory/hydra#3034); parsingrequest_urlourselves sidesteps it.Notes
/loginalready supportsrefresh=true(Kratos privileged re-auth), which is the mechanism to force credential re-entry; the carve-out inauth/login.rsalready prevents the bounce-back whenrefresh=true.