Enable SSO and RP-initiated logout for the console application#4242
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughConsole authentication now performs an SSO check before credential prompting, while credentials continue through a session task. A confirmation-based sign-out flow is added, enabled for the Console application, and configured with OAuth post-logout redirects. E2E login execution now uses a challenge token. ChangesConsole authentication and sign-out
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Console
participant SSOCheckExecutor
participant SessionExecutor
participant AuthorizationCheck
Console->>SSOCheckExecutor: Check existing SSO session
SSOCheckExecutor->>SessionExecutor: Route on success
SessionExecutor->>AuthorizationCheck: Continue authentication
SSOCheckExecutor->>Console: Route to credential prompt on failure
sequenceDiagram
participant Console
participant PromptConfirm
participant SessionSignOutExecutor
participant IdentityProvider
Console->>PromptConfirm: Request sign-out confirmation
PromptConfirm->>SessionSignOutExecutor: Submit confirmation
SessionSignOutExecutor->>IdentityProvider: Perform session logout
IdentityProvider-->>Console: Redirect to post-logout URI
Possibly related PRs
Suggested reviewers: 🚥 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 |
f0fd4ec to
1b146ab
Compare
Add SSO reuse to the console login flow (SSOCheckExecutor + SessionExecutor) and a sign-out flow (SIGNOUT) that confirms, then terminates the session via SessionSignOutExecutor. The console's signOut() performs OIDC RP-Initiated Logout through the SDK default (no client config); link the sign-out flow to the console client and register its post-logout redirect URIs. Update the E2E admin-token bootstrap (pr-builder.yml) to advance the console login flow past the new SSO check before submitting credentials. Fix the patch coverage gate to treat a diff with zero coverable lines as a pass: Codecov reports these as coverage 0 with zero patch lines (not null), which the gate previously read as 0% and failed.
1b146ab to
ff05446
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Purpose
This PR enables SSO for the console login flow (reuse an existing session instead of forcing a fresh login) and adds OIDC RP-Initiated Logout for console sign-out.
Today the console login flow does not use SSO, so each sign-in is a fresh authentication and sign-out only clears the local session. Introducing SSO establishes a server-side session, which then has to be terminated on sign-out rather than left to expire. So this change pairs the SSO login flow with a console sign-out flow: signing out now confirms, terminates the SSO session server-side, and returns the user to the console.
Approach
01-default-resources.yaml):SSOCheckExecutorstep (reuse the existing session when present) followed by aSessionExecutorstep (establish/refresh it).flowType: SIGNOUT): a confirmation prompt, then session termination viaSessionSignOutExecutor. Node layout mirrors the "Basic Sign Out Flow" template so the graph renders cleanly.signOutFlowId+isSignOutFlowEnabled) and registerspostLogoutRedirectUris.signOut()performs RP-Initiated Logout via the SDK default (redirect to theend_session_endpoint, then back to the console).DashboardLayoutgets an explanatory comment only; the generic-OIDC path is unchanged (it logs out at the external IdP directly and never calls the SDKsignOut()).Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit
New Features
Bug Fixes
Documentation