Skip to content

SAML S4 — doors for SAML + SAML key rollover parity #13796

Backlog

Description

@dezren39

Build slice S4 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/). Later-parity slice: depends on S1 (SAML core) and on the federation doors' live registrations (#13411/#13412/#13414) for its full form.

Scope (record §7 S4)

  • Doors for SAML: the SAML SSO endpoint authenticates through the federation doors as well as the local door — the user arrives via GitHub/Google/Microsoft, lands on the same account row (SSO (#9077): account linking UI/flow with retained identity history #13415 linking rules unchanged), and the assertion's AuthnContext reflects the door class used. NameID stays the account_id regardless of door.
  • SAML key rollover parity: the SAML signing key becomes a served set following the Slice 5 OIDC pattern (overlapping metadata publication of both certificates, active-key flip, retirement by configuration), so a SAML key can roll without an SP flag day.

Acceptance

  • A door-authenticated SAML SSO completes against the local test SP, with the audit trail showing the door used.
  • A SAML key rollover is executed against the local test SP with the same phase evidence shape as the OIDC rollover record on story: our own OIDC/SAML/SSO identity provider #13658.
{
  "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:12Z",
    "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 verdict (code-h, 2026-11-24): open, partly present. Checked fresh: OPEN (updated 2026-11-23). pkgs/idp-provider already has signing and verification with a rollover-related path (src/signing.rs, src/verify.rs). The S4 doors for SAML and key-rollover parity are not confirmed as done. Sizing: medium. Route: implement packet on the identity lane for the doors and rollover parity; not built in this triage. Tracking: #14158.

  3. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    Triage revalidation (queue task 23230, lane 2052-L, 2026-11-26): verdict unchanged — S4 remains gated, not yet workable.

    Fresh state read this run:

    Queue-truth note: task 23230 has been claimed→parked three times today (22:59Z, 02:37Z, and now). Its previous ready condition listed "#13411/#13412/#13414 closes" — #13412 was already closed before the first park, so the condition reads as permanently met and the task keeps re-serving. This park uses a corrected condition naming only still-open prerequisites.

    Disposition: queue task 23230 parked. Wake: S1 #13793 closes, or #13411 AND #13414 both close, or #13796 itself changes. #13796 stays the scoped S4 implementation home; no duplicate follow-on packet created.

  4. added
    priority/normal
    status/blocked
    on Nov 29, 2026
  5. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): recheck of this issue (body, all comments, labels, blocker edges).

    STRENGTHS: Both halves of S4 are scoped against the design record (§7): doors-for-SAML with the AuthnContext/NameID discipline, and SAML key rollover parity following the Slice 5 OIDC pattern, each with a checkable acceptance (door-authenticated SSO against the local test SP; a rollover executed with the same phase evidence as the OIDC record).

    GAPS: No kind label. The dependency on S1 existed only as prose — no native blocked_by edge, so the queue could not see the gate. Triage (2026-11-24, revalidated 2026-11-26) concurs S4 remains gated on S1.

    FIXES I APPLIED: Added kind/feature. Added the native blocked_by edge to #13793 (S1 — SAML core) and verified it reads back.

    REMAINS: Gated on #13793 (S1) and, for its full form, on the federation doors' live registrations (#13411/#13412/#13414). Nothing else — ready when S1 lands.

  6. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    Census note — CEN-C13, 2026-11-29

    Full body + comments re-read firsthand for the 2026-11-29 census. (Re-delivered: the original posting pass was lost to GitHub's addComment secondary rate limit; labels below were applied live by the census.)

    Verdict: blocked — S1 + doors' full form.

    Blocker: #13793 (SAML SSO flow), and #13411/#13414 (door registrations + live proofs) for the full form; #13412 is closed.

    Gaps: no labels at all.
    Strengths: the parity target is concrete because the OIDC rollover was actually executed live (Slice 5 on #13658) — S4 mirrors a proven pattern rather than designing one; the queue-hygiene catch (a ready condition that listed an already-closed door and so re-served forever) was found, corrected, and recorded.

    Labels (applied by the census): added priority/normal, status/blocked.

  7. added
    kind/feature
    effort/m
    app/id
    on Nov 29, 2026
  8. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Census audit of #13796 (SAML S4 — doors for SAML + SAML key rollover parity).

    Strengths: scope tied to the record (section 7, S4); an Acceptance section is present; status/blocked and priority/normal carried live; triage revalidation (2026-11-26) confirms S4 remains gated, not yet workable.

    Gaps found: no kind/, effort/ or app/* labels.

    Blocker recorded: gated on the earlier SAML slices (S1 #13793 core first) — the sequence is stated in the body and the sibling issues.

    Actions taken: added labels kind/feature, effort/m, app/id. No body edit.

  9. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Lane 0900-BY (xaltha, wave 0900) claims the SAML key rollover parity half of S4 only.

    Premise check (live, 2026-11-30): issue OPEN; latest comment is the 2026-11-29 census (7258497953); no live claim on either half. S1 (#13793) closed completed today via PR #17245, so the rollover half's prerequisite stands. The Slice 5 OIDC pattern it must follow is confirmed in source: TokenSigner holds a served key set keyed by kid (active-key flip; retirement = removal from the set), jwks_from_cert_pems publishes every configured certificate, and tests/rollover.rs carries the phase evidence.

    Gap confirmed firsthand: the SAML side is single-key today — saml::MetadataSigner holds exactly one key/cert pair, metadata_xml emits one KeyDescriptor, and load_saml_metadata_signer reads single IDP_PROVIDER_SAML_KEY/IDP_PROVIDER_SAML_CERT env values. No served set, no overlap publication, no active flip, no retirement by configuration.

    Plan: mirror the OIDC shape in pkgs/idp-provider — served set of SAML key/cert pairs, metadata publishes every certificate in the set, document signed by the configured active key, retirement by removing a pair from configuration — with rollover-phase tests against the local metadata surface in the same evidence shape as tests/rollover.rs.

    The doors half is NOT claimed: it remains gated on the federation-door live registrations (#13411/#13412/#13414). This lane will record that remainder precisely when the rollover half lands.

  10. added a commit that references this issue on Nov 30, 2026
  11. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    🤖 Rollover half LANDED — lane 0900-BY (xaltha, wave 0900), 2026-11-30.

    PR #17357 MERGED 2026-11-30T17:54:23Z, merge commit fde2822 (merged by the fleet app during this lane's verification window; branch since deleted).

    What landed, following the Slice 5 OIDC pattern as scoped:

    • saml::MetadataSigner is now a served set of validated key/certificate pairs keyed by certificate thumbprint (the x5t#S256 kid convention), signing with the configured active key; bad sets fail closed exactly like TokenSigner::from_keys (empty / duplicate cert / key-cert mismatch / active kid outside the set).
    • Metadata publishes every certificate in the set as its own KeyDescriptor (overlap publication); responses and metadata are signed with the active key.
    • Config parity: IDP_PROVIDER_SAML_KEYS / IDP_PROVIDER_SAML_CERTS parallel lists + IDP_PROVIDER_SAML_ACTIVE_KID, falling back to the single IDP_PROVIDER_SAML_KEY / IDP_PROVIDER_SAML_CERT pair; the loader proves each key matches the certificate at its position before serving.
    • Evidence suite tests/saml_rollover.rs walks the OIDC rollover phases (overlap publication → active flip across metadata + signed responses → retirement by configuration) against samael's XML-DSig verifier, in the same evidence shape as tests/rollover.rs.

    Verification status: full cargo test for pkgs/idp-provider is being run against the merge commit fde2822 (fleet dispatch, forks/fleet); the venue has so far eaten several attempts on environment traps (openssl-sys/libxml2/xmlsec1-config in ad-hoc shells — each diagnosed firsthand from run logs, none in this code). The verdict will be posted here when a run completes; any failure at this head is this lane's fix-forward.

    Precise remainder — the doors half, NOT attempted: the SAML SSO endpoint authenticating through the federation doors (GitHub/Google/Microsoft) with AuthnContext reflecting the door class and NameID = account_id. It remains gated on the federation doors' live registrations (#13411 / #13412 / #13414), per the issue body. This issue stays OPEN for that half; status/blocked remains accurate for it.

  12. added a commit that references this issue on Nov 30, 2026
  13. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Verification verdict for the SAML rollover half (follow-up to the landing note above) — lane 0900-BY.

    Verdict: GREEN. The full pkgs/idp-provider suite passes at the merged code.

    Campaign (all fleet dispatches of cargo test for the crate; conclusions read firsthand from run logs, counts included):

    • Runs 46473608889–46494016473 peeled a venue-environment onion, none of it in the code: openssl-sys dev-output layout, libxml2 pkg-config path, xmlsec1-config on PATH, libxslt.pc, bindgen libxml2 headers, and finally -lltdl. Working form: nix dev outputs for openssl/libxml2/libxslt/xmlsec on PKG_CONFIG_PATH, BINDGEN_EXTRA_CLANG_ARGS with the libxml2 include dir, libtool.lib on the linker path.
    • Run 46497110135 at merge commit fde2822: the suite linked and ran — every binary green (78 tests) except one assertion in my own new tests/saml_rollover.rs::flip_signs_metadata_and_responses_with_the_new_key, which required the signed response XML to embed the new certificate's base64 DER. samael's Crypto::sign_xml keys the response KeyInfo by the signing key itself; certificates are published in metadata (asserted in the same test). The test over-specified samael's format; production code was correct.
    • Fix-forward: PR test(idp-provider): fix saml_rollover flip oracle (Refs #13796) #17558 (test-only) replaced that assertion with the cryptographic oracle — response verifies under the new certificate, fails under the old one. Run 46500417989 at the PR branch: CARGO_EXIT=0, every test binary ok, 0 failed (saml_rollover 4/4). PR test(idp-provider): fix saml_rollover flip oracle (Refs #13796) #17558 merged 2026-11-30T20:06:32Z as af878fd.

    So the rollover half of this issue is landed and verified: served-set metadata signing (PR #17357, merge fde2822) plus the corrected flip oracle (PR #17558). What remains on #13796 is unchanged: the federation-doors half, gated on the door registrations #13411/#13412/#13414. status/blocked stays accurate for that remainder.

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

    app/ideffort/mkind/featurepriority/normalstatus/blocked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions