Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe default authentication flow now checks the session through ChangesDefault authentication flow
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Start
participant SSOCheckExecutor
participant CredentialsAuthExecutor
participant SessionExecutor
participant Authorization
Start->>SSOCheckExecutor: Check session checkpoint
alt Session check succeeds
SSOCheckExecutor->>SessionExecutor: Route to session
else Session check fails
SSOCheckExecutor->>CredentialsAuthExecutor: Route to credential prompts
CredentialsAuthExecutor->>SessionExecutor: Route successful authentication to session
end
SessionExecutor->>Authorization: Continue to authorization
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The default authentication flow now routes existing and newly created sessions through the shared session path without an identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
f874dfe to
905388a
Compare
The SSO session nodes were only wired into the console application's flow, so every other application, including any client created through dynamic registration, ran a graph that went straight from start to prompt_credentials and never consulted an existing session. That makes the OIDC session parameters unanswerable for those applications. A prompt=none request cannot be honored because there is no session to find, id_token_hint cannot identify an already-authenticated subject, and a request whose max_age the existing authentication still satisfies re-authenticates anyway and moves auth_time forward. Add the same sso_check and session nodes the console flow already carries to the default authentication flow: start branches to sso_check, which continues to session on a hit and falls back to prompt_credentials on a miss, and the credentials path now passes through session so a fresh login is recorded.
905388a to
3ae7b7b
Compare
Purpose
The SSO session nodes were wired into the console application's authentication flow only. Every other application, including any client created through dynamic registration, ran the default flow, whose graph went straight from
starttoprompt_credentialsand never consulted an existing session.That leaves the OIDC session parameters unanswerable for those applications:
prompt=nonecannot be honored, because there is no session to find. The authorization endpoint decides this against the resolved session, and a flow that never resolves one has nothing to offer it.id_token_hintcannot identify an already-authenticated subject.max_agethe existing authentication still satisfies re-authenticates anyway, which also movesauth_timeforward when it should have stayed put.These are OIDC Core 3.1.2.1 behaviours, so the gap is visible to any relying party that uses them, not only to a conformance run.
Approach
Add to the default authentication flow the same two nodes the console flow already carries:
startbranches tosso_checkinstead ofprompt_credentials.sso_check(SSOCheckExecutor,checkpointRef: session) continues tosessionon a hit and falls back toprompt_credentialson a miss.credentials_authnow continues tosessionrather than straight toauthorization_check, so a fresh login is recorded as a session for later requests to reuse.The node definitions are copied from the console flow, so both graphs now express the same SSO behaviour. No executor or service code changes: this is a flow-graph change only, wiring up executors that already exist.
The console application's flow is untouched.
Old Flow
New Flow
Measured effect
Against the OIDC conformance suite's Basic OP profile, with the default flow used by a dynamically registered client:
oidcc-prompt-none-logged-inoidcc-max-age-10000oidcc-id-token-hintPlan total went from 32/35 to 34/35. The remaining failure is unrelated to this change and is addressed separately.
Related Issues
Related PRs
Checklist
Summary by CodeRabbit