Skip to content

fix(AUD-008): SSO/OIDC con verificación de firma real - #104

Merged
axljuega merged 1 commit into
masterfrom
fix/AUD-008-sso-oidc-verification-125475925907716905
Aug 28, 2026
Merged

fix(AUD-008): SSO/OIDC con verificación de firma real#104
axljuega merged 1 commit into
masterfrom
fix/AUD-008-sso-oidc-verification-125475925907716905

Conversation

@Axlfc

@Axlfc Axlfc commented Aug 28, 2026

Copy link
Copy Markdown
Owner

This PR implements SSO authentication for Cognito (AUD-008):

  1. OIDC Provider (app/core/sso/oidc.py): Real RS256/ES256 JWKS signature verification using PyJWT and cryptography, Authorization Code flow, and strict token claim validation.
  2. SSO Service (app/core/sso/service.py): Auto-provisions new users or updates existing users in DB upon first login, maps users to organizations via email domain rules (COGNITO_SSO_DOMAIN_MAP), binds sessions via SessionManager (auth_type="authenticated_sso"), and logs structured SIEM audit events (auth.sso_login, auth.sso_logout).
  3. REST API (app/api/routes/auth.py): Exposes /api/auth/sso/login, /api/auth/sso/callback, and /api/auth/sso/logout.
  4. SAML 2.0 Stub (app/core/sso/saml.py): Typed SAMLProvider stub following the AUD-003 VaultSecretsProvider pattern.
  5. Tests (tests/test_sso_oidc.py): Complete test suite covering E2E flow with mock IdP, explicit rejection of tampered token signatures, user auto-provisioning, session binding, audit logs, and SAML stub behavior.
  6. Documentation (AUDIT_MASTER.md): Updated AUD-008 status to "Corregido".

PR created automatically by Jules for task 125475925907716905 started by @Axlfc

Implement SSO authentication using OIDC with real RS256/ES256 JWKS signature verification,
auto-provisioning users linked to organizations by email domain rules, issuing Cognito sessions,
and logging SIEM audit events. Includes a documented SAML 2.0 provider stub.

Co-authored-by: Axlfc <14998495+Axlfc@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@axljuega
axljuega merged commit 4ada7fe into master Aug 28, 2026
8 of 9 checks passed
@axljuega
axljuega deleted the fix/AUD-008-sso-oidc-verification-125475925907716905 branch August 28, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants