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)"
  }
}

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.

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

    epic/pm-stackkind/featurestatus:in-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions