Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# IdP identity-linking policy — pending trust, passkeys, configurable factors, account merge

Date: 2026-11-24 · Source: Drew's policy statement, 2026-11-23 ~19:21 CST · Recorded on: [#13415](https://github.com/developing-today/code/issues/13415#issuecomment-7119068891) (policy), [#13415 gap analysis](https://github.com/developing-today/code/issues/13415#issuecomment-7119120391) · Workstreams: #13972 (HEAD), #13973, #13974, #13975

## The policy (Drew, verbatim in substance)

1. **Link, don't auto-trust.** All federation doors link to the same user, but a new provider sign-in does not automatically gain trust. Example: a user logged in with Google tries Microsoft — the Microsoft sign-in is allowed and registered, but grants no true access until the user, logged in with the already-established Google account, approves the link as the same account. After approval either provider signs in fully, and GitHub is added the same way.
2. **Auto-provisioning.** Whenever any new Microsoft, Google, or GitHub account is logged in, automatically create our own CA SSO user account for it.
3. **Passkeys.** Support passkeys. A passkey ties to the way it was signed in by default, but the user is presented an option to make it distinct — its own login, separate from SSO. Users may make as many passkeys as they want and attach them to one or more SSO providers.
4. **Configurable two-factor.** Users can enable two-factor as any combination they choose — SSO plus passkey, two different passkeys, or two SSOs — and configure it themselves.
5. **Account merge must be possible.** There can't be objects that are guaranteed unique per account (or only a limited set); on merge the user chooses which account is primary; no data is lost, everything joins; profile attributes (picture, summary) can be repointed one by one between the merged accounts.
6. **Undecided:** recovery requests and account deletion policy — Drew has not set a policy yet. Open question, decider Drew; not designed by any workstream below.

## What linking does today (evidence, 2026-11-23)

From `pkgs/idp-provider/src/identities.rs` (landed by PR #13782) and the live proof on #13415: the runtime identity store holds one row per `(provider, subject)` with status `active | unlinked` — the only two states. An allowlisted identity's first door login links it by that login (actor `door-login`, recorded in the append-only identity history and the audit record) and immediately mints tokens for the account; the config identity list seeds the store as `active`; later link changes are operator CLI acts (`idp-provider link|unlink|links`); an unlinked identity is denied at the door (`identity_unlinked`) while the account stays reachable via other doors; history rows are never hard-deleted. The trust anchor is the deny-by-default allowlist of Drew's exact upstream account IDs. The minimal provider has no authenticated session layer, no account-creation path, no passkeys, no factor concept, and no merge operation; the #9077 design note (`doc/2026-11-23_design_fleet_sso_9077.md` §4) had explicitly scoped MFA/passkeys out until this policy.

## The gaps in one paragraph each

**Pending trust.** No pending state, no claim mechanism, no approval act: first allowlisted login is full access for every provider alike. The allowlist makes that safe today; auto-provisioning removes the hand-curated list as the anchor, which makes the pending state load-bearing. **Provisioning.** No account is ever created by a sign-in; the single account row exists because config seeded it. **Passkeys.** None; the policy's binding shape (sign-in-path by default, standalone by option, unlimited, multi-provider attach) has no counterpart in the current model. **Two-factor.** None; one door login mints tokens, with no per-account authentication policy and no between-factors state. **Merge.** No operation and no uniqueness inventory; starting points are roles on the account row, identity rows keyed `(provider, subject)` → `account_id`, append-only history naming the original `account_id` forever, tokens carrying `sub` = account id, and the #2852 fold-path requirement that a merged account present exactly one binding target to the id system.

## The four workstreams (dependency order)

- **(a) #13972 — pending-link registration + approval from an established session. HEAD.** Adds the `pending` identity state, claim creation (session-add and email-match), auto-provisioning, and the minimal account session the rest build on. A behaviour change to the live-proven door path.
- **(b) #13973 — passkey support (WebAuthn).** Binding model (path-bound by default, standalone option), unlimited credentials, attach to one or more providers. Depends on (a)'s session.
- **(c) #13974 — configurable two-factor.** A per-account pair of distinct factor slots over the account's active providers and passkeys, self-configured, gating token issuance. Depends on (a) + (b).
- **(d) #13975 — account merge.** Uniqueness audit first (its rule binds (b)'s and (c)'s schemas), then the two-session merge operation, primary selection, no-loss join, per-attribute repointing. Independent of (a)–(c) except as noted in its issue.

## Open question carried, not answered

Recovery requests and account deletion policy — decider: Drew. Every workstream names it and designs around its absence.
1 change: 1 addition & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Folders are named `<UTC datetime>_<kind>_<name>`. The kinds in use are `feature`
- [CNCF landscape — the slice this estate will actually need](2026-11-23T22-33-41Z_research_cncf-landscape/2026-11-23T22-33-41Z_research_cncf-landscape.md) — research record (2026-11-23): ~150 cloud-native projects across the seven areas this estate will need, each with CNCF status (graduated / incubating / sandbox / not CNCF) and an estate verdict — observability (OpenTelemetry as the contract; Prometheus as the language, VictoriaMetrics as the store; Grafana stays; no open-source Datadog exists), networking (Cilium yes; Gateway API after ingress-nginx's March 2026 retirement; MetalLB is the remembered LAN LoadBalancer; no service mesh yet), platform & GitOps (Flux over Argo CD for us; Cozystack fits with the caveat that it decides storage/tenancy/GitOps for you; Crossplane graduated but not now), data (TiKV no — a storage layer, not a database, and its Jepsen record is honest; CloudNativePG + replicas; NATS yes with a JetStream shape; LINSTOR over Rook), security & identity (Keycloak ≠ OpenBao; cert-manager and Kyverno when Kubernetes lands; SPIRE later, chained under the fleet CA; OPA management-plane only), runtimes (no OCI runtime is "much faster"; KubeVirt graduated and is the VMs-in-Kubernetes answer; Wasm apps designed to the Component Model, not WasmEdge), and registries & builds (GHCR until friction, then Zot; Harbor is a registry and Dragonfly a distribution layer, not alternatives; Nix + Actions already win the build category). Includes the Oct–Nov 2026 status-correction list (Crossplane, KubeVirt, NATS, Dragonfly graduated; CloudNativePG, OpenFGA promoted) and the uncertain-name identifications (Argonize doesn't exist; Trimmer→Tremor; Yuki→youki; Percy→Pixie; Spiffy→SPIFFE).
- [Multi-transport reach — any protocol as a carrier](2026-11-24T01-04-53Z_design_multi-transport-reach/2026-11-24T01-04-53Z_design_multi-transport-reach.md) — programme direction record (Drew, 2026-11-23) for epic #13926 and head design #13929: the P2P/ID/fleet stack reachable over many alternate transports and proxied systems (Spritely-style relays, Tor, Noise, ActivityPub, ATProto, email, MQTT, HTTP/REST, MCP, IRC, Zulip, Slack, Discord bots, Gopher, Gemini, telnet, physical media), each adapter at a declared level (read / bidirectional / write-capable / sync-equivalent), with asymmetric send/receive paths as a first-class design requirement.
- [Secrets plane — delta refresh, broker peer sync, dual-store puts](2026-11-24T01-23-30Z_design_secrets-plane-sync/2026-11-24T01-23-30Z_design_secrets-plane-sync.md) — design record for #13948 (Drew, 2026-11-23): the secrets broker refresh becomes delta-first (one `bws secret list`, apply only entries whose `revisionDate` moved), brokers sync peer-to-peer behind a keyed set hash (v1 peer payload is the full set; a full upstream refresh is needed only when the laptop is down and the broker restarted with no cache), `fleet secrets` gains `refresh`, `get --upstream/--no-cache`, and a `put` that commits to the primary store then pushes to the peer and the mirror, and the two stores are kept in sync with Bitwarden Secrets recommended as primary and 1Password as mirror on the evidence in the design. Companion to-dos: #13950 (embed both stores in the fleet binary), #13952 (`fleet init` bootstrap command).
- [IdP identity-linking policy — pending trust, passkeys, configurable factors, account merge](2026-11-24T01-28-40Z_design_idp-linking-policy/2026-11-24T01-28-40Z_design_idp-linking-policy.md) — design record (Drew, 2026-11-23) for #13415 and workstreams #13972 (HEAD), #13973, #13974, #13975: federation doors link to the same user without auto-trust (a new provider sign-in registers pending until approved from an established session), first sign-in auto-provisions the CA SSO account, passkeys bind to the originating sign-in path by default with a standalone option (unlimited, multi-provider attach), two-factor is user-configured as any two distinct factors, and account merge stays possible (no per-account-unique objects beyond a limited set, primary chosen, no data lost, per-attribute repointing); recovery/deletion policy explicitly undecided.
- [Roc ecosystem research](2026-11-23T22-00-25Z_research_roc-ecosystem/2026-11-23T22-00-25Z_research_roc-ecosystem.md) — research record (2026-11-23): the state of the Roc language ecosystem — the new Zig compiler (feature parity July 2026; 0.1.0-RC1 shipped 2026-11-21, promotion to 0.1.0 still open), platforms (basic-cli, basic-webserver, Joy, roc-ray, roc-gui, Cloudflare Workers, native Android), the new-compiler package canon, real projects and production use (Joy/roc-deflate, roc-chat), a 30-day Zulip digest (linear types decided against FBIP; the LLM-generated-code conversation, no policy adopted; tooling and distribution progress), and the talks/releases/showcases worth watching.
- [Actions exec — build and tiered-extension proof material](2026-11-24T00-39-49Z_report_actions-exec-proof-material/2026-11-24T00-39-49Z_report_actions-exec-proof-material.md) — raw proof scripts and run logs for #13774: the ACTIONS-EXEC-2 build (broker verbs, OIDC RS256 gate, fleet actions family; handoff proven end to end twice; the second run failed at the agent-install step and its diagnosis is held behind a flag hold) and the ACTIONS-EXEC-3 tiered lease-extension policy (design amendment and completion record on the issue; fleet-queue 616 and fleet bin 141 tests passing; live tier proof on the generation-8 broker; push delivery blocked by the PM intake 401, #13902). Backfilled from lane /tmp under the work-product landing rule.
- [OpenRouter post-reset through-route probe](2026-11-24T00-22-00Z_report_openrouter-route-probe/2026-11-24T00-22-00Z_report_openrouter-route-probe.md) — verification record for #13677 (2026-11-24): two post-reset probe sessions through the openrouter-free-plan route completed, but the server session records show both were served by other providers (claude-payg and _muse), not by OpenRouter :free models, so the owed verification stays open in substance and the next diagnostic is named. Backfilled from the goal workspace under the work-product landing rule.
Expand Down