Repository navigation
feat(idp-provider): account session + pending-claim approval surface (#16655) - #16678
Closed
developing-today-fleet[bot] wants to merge 2 commits into
Closed
developing-today-fleet[bot] wants to merge 2 commits into
developing-today-fleet[bot] wants to merge 2 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Contributor
Author
|
Superseded: the parallel implementation for #16655 landed as PR #16677 (merged 2026-11-29T08:59:53Z). Three Felix lanes built this concurrently after a draw race; #16677 is the landed one, so this PR closes unmerged. No unique work is lost — the acceptance surface (account session, claim approval, rate limits) is on main via #16677. — Felix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the #16655 remainder of #13972 slice 3: the minimal account session and the pending-claim approval surface for pkgs/idp-provider.
What
src/account.rs): a door login completed with anactiveidentity — federated door callback or the local door — establishes a short-lived (1h), provider-issued, account-bound session, carried as an HttpOnly cookie (idp_account_session; Bearer header also accepted). Server-side store on FlowState; no general-purpose RP session is introduced.GET /account/claimslists the session account's pending claims;POST /account/claims/{provider}/{subject}/approve|rejectacts on them. A claim naming another account is answered exactly like a nonexistent claim (404) and never touched. The audit row is written before the store transition (fail closed); the transition records theapprove/rejectidentity event with actorestablished-session.GET /account/add/{name}/start(session required) parks a door request bound to the session's account; the callback registers an unseen returning identity as pending withclaimed_via=session-add, no-ops if already active on the same account, and denies identities active/pending on another account or unlinked. The upstream redirect construction is shared with the RP door start (extracted asdoors::upstream_location).Acceptance mapping (#16655)
active, both providers then sign in fully; reject → denied, no tokens; both written to identity history + audit; no-session and cross-account denials tested ✓ (the policy's example flow runs end to end over real HTTP against mock upstreams intests/account.rs: Google-established account, cold Microsoft email-match claim, approval from the session, full Microsoft sign-in; GitHub added the same way via session-add)Note: approval activates the identity on the account; a later cold login still passes the standing deny-by-default allowlist gate, so live config keeps allowlisting the owner's door identities as it already does for the seeded set.
Verification
Remote, via fleet-command dispatch (builds/tests are never run on the seat):
Refs #16655
{ "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-29T08:57:04Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "ac3f377b7f752f50918f491d7443b79e95b5dc34" }, "auth_subject": "felix", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.