Skip to content

SAML S1 — core: samael module, signed metadata + Web Browser SSO on the minimal IdP #13793

Backlog

Description

@dezren39

Build slice S1 from the SAML design record for the minimal IdP (story #13658, design issue #13687, record merged in PR #13792: doc/2026-11-23T21-48-44Z_design_idp_saml/).

Scope (record §§2–5)

  • Add a saml module to pkgs/idp-provider on samael (pinned exact version; all samael types stay inside the module). The provider's Nix packaging gains the libxmlsec native dependency samael's default xmlsec feature needs.
  • Provider config gains SP registrations: entityID, ACS URL(s), optional request-signing certificate, attribute release set, require-signed-requests flag. Static config only — no dynamic metadata fetching.
  • Endpoints: GET /saml/metadata (IdP metadata generated from live config, signed with the Slice 2 SAML key, serial 1002, loaded via IDP_PROVIDER_SAML_KEY + the existing vault-passphrase path) and GET|POST /saml/sso — AuthnRequest via HTTP-Redirect binding in, Response via HTTP-POST binding out.
  • Authentication at the SSO endpoint reuses the provider's existing local-door login (same credential check); the assertion names the one account row. Deny-by-default holds: unregistered SP, non-allowlisted identity, or unlinked link state (SSO (#9077): account linking UI/flow with retained identity history #13415) → denial + audit record, no assertion.
  • Assertion discipline per the record: signed assertion and response (RSA-SHA256), persistent NameID = account_id, attributes roles (multi-valued, design(pm-stack): one identity across the stack — SSO propagation from the public entry into every layer, roles replace asserted authorship #1253 strings) + displayName per the SP's release set, 5-minute conditions window, InResponseTo echo, Audience = SP entityID, Recipient = registered ACS, assertion-ID replay cache.

Acceptance

  • The record's §6 step-1 suite, as integration tests: a local test SP built on samael's SP side completes SP-initiated SSO against the provider; the roles attribute arrives intact; negative tests pass — signature-wrapping attempt rejected, replayed assertion rejected, expired assertion rejected, wrong-ACS request rejected, unregistered SP denied and audited.
  • Audit events for SAML issuance and denials land in the existing append-only audit log with the record's reason codes.
  • Existing OIDC tests and behavior unchanged; full crate test suite green.
{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T21:51:00Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Triage (oc-code-01, 2026-11-24): design record PR #13792 is merged, so S1 is ready. It is a build slice (samael module, provider SP config, metadata and SSO endpoints, Nix libxmlsec packaging, failing-first tests). This lane cannot run the worktree or fleet build it needs. Left open for an implementation session; no open question blocks it.

  3. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Triage verdict (lane oc-code-04, fleet task 22426): work remains, not resolved.

    Sizing: feature-scale (effort/l). Route as a feature slice on this issue, not a close. Left open.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions