Skip to content

SSO (#9077): Microsoft federated login #13414

Open

Description

@dezren39

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

Scope: Microsoft OIDC as upstream federated door; links to the same account row; test: Drew's Microsoft signs in against the allowlisted account.

Acceptance: login via this door reaches the same account as the other doors; non-allowlisted attempts denied with audit; depends on the provider stand-up issue (#13409).

{
  "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:41Z",
    "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": "oc-code-02",
    "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. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Premise check + build note (IDP-BUILD-4, 2026-11-23)

    #13409 closed today with its acceptance verified first-hand, so this door's dependency is met. Two facts shape the slice, recorded before building:

    1. No Microsoft app registration for the provider exists yet. The vault holds no Microsoft/Azure door credentials (checked by name), and an app registration is a signed-in Azure portal step. The live "Drew's Microsoft signs in" test therefore cannot run until the registration exists: tenant consumers (personal Microsoft account) baked into the authorize/token/JWKS URLs in the on-host provider config, redirect URI <issuer>/door/microsoft/callback, client id into the config, client secret into the vault as idp.microsoft.client-secret (launcher exports IDP_MICROSOFT_CLIENT_SECRET). Per the settled design §3, Drew's allowlisted Microsoft identity is the oid claim (microsoft:<oid>), falling back to sub when oid is absent.
    2. What is built and proven now is the complete door machinery in pkgs/idp-provider: upstream authorize redirect (OIDC + PKCE, nonce) with server-side pending-request state, callback code exchange, upstream ID-token verification against the tenant JWKS (iss/aud/exp/nonce checked), the deny-by-default allowlist gate enforced in the provider, linking to the same account row (SSO (#9077): account linking UI/flow with retained identity history #13415), and audit of every attempt. It is proven end-to-end against a mock Microsoft-shaped OIDC upstream over real HTTP (the OIDC door path is shared with the Google door; the Microsoft specifics are the tenant-shaped endpoints and the oid subject) — plus the crate's flow tests.

    This issue stays open on the live-registration proof (fact 1); the machinery lands under this lane and is recorded here when merged.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Door machinery — LANDED (IDP-BUILD-4, 2026-11-23)

    PR #13782 merged to main as 8e61b2c7a58e005ca8567be3886b3d0f99d89505. The full door now exists in pkgs/idp-provider (src/doors.rs + src/upstream.rs): start re-validates the RP request and parks it under a single-use state handle; the callback exchanges the upstream code, verifies the upstream identity, enforces the deny-by-default allowlist in the provider, links per #13415, and mints our own code — a login via this door produces tokens for the same account sub with the same #1253 role claims as the local door.

    Proof (laptop): tests/doors.rs drives this door's exact flow over real HTTP against a mock upstream — full loop to the same account, non-allowlisted identity denied + audited with no link created, state-handle replay denied. Full crate suite: 15/15 pass.

    Remaining for acceptance: the live sign-in, which needs the upstream app registration recorded in the premise note above (client id into the on-host config, secret into the vault under the recorded name). This issue stays open for that step.

  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Live registration — Microsoft door BLOCKED on a Drew-only sign-in (IDP-DOORS-REGISTER, 2026-11-23)

    The registration recipe is confirmed and everything downstream is ready (tenant consumers; redirect URI http://127.0.0.1:8911/door/microsoft/callback — the live provider's issuer is the loopback http://127.0.0.1:8911; vault name idp.microsoft.client-secret; env IDP_MICROSOFT_CLIENT_SECRET; allowlist identity microsoft:<oid>, falling back to sub). The single blocker: the laptop's Chromium is not signed into any Microsoft account — the Azure portal redirects to the Microsoft sign-in page, and no saved Microsoft credential is reachable (Secure Vault holds no logins; the laptop's Bitwarden password manager is unauthenticated; 1Password CLI has no session; the browser holds no saved Microsoft password). A cold sign-in needs Drew's Microsoft password and second factor, which only Drew can supply. (The page's "Sign in with GitHub" option is also unavailable — the browser is not signed into GitHub either; see #13411.)

    The step for Drew: sign into the Azure portal (portal.azure.com) in the laptop's stock Chromium with the personal Microsoft account. Once the session exists, the rest of this door — app registration (personal accounts, Web redirect), secret to the vault by name, provider config + restart, live sign-in proof — is mechanical and will be picked up immediately.

    The Google door is live-proven and closed today; the #13415 linking proof is proceeding on the doors that are live.

  6. dezren39 commented on Nov 25, 2026

    @dezren39
    MemberAuthor

    Agent note (oc-code-04, task 22310): fresh triage — 2026-11-25

    #13414 remains OPEN, kind/feature, with no hold labels. The implementation machinery landed in #13782 (merged 2026-11-23) and the provider dependency #13409 is closed. The remaining acceptance item is a live Microsoft sign-in; current issue evidence says the Azure portal requires an interactive Microsoft account login only Drew can complete. This is a valid hands item, not a reason to close or re-triage as routine feature work. Route: retain #13414 with user/escalated and the hands marker; the queue task is blocked on that single interactive login. After sign-in, resume app registration/configuration/live proof. No duplicate implementation packet.

  7. added
    user/escalated
    priority/normal
    on Nov 25, 2026
  8. 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: The dependency was verified, not assumed: #13409 (provider stand-up) closed with its acceptance verified first-hand, and the build note records the two facts that shape the slice before building. The door machinery then landed completely — PR #13782 (merged 2026-11-23) built the full Microsoft door in pkgs/idp-provider, links to the same account row as the other doors.

    GAPS: None in labels (complete: kind/feature, priority/normal, user/escalated, epic/pm-stack — the escalation label correctly reflects the one remaining step).

    FIXES I APPLIED: None needed.

    REMAINS: Drew — the live registration only: sign into the Azure portal with the personal Microsoft account in the laptop browser and complete the app registration (recipe confirmed on this issue, 2026-11-23: tenant consumers, the redirect URI recorded there); everything downstream of that step is ready. The acceptance test (Drew's Microsoft sign-in reaching the allowlisted account; non-allowlisted attempts denied with audit) runs immediately after.

  9. added
    status/needs-triage
    on Nov 29, 2026
  10. 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: missing labels at census time: status/needs-triage; 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: 6 recent comment(s) skimmed
    Comment skim: comments mention blocking (6 comments in the latest page).
    Actions taken by the census: labels added: status/needs-triage; appended ## Acceptance criteria section to the body (original text unchanged).

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

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

    @developing-today-fleet
    Contributor

    Decision — 2026-11-29, taken under Drew's standing decision posture (2026-11-23) and his 2026-11-29 order to handle the census's untouched items. This issue was on the census's needs-Drew list as "scope confirmation owed."

    Confirmed: the scope as written already matches the settled IdP linking policy — federation doors link to the same user and never auto-trust; first sign-in auto-provisions a local CA SSO account; passkeys are bound to the originating path by default; merge must stay possible. No scope change is made and none is owed.

    The one remainder is a hands step, not a decision: Drew signs in once at portal.azure.com in the laptop's stock Chromium, so the Azure-side door exists for the fleet to work against. Recorded here so the remainder is pinned to this thread.

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/needs-triageuser/escalated

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions