-
Notifications
You must be signed in to change notification settings - Fork 3.5k
OIDC enabled #8554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OIDC enabled #8554
Conversation
|
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR adds comprehensive OpenID Connect (OIDC) authentication support to the platform. It includes a new OIDC provider implementation, admin configuration interface, user-facing login button, backend endpoints with state and nonce validation, and configuration management across frontend and backend services. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WebApp as Web App
participant Backend as Backend
participant OIDCProvider as OIDC Provider
participant Redis
User->>WebApp: Click OIDC Login Button
WebApp->>Backend: GET /auth/oidc (with optional next_path)
Backend->>Backend: Generate state & nonce
Backend->>Redis: Store nonce (state-scoped)
Backend->>Backend: Store nonce in session
Backend->>WebApp: Redirect to OIDC authorization URL
WebApp->>OIDCProvider: GET authorization endpoint
OIDCProvider->>User: Display login & consent screen
User->>OIDCProvider: Authenticate & grant consent
OIDCProvider->>WebApp: Redirect to callback with code & state
WebApp->>Backend: GET /auth/oidc/callback?code=X&state=Y
Backend->>Backend: Validate state vs session
Backend->>OIDCProvider: POST token endpoint (code, client_id, secret)
OIDCProvider->>Backend: Return access_token, id_token, refresh_token
Backend->>Backend: Validate ID token (JWKS, audience, issuer, nonce)
Backend->>Backend: Extract user info from ID token claims
Backend->>Backend: Create/update user account
Backend->>Backend: Log in user (is_app=True)
Backend->>WebApp: Redirect to final destination
WebApp->>User: Display authenticated app
sequenceDiagram
participant Admin as Admin User
participant AdminUI as Admin UI
participant Backend as Backend
participant Database as Database
Admin->>AdminUI: Navigate to OIDC settings page
AdminUI->>Backend: GET instance config (SWR)
Backend->>Database: Query instance configurations
Database->>Backend: Return OIDC config state
Backend->>AdminUI: Return formatted config
AdminUI->>Admin: Render form with current values
Admin->>AdminUI: Toggle IS_OIDC_ENABLED or enter credentials
AdminUI->>Backend: POST updateInstanceConfigurations
Backend->>Database: Update instance configuration
Database->>Backend: Confirm update
Backend->>AdminUI: Return success + updated config
AdminUI->>Admin: Show success toast & reset form
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing touches
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 |
OIDC enabled
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.