Add External Identity Provider (IdP) Federation Support#664
Conversation
- Add IdentityProvider and FederatedIdentity domain models with OIDC/SAML support - Add IdentityProviderRepository and FederatedIdentityRepository interfaces - Add database migration for identity_providers and federated_identities tables
- Add IdentityProviderRepository with CRUD operations for IdP configurations - Add FederatedIdentityRepository for user-IdP linkage management
- Add IdentityProviderService for external IdP federation (OIDC callback, JIT provisioning) - Add JWTService for token generation/validation supporting SSO sessions
- Add IdentityProviderHandler with SSO endpoints (OIDC/SAML) and admin CRUD - Add JWTAuth middleware supporting both JWT Bearer and API Key authentication
…ontainer - Add IdP and FederatedIdentity to Repositories struct - Add IdP and JWT to Services struct with proper initialization - Add SSO routes and admin identity-providers management routes
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
✨ 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 |
…idation - Add JWKS caching and RSA signature verification to ValidateOIDCToken - Implement PKCE with code_verifier/code_challenge in OIDC flow - Add state parameter validation for CSRF protection in OIDC callback - Add tenant-scoped IdP routes (POST/GET/DELETE /tenants/:id/identity-providers) - Fix error context preservation in createJITUser (correct error handling) - Fix base64URLDecode padding issue - Add GeneratePKCEPair and GenerateState helper functions - Update port interface signatures with pkceVerifier and jwksURI params
- Add audience (aud) claim validation against ClientID - Return error when FederatedIdentity.Create fails to prevent duplicate users - Add SAML assertion parsing with goxmldsig for signature validation - Add beevik/etree for XML parsing
Summary
Changes
IdentityProviderandFederatedIdentitymodels with OIDC/SAML configurationIdentityProviderRepository,FederatedIdentityRepository,IdentityProviderServiceinterfacesIdentityProviderServicewith OIDC callback handling, JIT provisioning, and group-to-role mappingJWTServicefor token generation/validation supporting SSO sessionsIdentityProviderHandlerwith SSO endpoints and admin CRUD operationsJWTAuthmiddleware supporting bothAuthorization: BearerandX-API-Keyauthenticationidentity_providersandfederated_identitiestables/auth/sso/oidc/*,/auth/sso/saml/*, and/admin/identity-providersroutesAPI Endpoints
/auth/sso/oidc/:idp_id/auth/sso/oidc/:idp_id/callback/auth/sso/saml/:idp_id/auth/sso/saml/:idp_id/acs/admin/identity-providers/admin/identity-providers/admin/identity-providers/:idNotes
crewjam/samldependency for full SAML SP supportgolang-jwt/jwt/v4already in go.mod