Identity plane split, plan I2f: native clients, the device flow and DPoP-bound refresh (epic &132)

Status: Done (2026-10-06) — !1574
Epic: &132 (stage I2 of &130)
Issues: #2740 (w3), #2741 (w5), #2742 (w5), #2743 (w5), #2744 (w5), #2745 (w3), #2746 (w5), #2747 (w5), #2748 (w5), #2749 (w5), #2750 (w3)
MR: feat/identity-native: U1–U11 in order, titled "canopy-identity native clients: device flow and DPoP refresh (#2740 … #2750)".

The eleven issues are one deliverable, D7’s issuer side, and each unit builds on the one before, so they ship as one MR under the maintainer’s one-MR-per-related-group ruling, one commit per issue. U1’s commit adds this page and its nav entry: the group Identity Plane Split (epic &130) holding * Identity plane split, plan I2f — native clients: the device flow and DPoP-bound refresh (epic &132), placed just above ** Completed Plans Archive in docs/modules/ROOT/nav.adoc, as plans I2a–I2e did. U11’s commit closes the plan.

This is a Design + Scope plan. GitLab owns tracking. The plan freezes when U1 starts. "Plan I3" always means the stage; N1–N11 are this plan’s decisions.

Context

ADR-049 D7 gives native clients (canopy-cli: Client::Native(NativeClient::Cli), public, no registry keys) an RFC 8628 device flow approved in canopy-web under D6’s step-up. The result is a native session: a rotating refresh credential bound to a device key by DPoP (RFC 9449), from which per-target delegation tokens come through the refresh grant with an RFC 8707 resource. canopy-web re-federates the session’s dedicated upstream grant like a web session, at least every 900 s; the session ends after at most 8 h (24 h in code). Access tokens stay bearer; only the refresh credential is sender-constrained. D5’s DPoP row: verified against the embedded JWK, its thumbprint the session’s binding, htm and htu matching, iat within 60 s, jti single-use.

In the tree today:

  • Sessions are web-only: identity_sessions CHECKs kind = 'web' and kind <> 'web' OR client = 'canopy-web' (services/canopy-security/migrations/20261214000000_identity_subjects_sessions.sql), and the store binds WEB_KIND/WEB_CLIENT in open, revoke and every log row and types current() to ConfidentialClient (services/canopy-security/src/identity/sessions.rs). MintLookup::Credential { opener: Client }, MintView, judge and ActorChain already accept a native opener (opens_sessions(), crates/canopy-auth/src/identity_policy/clients.rs). The window CHECK (≤ 86 400 s) is D7’s 24 h cap. Web credentials never rotate (F2); identity tables are INSERT-only.

  • The token endpoint serves client credentials and token exchange only (identity/token_endpoint/request.rs). Client authentication, client status, the per-client budget and the jti store are ConfidentialClient-typed (client_auth.rs, client_status.rs, token_endpoint/client_limit.rs), so canopy-cli can be neither authenticated, budgeted nor disabled, a gap against D12’s "every mint checks client disablement". The admin guard refuses native actors (admin/guard.rs).

  • CompactJws admits exactly {alg, kid, typ} and refuses jwk (A9; crates/canopy-auth/src/identity_jws.rs), so a proof needs its own parser. PublicJwk::from_coordinates and Kid::rfc7638 (crates/canopy-signing) give RFC 9449’s key and thumbprint.

  • The issuance log is version 3 (20261215000000, closed sets; its version-keyed CHECKs, the revocation-error one among them, exempt any other version). identity_purge_sessions deletes only validations, revocations and sessions. The issuer pool is 18 (identity/registry.rs). CanopyRefusal is a closed set.

Scope

In scope: U1–U11 below.

Out of scope:

  • plan I3: canopy-web’s code-entry, describe, confirm, step-up and deny pages, its dedicated-grant storage and single-flight re-federation, its revoke-this-device UI, and a check that the describing and approving worker are one; edge forwarding of /identity/device_authorization, /identity/token and /identity/revoke with DPoP passed through and canopy-web in CANOPY_TRUSTED_PROXIES; canopy-cli’s key, proofs, serialized refreshes and storage; retiring the password grant and amending ADR-007; a Kanidm-lane device proof; the external security review;

  • plan I2g: sizing the pool and the per-IP, native and attempt budgets; the capacity test;

  • not built: DPoP-bound access tokens, DPoP nonces (RFC 9449 §8), verification_uri_complete, a TUI.

Design

Decisions (recorded in ADR-049 Amendment 9, which lands with U1)

# Decision

N1

Device authorization (RFC 8628 §3.1–3.2). A form at POST /identity/device_authorization on the token router. device_code: 32 CSPRNG bytes (43 base64url), stored as SHA-256. user_code: 8 symbols uniform over BCDFGHJKLMNPQRSTVWXZ (about 34.6 bits, §6.1), shown XXXX-XXXX, read case-insensitively ignoring - and spaces, stored as SHA-256. expires_in 600, interval 5, verification_uri from identity_device_verification_uri, no verification_uri_complete (§5.4). Served only with the issuer, an upstream profile and the URI configured; spends only the per-IP limiter.

N2

Code entry (§5.1, §5.4). POST /identity/device_verification, canopy-web only, carrying the worker’s web-session credential: describe names the client and start time for D7’s approval screen; deny records a denial. Every describe, denial and approval spends one per-replica attempt budget keyed by the worker’s upstream (iss, sub) (read from the web session’s row for describe and deny, from the verified step-up id_token at approval) of 10 per 10 minutes, shared across the three.

N3

The device-approval grant (D6). canopy-web’s RFC 8693 exchange that verifies the step-up id_token as a federation open does (C7–C9), requires now − auth_time ≤ 600 s (DEVICE_APPROVAL_MAX_AGE_SECONDS, asserted equal to SECURITY_ADMIN_MAX_AGE_SECONDS), and in one transaction links or mints the subject (F7), opens a native session (kind native, opener canopy-cli per B5, ending at auth_time + identity_native_session_max_seconds, default 28 800, 1800–86 400) and records the approval. Any refusal in the transaction rolls it all back.

N4

Revalidation (adds a D5 row). The native revalidation credential (32 CSPRNG bytes) is the session’s credential_hash; canopy-web alone presents it, by private_key_jwt, to renew (F5), hold in grace (F6) or revoke the session. It mints nothing. D6 freshness gates every native mint. A session approved but unredeemed when its device code expires is revoked (unredeemed) at canopy-web’s next renewal.

N5

Redemption: the device_code grant (§3.4–3.5). Binds the session to the proof’s RFC 7638 thumbprint and issues refresh credential version 1 and a delegation token for resource (act [canopy-cli], I2d’s mint core, token_type: Bearer per RFC 9449 §5). A redeemed code presented again revokes its session (RFC 6749 §4.1.2’s analogue). slow_down: a poll under 5 s after the device’s last poll not itself answered slow_down (per replica, keyed by device_id, no burst); the cumulative +5 s is the client’s duty (§3.5).

N6

The refresh grant (RFC 6749 §6, RFC 9700 §4.14.2). The current version rotates under the session’s lock and mints (exp the least of iat + 300 and the session’s end, G3’s 5 s floor; narrowing narrows the access token only). A superseded version under the bound key revokes the session (strict reuse detection; canopy-cli serializes refreshes at plan I3); a proof under another key is refused and revokes nothing.

N7

DPoP proofs (a third exact-header validator beside A9’s two). Header exactly {typ: dpop+jwt, alg: ES256, jwk: {kty: EC, crv: P-256, x, y}}; claims exactly {jti (1–128, no control character), htm: "POST", htu, iat}; ath, nonce, private key members and any other member refuse. At most 2 KiB; htu (no query or fragment) equals the public token endpoint after RFC 3986 §6.2.2 and §6.2.3 normalization (case, percent-encoding, dot segments, the scheme’s default port, an empty path); `

now − iat

≤ 60 s`; the signature verifies under the embedded key; jti single-use per thumbprint across replicas, kept to iat + 120 s. A DPoP header is ignored everywhere but the two native grants.

N8

Native revocation (RFC 7009). /identity/revoke also serves canopy-cli as a public client (client_id=canopy-cli, no assertion, no DPoP; token any version of its refresh credential); canopy-web may revoke a native session by its revalidation credential. D2’s forwarded set gains /identity/revoke.

N9

Disablement, budgets, administration (D12, G10). Runtime disablement and the admin client routes cover canopy-cli; every native grant and N2–N3 refuse a disabled canopy-cli. canopy-cli has one per-replica budget, identity_native_rate_limit_rpm (default 6000, 1–600 000), spent by a poll or refresh once its credential is found. The admin guard keeps refusing native actors: security administration stays canopy-web’s, narrowing D6’s last sentence.

N10

Issuance log version 4 (below). Every native state change commits its row in its transaction (F3); every poll answer is logged (D13).

N11

Budgets and pool. Device authorization, verification and native revocation: 5 s. Approval and native renewal: F9’s 13 s. device_code and refresh: NATIVE_BUDGET, equal to DELEGATION_BUDGET (5.5 s: processing by the 2.5 s first phase, the transaction and its row in the 3 s reserve). The issuer pool grows from 18 to 22. device_code and refresh are served with or without an upstream profile (as G1’s delegation is); N1–N3 need one.

Wire surface

Errors are RFC 6749 §5.2 JSON (error, and canopy_refusal when set) at the token endpoint’s status for each code; every 429 carries Retry-After and is logged. parameter_refused covers scope, resource on N1 and any client assertion on a native form.

Surface (caller) Parameters Success Refusals: error [canopy_refusal] (log reason)

N1 device authorization (canopy-cli)

client_id

200, §3.2 body

invalid_request (malformed, parameter_refused); invalid_client (client_not_native, client_disabled); 503 temporarily_unavailable (device_flow_unconfigured, client_status_unavailable, device_store_unavailable, three user-code collisions included)

N2 device verification (canopy-web, private_key_jwt; spends its G10 budget)

assertion, web_session, user_code, action = describe or deny

200 {client_id, started_at, expires_at}; deny 200 {}

unauthorized_client; invalid_request [user_code_invalid] (unknown, expired, decided, or its client disabled); invalid_request [session_ended, subject_suspended, session_stale]; 429 (user_code_attempts_exhausted)

N3 approval (canopy-web)

token exchange: requested_token_type native-revalidation, subject_token the id_token (with upstream_access_token for userinfo profiles), user_code

200, F2’s body with the revalidation credential

the federation open’s refusals; invalid_request [auth_time_too_old]; invalid_request [user_code_invalid]; 429

N4 renewal, grace (canopy-web)

as F5 and F6, both token types native-revalidation

200, F2’s body, the credential echoed

F5’s and F6’s; an unredeemed session invalid_request [session_ended] (unredeemed)

N5 device_code (canopy-cli, DPoP)

grant_type=urn:ietf:params:oauth:grant-type:device_code, device_code, client_id, resource, optional narrowing

200 {access_token, token_type: Bearer, expires_in, refresh_token}

authorization_pending, slow_down, access_denied, expired_token; invalid_grant (device_code_unknown); invalid_grant [session_ended] (device_code_reused, revoked, ended); invalid_grant [subject_suspended]; invalid_dpop_proof (dpop_*); invalid_client (client_not_native, client_disabled); invalid_target; invalid_scope (narrowing); 429

N6 refresh (canopy-cli, DPoP)

grant_type=refresh_token, refresh_token, client_id, resource, optional narrowing

as N5

invalid_grant (refresh_unknown, dpop_key_mismatch); invalid_grant [session_ended] (refresh_reused, revoked, ended); [subject_suspended]; [session_stale]; the rest as N5

N8 revocation (canopy-web or canopy-cli)

canopy-web: assertion and a web or revalidation credential; canopy-cli: client_id and a refresh credential

200; an unknown, ended, revoked or foreign token 200 ignored

RFC 7009’s four, as today; an assertion naming another client than client_id is invalid_client (client_id_mismatch)

Metadata gains each entry in the unit that serves it, the two auth-method lists becoming separate constants: device_authorization_endpoint (U7); the device_code grant in grant_types_supported, none in token_endpoint_auth_methods_supported and dpop_signing_alg_values_supported: ["ES256"] (U9); refresh_token in grant_types_supported and none in revocation_endpoint_auth_methods_supported (U10).

Issuance log version 4

grant_type gains device_authorization, device_verification, device_code and refresh_token; outcome gains described and denied; columns device_id (uuid) and refresh_version (bigint); TokenErrorCode gains the six RFC codes. CHECKs v4_events, _v4_session, _v4_token, _v4_device, _v4_refresh; v4_new_rows NOT VALID; schema version 4; ISSUANCE_INSERT_COLUMNS grows by two. Every version-3 CHECK keyed to its version (identity_issuance_log_v3_revocation_error among them) is replaced to cover version 4 or restated in the matching _v4* CHECK, so version-4 revocation, delegation and client_credentials rows keep version 3’s rules.

Grant, outcome Required Forbidden

device_authorization issued

device_id, client, expires_at (the code’s)

token, session, subject, refresh_version

device_authorization refused

error, reason

the same

device_verification described, denied

device_id, client (canopy-web), the worker’s session_id and subject_id

token, refresh_version

device_verification refused

error, reason; session and subject when known

token

token_exchange issued opened (approval)

version 3’s opened columns and device_id

device_id beside any other event

device_code issued

token jti, kid and expiry, subject_id, session_id, roles, programs, device_id, refresh_version = 1

session_event

refresh_token issued

as device_code, refresh_version ≥ 2 and no device_id

session_event

device_code, refresh_token refused

error, reason; session_event = 'revoked' exactly when the owner function reports it revoked (did_revoke); session, subject and the presented refresh_version when known

token

Schema

Two migrations on the established template (owner transfer, REVOKE ALL, exact grants, -- global-ddl: markers, a closing audit; global_ddl.rs grows by two and xtask’s pin goes from 11 to 13): 20261218000000_identity_issuance_log_v4.sql, then 20261219000000_identity_native_sessions.sql.

  • identity_sessions: the two kind CHECKs become (kind = 'web' AND client = 'canopy-web') OR (kind = 'native' AND client = 'canopy-cli'); credential_hash's comment states N4.

  • INSERT-only (identity_registry_immutable; DELETE left to the owner’s purges): identity_device_authorizations (device_id UUID v7 PK; device_code_hash and user_code_hash UNIQUE, 32 bytes; client = canopy-cli; created_at; expires_at, at most 600 s later; an index on expires_at); identity_device_decisions (device_id PK and FK; decision IN (approved, denied); decided_at; subject_id FK; session_id UNIQUE FK; (decision = 'approved') = (session_id IS NOT NULL)); identity_native_refresh_credentials (credential_id UUID v7 PK; credential_hash UNIQUE, 32 bytes; session_id FK; version ≥ 1; jkt thumbprint CHECK; issued_at; UNIQUE (session_id, version)); identity_dpop_proofs (jkt, jti of 1–128, expires_at, PK (jkt, jti)), the jti-store shape of identity_client_assertions (column INSERT only; a replay is zero rows).

  • Revocation reasons gain refresh_reused, device_code_reused and unredeemed, written only by the native functions; the issuer’s identity_revoke_session allowlist stands.

Owner functions are SECURITY DEFINER with a pinned search_path; those that lock refuse anything but READ COMMITTED; expiry is judged at the caller’s p_now (Utc::now()), the purges at clock_timestamp(). Answers in precedence, the first that holds:

Function Locks Answers

identity_start_device_authorization(device, code_hash, user_hash, client, created_at, expires_at)

—

user_code_taken (a caught unique_violation; the store retries up to three times), started

identity_approve_device(user_hash, session, now), after identity_link_or_mint_subject and identity_open_session in the approval transaction, which rolls back on any answer but approved

the decision PK

unknown, expired, decided, approved (raises when the session’s client is not the device’s)

identity_deny_device(user_hash, subject, now)

the denying subject (KEY SHARE), then the decision PK

unknown, expired, decided, denied

identity_redeem_device(code_hash, credential_id, credential_hash, jkt, now) → (answer, session, device, did_revoke)

the subject (KEY SHARE), then the session (FOR UPDATE), when approved

unknown; undecided: expired at or past expires_at, else pending; denied; revoked; ended; suspended; reused (version 1 exists; inserts device_code_reused, did_revoke from that insert); expired (approved, unredeemed, at or past expires_at); redeemed (inserts version 1 with jkt)

identity_rotate_native_refresh(session, presented_version, credential_id, credential_hash, now) → (answer, did_revoke)

the same

revoked, ended, suspended, reused (the latest is not the presented version; inserts refresh_reused, did_revoke from that insert), rotated (the next version, jkt copied from the latest, never the caller’s)

identity_revoke_unredeemed_native_session(session, now) → boolean

the same

true, inserting unredeemed, only for a native, unrevoked session with no refresh credential whose device’s expires_at is at or before now

identity_purge_devices(batch), by the session sweeper

devices FOR UPDATE SKIP LOCKED

deletes up to batch (1–1000) devices with no approved decision whose expires_at is over 720 h past, decisions first; the margin keeps it clear of an approval’s FK lock

identity_purge_dpop_proofs(batch), by the jti sweeper

as identity_purge_client_assertions

rows deleted

identity_purge_sessions(batch), replaced

as today

also deletes the doomed sessions' refresh credentials, decisions and devices first

Lock order stays subject before session, and every decision function holds its subject’s lock before it claims a decision PK (approval through identity_open_session, denial explicitly), so no transaction waits on a subject while holding a decision another waits for. Device rows are locked only by the purge and the decisions' FK. The token is signed before the rotation’s transaction and released only after it commits with its log row; reused commits its revocation and refused row, and every other answer but rotated rolls back. The issuer gets SELECT on the three readable tables, INSERT (jkt, jti, expires_at) on the proofs and EXECUTE on the eight functions; the admin’s matrix is unchanged; REGISTRY_TABLES, REGISTRY_FUNCTIONS and the issuer probe follow.

Conventions every unit follows

  • Every new parser has its evil-input table and a proptest; errors never echo input; logs carry canopy subject, session and device ids, never a token, credential, code, proof, upstream sub or username.

  • Times come from chrono::Utc::now() (D14); tests inject clocks and never sleep. Database tests live in tests/; each race test is checked by hand to fail with its lock removed.

  • Every unit ships its CHANGELOG.adoc bullet and its surface’s canonical page.

Units

  1. U1 (w3) — feat(auth): add device codes, user codes and native limits (#2740). DeviceCode, RefreshCredential, UserCode; the grant, token-type and parameter constants; DEVICE_APPROVAL_MAX_AGE_SECONDS and NATIVE_BUDGET; SessionLimits gains the native maximum (identity_native_session_max_seconds in config.rs) and SessionTerms::open takes it; CanopyRefusal::UserCodeInvalid. Tests: the user-code evil table (vowels, digits, 7 and 9 symbols, lookalikes, NUL, separators); proptests (render, then parse; no panic); the limits' and the setting’s bounds. Docs: ADR-049 Amendment 9, this page and its nav entry, shared-crates.adoc, configuration-reference.adoc. Erratum (2026-10-06): SessionTerms::open takes a SessionKind and reads that kind’s maximum from SessionLimits, which gains it through with_native_session_max, so SessionLimits::new keeps its two arguments; the three 32-byte opaque credentials share identity_session's spelling, parsing and hashing.

  2. U2 (w5) — feat(auth): verify and mint DPoP proofs (#2741) (crates/canopy-auth/src/identity_dpop.rs). Tests: the evil corpus (alg none, HS256, ES384; d, RSA, OKP, another curve, off-curve and non-canonical coordinates; extra and duplicate members, a bad typ; missing and extra claims, ath, nonce and exp among them; htm GET and post; htu of another host, path or scheme, with a query or fragment, and normalized equivalents accepted, an explicit :443 among them; iat ±61 s; a bad jti; signed by another key; truncated, padded, oversized); zero or two headers; proptests (verification never panics; a minted proof verifies; its thumbprint is the signer’s). Erratum (2026-10-06): htu and the target are normalized by the URL parser (WHATWG, a superset of RFC 3986 §6.2.2 and §6.2.3) and by RFC 3986 §6.2.2.2’s percent-escape rule; the embedded key must be a JSON object (JsonObject, moved beside json_object in identity_jws), and every segment is decoded before any is judged.

  3. U3 (w5) — feat(security): record native grants in the issuance log (#2742). Tests: each row of the table and each violation; version-4 revocation rows held to RFC 7009’s four errors and delegation and client_credentials rows to version 3’s rules; the version 2 and 3 revocation negatives kept; a new version-3 row refused; stored version 1–3 rows and digests intact; a mixed batch; rollback. Docs: data-models/canopy-security.adoc, authorization-inventory.adoc.

  4. U4 (w5) — feat(security): store native sessions and devices (#2743). Tests (database, issuer login): every CHECK; every function’s answers in precedence; did_revoke true on a first replay and false on a later one and after an administrative revocation, for redemption and rotation; jkt copied on rotation; user_code_taken; each purge with the new rows present; direct writes and other isolation levels refused. Docs: data-models/canopy-security.adoc, security-operations.adoc.

  5. U5 (w5) — feat(security): serve native sessions from the store (#2744). NativeSessions and PgNativeSessions, PgDpopJtiStore; current() by kind; revocation by credential hash with RevokeRecord.by: Client; the sweepers' new calls; the pool at 22. Tests (two or three pools): approve × approve, approve × deny, approval (subject A) × re-link (B, then A) × denial (by B) with B < A, redeem × redeem, redeem × suspension, redeem × administrative revocation, rotate × rotate, rotate × administrative revocation, rotate × suspension, redeem × revoke-unredeemed at the expiry edge, purge-devices × approve, re-link × redeem and renewal × rotate (no deadlock), the DPoP jti across pools; a revalidation credential passes neither web renewal nor delegation from a session. Docs: configuration-reference.adoc.

  6. U6 (w3) — feat(security): disable and budget native clients (#2745). Client status, the disabled set and ClientLimits keyed by Client; client_named accepts canopy-cli; GET clients gains kind (confidential, native), canopy-cli’s row registered: false, enabled: true (a native client needs no registration; only runtime disablement applies); the guard’s comment cites N9. Tests: canopy-cli disabled by route takes effect within 5 s on a manual clock; budget isolation and refill; the guard still refuses canopy-cli chains. Docs: configuration-reference.adoc, api/canopy-security.adoc, security-operations.adoc.

  7. U7 (w5) — feat(security): start device flows and verify user codes (#2746). N1, N2, the URI setting, the attempt budget, device_authorization_endpoint. Tests: form evil tables and a parser proptest; every refusal with its row; a collision retried and exhausted; ten attempts, then a logged 429, describes, denials and approvals (U8) drawing on one budget; no-store; 503 unconfigured. Docs: api/canopy-security.adoc, configuration-reference.adoc, services.adoc, authorization-inventory.adoc.

  8. U8 (w5) — feat(security): approve devices and renew native sessions (#2747). N3, reusing federation’s verification (identity/token_endpoint/federation.rs); N4, generalizing renewal, grace and revocation by kind; the unredeemed rule. Tests: approval per profile kind; auth_time 600 s accepted and 601 s refused; the attempt budget at approval; a refused approval leaves no subject, session or decision; renewal, grace and upstream_changed; unredeemed after expiry answers session_ended; the form evil table. Docs: api/canopy-security.adoc, idp-integration.adoc (the contract plan I3’s canopy-web follows).

  9. U9 (w5) — feat(security): redeem device codes with DPoP (#2748). DPoP read before the body; the grant in the request grammar; the slow_down limiter; I2d’s sign with act [canopy-cli]; its metadata. Tests (manual clock): a poll 4.9 s after the last answers slow_down and one 5 s after pending, and a slow_down answer does not restart the 5 s; denied, expired, unknown; redemption issues the token and version 1; reuse revokes; a token whose transaction does not commit is never released; DPoP refusals mapped; the form evil table. Docs: api/canopy-security.adoc, security.adoc.

  10. U10 (w5) — feat(security): refresh and revoke native sessions (#2749). N6, N8 and their metadata. Tests: a rotation chain; narrowing leaves the session’s sets; another key refused, nothing revoked; a superseded version revokes; stale, ended, suspended; G3’s 5 s floor at the session’s end; fault injection: a rotation whose log row is refused or misses its deadline rolls back, and the same version then rotates with nothing revoked; canopy-cli revocation by current and superseded versions, and 200 ignored for foreign tokens; canopy-web revocation by the revalidation credential; a disabled canopy-cli refused; form evil tables. Docs: api/canopy-security.adoc, security.adoc, authorization-inventory.adoc.

  11. U11 (w3) — test(identity): prove the device flow end to end in process (#2750) (services/canopy-security/tests/identity_native/end_to_end.rs). Device authorization, describe, pending and slow_down, approval through the mock upstream (an 11-minute step-up refused), DPoP redemption, the token at its receiver, a refresh for another target, an onward hop, a native renewal, a superseded credential revoking, and canopy-web’s next renewal answering session_ended; a second test, canopy-cli’s logout. Docs: Amendment 9’s as-built record. The plan closes here: Status Done (YYYY-MM-DD) — !N; the page moved to docs/modules/ROOT/pages/plans/archive/, every xref following; the nav group removed and the archived entry appended, suffixed — DONE YYYY-MM-DD; cargo xtask plan-lint --done with --allow-open for 2740 to 2750.

Maintainer calls embedded in the decisions

  1. No security administration from native sessions (N9), narrowing D6, which implies 10 minutes of it after approval.

  2. Strict refresh-reuse detection (N6, RFC 9700): a lost response or a CLI racing itself ends the session, and every per-target token costs a rotation.

  3. Describe needs the worker’s web session (N2), so the attempt budget is per worker, not one global limit any worker could exhaust.

  4. Accepted residuals: one step-up id_token may approve several devices within its 300 s federation window; user-code hashes do not resist a database reader (34.6 bits); CLI hosts more than 60 s off fail DPoP (nonces deferred); per-replica budgets multiply with replicas; anyone may create pending device authorizations within the per-IP limit (purged after expiry); every pending poll is logged.

Verification

  1. Per unit: fmt; clippy in both profiles; nextest for canopy-auth and canopy-security; rustdoc-private; quality-budgets; feature-builds; migrations-lint and db-pools (U3–U5); the database tests with CANOPY_TEST_INFRA=required on a reloaded devstack; plan-lint.

  2. End to end: U11 drives the native lifecycle through the token routes in process, the upstream mocked.

  3. Per MR: cargo xtask dev reload, then git push (the pre-push battery).

Review log

round vendor resolved model verdict

1 (2026-10-06)

Anthropic

claude-opus-5-5

no-ship. Seven blockers, all fixed: the version-4 row shapes (the table); open wire contracts (the wire table, the attempt keys, revocation’s ignored, canopy-cli’s GET clients row); the owner functions (precedence, the approval’s composition and rollback, the unredeemed conditions, the purge margin and sweepers, the time source); decision labels renamed N1–N11 apart from plan stages; untested fault paths (rotation commit fault injection, redeem × suspension and administrative revocation, purge × approve); unit order (the native setting in U1, metadata with the unit serving it); conformance (the one-MR reason and title, Status at U1, a UUID v7 key for refresh credentials).

2 (2026-10-06)

human-run

not stated

Seven findings, all fixed: denial could deadlock with approval and re-linking (denial locks its subject before its decision; a three-way test); version-3 CHECKs keyed to their version let version-4 rows bypass them (replaced or restated, negative tests); redemption could not say whether it revoked (did_revoke; revoked before reused); the attempt budget was two (one, keyed by upstream identity); refresh_token and none belong in different metadata fields; slow_down's rule made exact; htu normalization includes RFC 3986 §6.2.3. No round 3.

Edit this page · default