Skip to content

security(auth): SAML endpoints refuse every request until assertions are verified #866

Closed

Description

@alex-dembele

Problem (user terms)

The SAML endpoints are mounted on every deployment, including the many that never configured SAML. The assertion consumer service does not yet check assertions the way an identity-provider integration must. Until it does, it should refuse every request instead of opening sessions.

SAML sign-in has never been proven end to end (ROADMAP, module 2: "SAML2 : non prouvé live"), so no working flow is lost.

Tracked privately as GHSA-gp2h-chq2-gxx4. Details stay in the advisory until it is published.

Acceptance criteria

  1. POST /api/v1/auth/saml2/acs creates no session and no user, whatever it receives. It redirects to /login?error=provider_not_configured&provider=saml2.
  2. GET /api/v1/auth/saml2/login redirects to the same place instead of building an IdP request.
  3. The code that turned an assertion into a user and a session is removed (provisionSAML2User, applyGroupRoleMapping, the assertion structs), not left unreachable.
  4. GET /api/v1/auth/saml2/metadata is unchanged.
  5. The README and docs stop presenting SAML2 as available.
  6. Tests: the ACS refuses a well-formed success response, refuses an empty body, and sets no session cookie. The login endpoint redirects.

Definition of done

  • go test ./... -count=1 green, go vet clean.
  • The README and SAML docs match the code.
  • PR with Closes #<n>.
  • After the merge and release, the advisory is published with the patched version.

Out of scope

Real SAML support (a maintained library that verifies signed assertions). That needs an ADR and a dependency decision.

Activity

  1. added this to the trust-v1 milestone on Oct 1, 2026
  2. added
    area:enterpriseEnterprise platform capabilities
    priority:P0Blocking: nothing else ships until this closes
    type:securitySecurity defect or hardening
    priority:P0-criticalProduction broken or exposed — work now
    status:readyMeets the ready definition
    trustEvidence a buyer's CISO tests before features matter
    tier:0-trustTrust: security, isolation, evidence integrity
    and removed
    status:readyMeets the ready definition
    on Oct 1, 2026
  3. alex-dembele commented on Oct 1, 2026

    @alex-dembele
    MemberAuthor

    backend-go, 2026-10-01

    Done

    • backend/internal/handler/saml2_handler.go: the ACS and the SAML login redirect to /login?error=provider_not_configured&provider=saml2 and create nothing. The assertion-to-session code is removed (369 → 64 lines). The metadata endpoint is unchanged.
    • New tests in saml2_handler_test.go.
    • README, API_COMPLETE_ENDPOINTS.md, ENDPOINTS.md, API_SECURITY_GUIDE.md and SAML_OAUTH2_INTEGRATION.md updated.
    • PR fix(auth): SAML endpoints refuse every request until assertions are verified (#866) #868.

    Verified

    Criteria 1 ✅ · 2 ✅ · 3 ✅ · 4 ✅ · 5 ✅ for README and docs. The pricing and self-hosting plan tables are left to the owner. 6 ✅

    Next

    1. Owner merges fix(auth): SAML endpoints refuse every request until assertions are verified (#866) #868, ideally before fix(auth): SSO sign-in lands signed in, session in cookies (#803) #863.
    2. Cut the next release.
    3. Publish the private advisory with the patched version.
    4. Record the "SAML via a maintained library" decision in docs/DECISIONS.md and open its issue once the advisory is public.

    Blocked on @owner: merge, and the pricing table wording.

  4. added a commit that references this issue on Oct 2, 2026
  5. added 2 commits that reference this issue on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendGo, /internal, /pkgarea:enterpriseEnterprise platform capabilitiespriority:P0Blocking: nothing else ships until this closespriority:P0-criticalProduction broken or exposed — work nowstatus:in-reviewPR opentier:0-trustTrust: security, isolation, evidence integritytrustEvidence a buyer's CISO tests before features mattertype:securitySecurity defect or hardening

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions