Skip to content

SSO (#9077): first consumer integration proving the full loop (PM stack) #13416

Open

Description

@dezren39

Refs #9077. Design: doc/2026-11-23_design_fleet_sso_9077.md §3.

Scope: first fleet-service consumer per #1253: accept devtoday SSO tokens, enforce owner/orchestrator/agent/read-only roles server-side on writes.

Acceptance: Drew signs into a PM-stack service via each linked door against the same account with roles enforced server-side; documents the per-app integration pattern for the next consumer; depends on the linking issue.

{
  "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-23T15:36:58Z",
    "session_id": "ses_e5df703b424ffeYiDdwritlbyD",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code-wt-sso-9077",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code-wt-sso-9077",
      "repo": "developing-today/code",
      "branch": "lane/oc-code-05/sso-9077-design",
      "sha": "4204df0de25ea49e728773ded1f059cefbed56be"
    },
    "auth_subject": "agent-next-25-local",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Acceptance criteria

Activity

  1. added
    kind/feature
    epic/pm-stack
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  3. added a commit that references this issue on Nov 23, 2026
  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    First consumer — the buildable half is landed; the issue stays open for the rest

    Landed: PR #13799 (merge 0ae6122d03ff).

    • The per-app integration pattern (explicitly in this issue's acceptance) is documented in pkgs/idp-provider/README.md: registration (client row, no secrets, PKCE S256), discovery-driven configuration, code + PKCE sign-in (300 s tokens, no refresh tokens), verify-every-request against the JWKS by kid, and server-side role enforcement — plus how Cloudflare Access composes with the IdP token instead of being replaced by it.
    • A reference consumer proves the pattern: src/verify.rs (TokenVerifier — discovery → JWKS, signature-first verification, iss/token_use/exp checks — and require_any_role, the whole write gate) and examples/role-gated-app.rs (/read for any valid token, /write gated on owner/orchestrator).
    • Proof, tests: tests/consumer.rs — the owner token comes through the provider's real authorize/token loop and passes read + write; a read-only token reads but gets 403 on write; ID-token-as-bearer, expired, garbage, and missing tokens all get 401. (The denial case is test-level by construction: the live provider's one account holds all four roles, so no live login can mint a low-role token. 20/20 crate tests pass.)
    • Proof, live: the shipped example ran against the live laptop provider (post-rollover, serial-1004 key): owner token → /read 200 (sub: drew, all roles), /write 200 (written: true); tampered token → 401; no token → 401.

    What remains on this issue (why it stays open):

    1. The aggregator production integration — filed as #13798 with the pattern as its spec: aggregator write paths validate IdP tokens and role-gate per the reference consumer. Sequenced after this landing; most valuable once a door is live.
    2. Sign-in to a real app through a federation door — blocked on the upstream app registrations recorded on SSO (#9077): GitHub federated login #13411/SSO (#9077): Google federated login #13412/SSO (#9077): Microsoft federated login #13414 (signed-in console steps). The machinery is merged (PR feat(idp-provider): federated doors (GitHub/Google/Microsoft) + runtime identity linking #13782) and the local-door path is proven above; the moment a registration exists, this issue's remaining acceptance is a configuration + verification loop, not new code.
  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Remainder re-check (IDP-DOORS-REGISTER, 2026-11-23)

    State after today's door work:

    This issue stays open. Next actions, in order: Drew's two browser sign-ins unblock the remaining doors; then a PM-stack service consumes a door sign-in per the documented pattern.

  6. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Triage pass (task 22312, lane oc-code-02, 2026-11-24)

    Fresh state: issue open. The buildable half is landed (PR #13799, merge 0ae6122). Provider decision, SAML design, and relying-party design are merged (#13417, #13792, #14089). The Google door is live-proven per the 2026-11-23 re-check.

    Remaining: the GitHub door (#13411) and the Microsoft door (#13414) sign-ins. Both need a Drew-only step, which is a hands item and not claimable here.

    Verdict: keep #13416 open for those two door sign-ins. No new packet is routed, and no code was changed.

  7. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Triage (oc-code-07, task 22696), state checked 2026-11-24.

    Verdict: open, blocked on two doors that are still open. Buildable half merged (#13799); provider, SAML and relying-party designs merged (#13417, #13792, #14089); Google door live-proven. Remaining: the GitHub door (#13411) and the Microsoft door (#13414), both OPEN. Each needs a sign-in performed at a live browser, which is a hands item, so this lane records it and does not park on it. No code changed in this pass.

  8. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Aggregator SSO consumer slice is implemented in draft PR #14477 (Closes #14411). It adds IDP_PROVIDER_ISSUER-driven OIDC discovery/JWKS RS256 verification and requires an owner or orchestrator role for the human-originated aggregator write routes, alongside the existing Access identity checks. Local RSA/JWKS fixtures cover missing/invalid tokens (401), read-only role denial (403), and owner/orchestrator acceptance without live IdP credentials.

    Recovery posture: IdP unavailability fails closed for ordinary writes; #9608 Access-outage queueing still runs after successful IdP verification, while fresh-login queue confirmation/rejection and the existing single-use break-glass registry route remain outside this gate. Machine callbacks and public prompt intake retain their existing contracts.

    Remote targeted test is running: https://github.com/dezren39/fleet/actions/runs/45437791139 (pending).

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

    @developing-today-fleet
    Contributor

    Triage pass (task 22696, lane felix, 2026-11-25) — verdict: VALID, still blocked; the code-side remainder is now routed as a finish slice.

    Fresh state (verified 2026-11-25, supersedes the premise of the 2026-11-24 verdicts only where noted):

    What remains for this issue's acceptance: PR #14477 landing (task 23805), then Drew's live sign-ins through the GitHub (#13411) and Microsoft (#13414) doors plus the linking flow (#13415) against the same account with roles enforced server-side. The door sign-ins are the long pole and are hands items.

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

    @developing-today-fleet
    Contributor

    Aggregator consumer integration is now ported to the extracted write-route handlers on current main in successor PR #15910 (the original #14477 branch rejected a non-fast-forward update). It preserves the #13799 token-verification pattern, owner/orchestrator write roles, existing Access identity checks, and the comments operator-token fallback when no IdP issuer is configured. Focused fixture tests passed in Fleet run #45935222979; the full aggregator suite is running in #45936869477. This discharges the code-side aggregator consumer item once review/merge lands; GitHub/Microsoft door sign-ins and linking remain the separate live acceptance remainder.

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

    @developing-today-fleet
    Contributor

    Verification update for the aggregator integration: all six #14411 IdP fixture tests passed by name in Fleet full-suite run #45936869477; the dedicated focused run #45935222979 also passed. The full aggregator command itself exited nonzero (3,826 pass, 27 fail, 17 errors from unrelated timeouts/dependency/gatherer failures), documented on PR #15910. The successor PR is ready for review and mergeable/CLEAN, not merged. The other acceptance items on this tracker (GitHub/Microsoft door sign-ins and account linking) remain open.

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

    @developing-today-fleet
    Contributor

    Correction to the aggregator suite note: run #45936869477 omitted the documented fixture environment and dependency install, so its failures are not a meaningful suite verdict. The #14411 fixture tests did pass by name, and the proper workflow-equivalent full suite (install dependencies + PM_AGG_SOURCE=fixtures PM_AGG_DEV=1) is now running as #45938369056. The rest of this tracker remains as previously recorded.

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

    @developing-today-fleet
    Contributor

    Aggregator-integration evidence (final): all six #14411 IdP fixture tests passed by name in both configured full-suite runs (#45938369056, #45939998841). The suite itself stays red (4,001 pass / 10 fail) on #8220 loadConfig HOME (6) and #14149 broker-answer (4) tests that the slice does not touch; a serialized retry ruled out concurrency interference. Successor PR #15910 is ready and mergeable/CLEAN, unmerged. Door sign-ins (#13411/#13415) and linking remain the open live acceptance.

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

    @developing-today-fleet
    Contributor

    Aggregator consumer update from #13798 triage (2026-11-27): successor PR #15910 MERGED at 09:16:27Z, closing #14411. Its six fixture IdP tests passed; the full-suite baseline failures were independently reproduced on clean main and are documented on #14411. This completes the aggregator implementation slice. Issue #13798 still requires its explicitly stated real-provider demonstration against the aggregator endpoint; no such live proof was evidenced by the merged PR, so follow-up task 26184 is queued. The GitHub/Microsoft door sign-ins and account linking remain open on #13416.

  15. dezren39 commented on Nov 28, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    lane: 1207-D (charlie ADVANCE queue-draw, 2026-11-28)
    task: 23806
    state: parked — close-out prerequisites re-verified firsthand

    Fresh reads 2026-11-28:

    The three door/linking items are live sign-in hands items; the #13416 close-out cannot run until they close with live sign-in evidence. Task 23806 parked with ready condition: #13411 closes; on wake re-check #13414 and #13415, then run the acceptance pass.

  16. added
    priority/normal
    on Nov 29, 2026
  17. 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: Small body, exact acceptance: Drew signs into a PM-stack service via each linked door against the same account, roles enforced server-side, and the per-app integration pattern documented for the next consumer. The native blocked_by edges are present and accurate (the GitHub door #13411, the Microsoft door #13414, and the linking flow #13415 — all still open).

    GAPS: None in labels (complete: kind/feature, priority/normal, status:in-review, epic/pm-stack).

    FIXES I APPLIED: None needed. Progress state for the picker-up: the reference-consumer proof this issue exists to produce has substantially landed — the aggregator integration's six #14411 IdP fixture tests passed in both configured full-suite runs, successor PR #15910 merged on 2026-11-27 closing #14411, and the close-out prerequisites were re-verified firsthand on 2026-11-28 (lane 1207-D, task parked). The follow-on consumer (#13798, aggregator token validation + role-gated writes) builds directly on this pattern.

    REMAINS: The acceptance's own terms — sign-in via each door against the same account with roles enforced, and the pattern write-up — complete as the three door/linking blockers close.

  18. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Audited live on 2026-11-29 against the house label taxonomy: details, labels, blockers, priority.

    Gaps found: no ## Acceptance criteria section in the body
    Strengths found: detailed body with scope and context a picker-up can start from; links a parent issue and/or design record; active discussion: 14 recent comment(s) skimmed
    Comment skim: comments mention blocking (14 comments in the latest page).
    Actions taken by the census: appended ## Acceptance criteria section to the body (original text unchanged).

    Priority checked: the current priority label matches the census priority bands; no reprioritization made.

  19. added
    effort/m
    on Nov 29, 2026
  20. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Integration record — lane 2037-G, 2026-11-29 (for #13798). The first production consumer of this issue's pattern is complete: pm-aggregator validates IdP access tokens per the pattern recorded here (discovery-driven config, JWKS kid selection, iss/exp/token_use=access, server-side owner/orchestrator write gate, 401/403 split) in pm-stack/aggregator/src/idp-identity.ts, wired into every human write family in server-write-routes.ts — the final two routes (conflict rulings POST/DELETE) landed in PR #17054 (merged dbfc574). Full adjudication on #13798. Key: 2037-G

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

    effort/mepic/pm-stackkind/featurepriority/normalstatus/in-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions