Identity plane split, plan I1a: canopy-identity keys and publication (epic &131)
- Context
- Scope
- Design
- Units — U1 → U2 → U3 → U4 → U5
- U1 (w3) —
feat(signing): add the KeySigner primitive and RFC 7638 kids (#2496) - U2 (w2) —
feat(devstack): reconcile least-privilege logins on every start (#2497) - U3 (w5) —
feat(security): add the identity key registry and issuer login (#2498) - U4 (w3) —
feat(security): add the per-replica ephemeral key ring (#2499) - U5 (w3) —
feat(security): serve the canopy-identity JWKS (#2500)
- U1 (w3) —
- Verification
- Follow-up issues
- Review log
Status: Done (2026-10-01) — !1546
Epic: &131 (stage I1 of &130)
Issues: #2496 (w3), #2497 (w2), #2498 (w5), #2499 (w3), #2500 (w3)
Branch: feat/identity-keys-and-jwks, one MR with five commits, titled "canopy-identity keys and JWKS (#2496, #2497, #2498, #2499, #2500)". It closes all five issues. It carries this page, which the U1 commit adds with its nav entry. The plan closes in a follow-up docs MR, as plan B3 did.
-
Erratum (2026-09-30): U1 as built. Eight services call
boot_applicant_verifier(applications, eligibility, enrollment, notices, persons, renewals, security, verification), not nine. The conformance feature istest-helpers, nottest-support: the workspace’sclippy::cargogroup deniesredundant_feature_namesfor a-supportsuffix. U4’s test entry is corrected tofeatures = ["test-helpers"]. -
Erratum (2026-09-30): the MR also carries two related defects U2 surfaced, each its own commit: #2503 (the Postgres healthchecks probe TCP, so the one-shot is not refused during first init; before U2) and #2504 (the reporting least-privilege tests fail instead of skipping when the login is missing; after U2). U2 also stops the devstack bring-up at once when a one-shot exits non-zero, instead of running port-recovery rounds.
-
Erratum (2026-09-30): U3 as built. The EphemeralSchema tests gate in their bodies on
infrastructure_available(), the tree’s convention (chain_v2_substrate_test.rs), not on#[ignore]. The test fixture mirrors every schema-local issuer privilege but not database CONNECT, which PUBLIC holds by default; a database grant would rewrite the sharedpg_databaserow that concurrent tests touch. The reconcile exempts ADMIN-only members of the issuer role (INHERIT and SET both false): PostgreSQL 16+ grants a non-superuser CREATEROLE migrator exactly that membership in every role it creates. #2508 tracks the same behaviour in chain-v2’s migrations. The probes and the closing audit are stricter than listed: they also check registry ownership, hold a positive grant-matrix check, and refuse any other issuer privilege in the schema. Effective ownership is tested withpg_has_role(…, 'MEMBER')onnspowneranddatdba, not'USAGE': on PostgreSQL 16+ USAGE follows only INHERIT grants and misses a SET-only membership that canSET ROLEto the owner (MEMBER also coverspg_database_owner). The schema checked is the oneidentity_signing_keysresolves to (to_regclass), notcurrent_schema(). -
Erratum (2026-09-30): U4 as built adds a clock-trust check the design lacked.
std::time::Instant(CLOCK_MONOTONIC) stops during a system suspend, so monotonic windows could outlive the registry’ssign_until. Every database reading (an insert’sRETURNING, a read-back that finds its row, the 60 s sample) is compared with the previous one. Database-clock progress more than 5 s outside the monotonic time the round-trip brackets allow drops every held key, logs, countscanopy_identity_clock_divergence_totaland publishes a fresh key; the residual is one sampling interval. U4 also exportscanopy_identity_wall_clock_steps_total, samples the registry-widecanopy_identity_published_keysevery 60 s, and splits the ring intoidentity/key_ring.rspluskey_ring/{schedule,pg,metrics,tests}.rs. -
Erratum (2026-09-30): U5 as built. The JWKS read runs under U4’s 11 s registry call budget, and requests behind a failed read share its 503 (failures are never cached), so "one read per 5 s" holds while reads succeed.
Agecounts from when the read was sent. The route’s database tests extendservices/canopy-security/tests/identity_registry_test.rs, and the pages that quote the router’s signature (shared-crates.adoc,implementation-guide.adoc,coding-conventions.adoc) are updated. The MR also carries #2510, a related defect U5 surfaced: canopy-verification’snoop-adaptersinternal routes move intopublic_routes, so no service merges routes afterApiServer::router. -
Erratum (2026-10-01): U5 also moves canopy-renewals' router construction into
build_router, as #2510 does for canopy-verification. The newpublic_routesargument had taken itsmain()over the 100-line function budget (B2).
The MR bundles five issues under the maintainer’s one-MR-per-related-group ruling. The units form one deliverable, and each commit builds on the previous one.
This is a Design + Scope plan. GitLab owns tracking. The plan freezes when U1 starts.
Context
ADR-049 makes canopy-identity, a module of canopy-security, the one issuer every service trusts. D9 fixes the key design:
-
each replica holds its ES256 key in memory only;
-
public keys go into a registry whose invariants the database enforces against the runtime credential;
-
the JWKS is served from the database.
In the tree today:
-
canopy-signing has no key abstraction and no RFC 7638 thumbprint. Its only signer is PEM-loaded (
crates/canopy-signing/src/signer.rs). -
canopy-signing depends on canopy-auth only for
ApplicantVerifierAdapter(crates/canopy-signing/src/applicant_claim.rs). That dependency blocks I1b from signing client assertions in canopy-auth with the same primitive. -
canopy-security’s runtime and migrations use the devstack superuser (
docker-compose.yml,CANOPY_SECURITY__DATABASE_URL). A database-enforced invariant needs a separate login that owns nothing. -
A new least-privilege login reaches an existing devstack only through
cargo xtask dev clean --confirm. Role creation lives indevstack/postgres/init.sql, which runs on an empty volume only. -
Every service route sits under
/v1, behind the bearer middleware (crates/canopy-api/src/lib.rsApiServer::router). An unauthenticated JWKS needs a public route that still gets the outer layers.
Scope
In scope:
-
the
KeySignerprimitive and the dependency inversion (U1); -
the devstack role reconcile (U2);
-
the registry, the issuer login and the probes (U3);
-
the key ring, the reported readiness arm and process hardening (U4);
-
/identity/jwks(U5).
Out of scope:
-
everything I1b owns: client authentication, the token endpoint, RFC 8414 metadata, system tokens, purposes, the issuance audit, the receiver validator and the issuer identifier config;
-
gating readiness on the key and the issuer-host bootstrap, both at the first real consumer (I3);
-
moving canopy-security’s main runtime off the superuser, which is #2501.
Design
U1: KeySigner (crates/canopy-signing)
-
JwsAlg:#[non_exhaustive],Es256only. -
Kid: an opaque, validated newtype.-
It accepts 1–128 characters from
[A-Za-z0-9._-], so determination kids (canopy-{program}-{hex16}) and test kids such assnap-currentstay valid. -
Kid::rfc7638(&PublicJwk)computes the RFC 7638 thumbprint over{"crv":"P-256","kty":"EC","x":…,"y":…}with sha2 and unpadded base64url (base64ct). -
Only canopy-identity requires thumbprint equality.
-
-
PublicJwk {x, y}: canonical unpadded base64url of the 32-byte coordinates. -
PublicKeyInfo {kid, alg, jwk}. -
#[async_trait] pub trait KeySigner: Send + Sync:-
fn public(&self) → &PublicKeyInfo; -
async fn sign(&self, signing_input: &[u8]) → Result<RawSignature, SignError>.RawSignatureis 64 bytes, r‖s (RFC 7518 §3.4).SignErroris a thiserror enum:Unavailable,Timeout,Refused,Internal.
-
-
LocalP256Key::generate():p256::ecdsa::SigningKey::random(&mut OsRng), never serialized, zeroized on drop. -
async fn mint_compact_jws(&dyn KeySigner, typ: &str, claims: &impl Serialize, deadline: Duration) → Result<String, SignError>. The header is{"alg":"ES256","kid":…,"typ":…}, built outside the signer. -
assert_key_signer_conformance(&dyn KeySigner)lives incanopy_signing::conformance, under#[cfg(any(test, feature = "test-support"))], so I1b and later backends reuse it. It verifies withp256, a normal dependency. Thejsonwebtokencross-check lives only in canopy-signing’s own tests, wherejsonwebtokenis a dev-dependency. -
DeterminationSigneris unchanged. -
The dependency inversion.
-
ApplicantVerifierAdapter,load_applicant_verifierandboot_applicant_verifiermove into canopy-auth, and the nine service mains callcanopy_auth::boot_applicant_verifier. -
canopy-signing keeps
ClaimVerifyingKeyRegistryand drops its canopy-auth dependency, so canopy-auth may depend on canopy-signing.
-
-
Adopting
KeySignerfor determination signing (ADR-049 D9) is #2502.
U2: devstack role reconcile
-
The one-shot. A compose service
postgres-roles:-
image: postgres:18-alpine, the same profile list aspostgres,depends_onpostgres healthy; -
it runs
psql -v ON_ERROR_STOP=1 -f /roles.sqlagainst thecanopysuperuser, withrestart: "no"; -
devstack/postgres/roles.sqlis bind-mounted read-only.
-
-
roles.sql. An idempotent DO block. For each dev login it runs
CREATE ROLE … LOGIN PASSWORDwhen the role is absent, orALTER ROLE … LOGIN PASSWORDwhen it exists. It coverscanopy_reporting_app(moved out ofinit.sql) andcanopy_identity_issuer. The passwords are dev-only…-not-for-productionvalues. -
Ordering. canopy-reporting and canopy-security
depends_onit, withcondition: service_completed_successfully. -
xtask.
parse_not_running(xtask/src/docker.rs) exempts a declared one-shot that exited with code 0, using{{.ExitCode}}. A one-shot that exits non-zero is still reported stuck. -
Docs.
local-dev.adocdrops thedev cleanstep for a new role.
U3: the key registry and the issuer login
-
The migration.
services/canopy-security/migrations/20261209000000_identity_signing_keys.sql, forward-only, following the canopy-reporting least-privilege migration. Every role or grant statement carries a-- global-ddl:marker. -
Roles.
-
Guarded
CREATE ROLE canopy_identity_owner NOLOGIN. -
Guarded
CREATE ROLE canopy_identity_issuer NOLOGIN. A deployment, orroles.sql, makes itLOGINwith a secret password. The migration never alters it. -
Enabling grants, each with a marker:
-
GRANT canopy_identity_owner TO current_user, so a migrator that is not a superuser can transfer ownership; -
the owner gets
USAGE, CREATEoncurrent_schema()viaEXECUTE format. The SECURITY DEFINER bodies need that USAGE, becausetest_<hex>schemas give PUBLIC none.
-
-
A reconcile refuses:
-
an owner that can log in;
-
any privileged attribute on either role;
-
any member of the issuer role other than
test\_%.Members of the owner role are not refused. Migrator identities accumulate there by design, as in chain-v2’s membership block.
-
-
-
Tables, owned by the owner, with schema-qualified names interpolated at migration time. Every column is
NOT NULLexceptclient_addr, sinceinet_client_addr()is NULL over a Unix socket.-
identity_signing_keys:-
kid TEXT PRIMARY KEY,x TEXT,y TEXT,replica_id UUID,requested_sign_seconds INTEGER; -
created_at,sign_from,sign_until,publish_until TIMESTAMPTZ NOT NULL; -
inserted_by TEXT,client_addr INET.
-
-
identity_key_revocations:kid TEXT PRIMARY KEY REFERENCES identity_signing_keys,revoked_at,reason <> '',actor <> '',revoked_by TEXT. -
identity_signing_key_cap_guard: one row,id = 1,generation BIGINT, with no grants.
-
-
CHECKs, which hold even with triggers bypassed:
-
x,yandkideach match^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$(canonical base64url for 32 bytes); -
kidequals the SQL RFC 7638 thumbprint of(x, y); -
requested_sign_seconds BETWEEN 600 AND 86400; -
sign_from = created_at + 60 s,sign_until = created_at + requested_sign_seconds,publish_until = sign_until + 720 s.
-
-
identity_signing_keys_stamp(). A BEFORE INSERT row trigger:SECURITY DEFINER, owned by the owner,SET search_path = pg_catalog, pg_temp, schema-qualified names only, no dynamic SQL. It:-
overwrites the timestamps from
clock_timestamp(); -
stamps
inserted_by = session_userandclient_addr = inet_client_addr(); -
increments the guard row with
UPDATE(under READ COMMITTED concurrent inserters wait; under REPEATABLE READ they get 40001), and raises if no row matched; -
counts unrevoked rows whose
publish_until > clock_timestamp(), and refuses a 65th with SQLSTATE54000. It uses wall-clockclock_timestamp(), never transaction-startnow(), so rows inserted earlier in the same transaction still count.A revoked row frees its slot, so the compromise response can publish again at once. This amends ADR-049 D9.
-
-
identity_registry_immutable(). A statement-level trigger on both tables that refuses UPDATE, DELETE and TRUNCATE with23514. It has no bypass setting and uses the default enable state.session_replication_rolestays the superuser’s break-glass. -
identity_revoke_key(p_kid text, p_reason text, p_actor text).SECURITY DEFINER, with the same hardening; it stampsrevoked_by = session_user.EXECUTEon all three functions is revoked from PUBLIC. Nobody is grantedEXECUTEon this one: in I1a the revocation runbook runs it as the migration identity, and I2 chooses its caller. -
Grants to the issuer. The migration first runs
REVOKE ALLon every identity table, column and function from the issuer, clearing anything default privileges granted at creation. It then grants exactly:-
USAGEoncurrent_schema()andCONNECToncurrent_database(), each viaEXECUTE formatwith a marker; -
SELECTand a column-levelINSERT (kid, x, y, replica_id, requested_sign_seconds)onidentity_signing_keys; -
SELECTonidentity_key_revocations.The migration ends by refusing any privilege on the identity objects held by a role other than the owner and the issuer. It also refuses any issuer privilege outside that exact matrix, and any grant option.
-
-
The issuer pool.
-
canopy-security reads
CANOPY_SECURITY__IDENTITY_DATABASE_URLthroughcanopy_common::key_material::require_secret(no file fallback), then validates it withcanopy_db::validate_database_name(url, "canopy-security"). -
It connects with
DbPool::connect_with, at most 4 connections. -
DbPoolOpts(crates/canopy-db/src/lib.rs) gainsapplication_nameandsession_settings, applied throughPgConnectOptions::application_nameandoptions, with a unit test. The pool setslock_timeout = 5s,statement_timeout = 5sandapplication_name = canopy-identity. -
IDENTITY_DATABASE_URLandALLOW_BROAD_DB_ROLEjoinRESERVED_KEYS(services/canopy-security/src/config.rs).
-
-
Probes. A pure decision table over probed facts, in the
services/canopy-reporting/src/guard.rspattern, with the expected role name injectable.-
The issuer pool, strict everywhere. It requires all of:
-
session_user = current_user = canopy_identity_issuer; -
no role memberships and no privileged attributes;
-
no CREATE on the schema;
-
no effective ownership (
pg_has_role(…, 'USAGE')onnspowner/datdba, which coverspg_database_owner) of the schema or the database; -
exactly the granted privileges: no
INSERTon revocations, noEXECUTEonidentity_revoke_key, noUPDATE/DELETE/TRUNCATE, no grant options; -
has_parameter_privilege(current_user, 'session_replication_role', 'SET')is false.
-
-
The main pool. Unless
CANOPY_SECURITY__ALLOW_BROAD_DB_ROLEis exactlytrue(override_flag_is_true), it refuses:-
superuser status;
-
membership of
canopy_identity_owner; -
effective ownership of the schema or the database, since an owner could drop and replace the registry.
-
The devstack sets the override, because the migration role and the main role are one superuser until #2501 lands.
-
Until then, the main credential can act as the identity owner.
security-operations.adocstates this.
-
-
-
Compose (in this commit, so every commit boots). canopy-security gains:
-
IDENTITY_DATABASE_URLfor the issuer login; -
an explicit
MIGRATION_DATABASE_URL(today’s superuser); -
ALLOW_BROAD_DB_ROLE: "true", with a comment naming #2501.
-
-
Test helper.
-
disposable_loginmoves fromservices/canopy-security/tests/chain_v2_substrate_test.rsinto canopy-test-lib. -
For the issuer, the fixture grants the disposable login the issuer’s exact direct privileges, never membership through
IN ROLE. The real SQL probe must then pass against it, with the expected name injected. Production checks are not weakened.
-
U4: the key ring
-
identity::key_ring::EphemeralKeyRing, one per replica. Scheduling is a pure state machine fed by an injected clock (ADR-049 D14: nevercanopy_common::clock). -
Monotonic windows. Each insert’s
RETURNINGgivesclock_timestamp()alongside the stamped times, and the ring converts the differences into monotonicInstantdeadlines. A wall-clock step cannot move a window. The bounds are conservative:-
the window opens at response receipt + (
sign_from− db_now); -
it closes at request start + (
sign_until− db_now) − 5 s.A periodic check compares wall-clock and monotonic elapsed time. A step of more than 5 s logs, counts, and resamples the database offset. The token claims in I1b come from
chrono::Utc::now().
-
-
Insertion.
-
Each insert runs in autocommit.
-
The first key requests 600 s. Boot makes one synchronous insert attempt as its last step, after the router is built. Serving starts whatever the outcome, with
active()=Noneon a failure while background retries continue. A crash-looping replica therefore holds few rows, and a full cap cannot block canopy-security’s boot. -
Each next key requests 21600 s and is inserted at
sign_until − 120 sof the current key.
-
-
Signing window. A key signs only between its two monotonic deadlines. At the closing deadline the retired key is dropped, which zeroizes it.
-
Failures.
-
A failed insert (the database, or
54000) retries with backoff, andcanopy_identity_key_publish_refused_total{reason}counts it. -
After any ambiguous failure, the retry first reads back its own pending
kid. If the row exists, the insert succeeded. This covers a lost response at a full cap, where a re-insert would meet54000before any uniqueness check.23505on its ownkidis also treated as success. -
With no signable key,
active()isNone, which fails closed.
-
-
Readiness. canopy-api gains an opt-in
IdentityKeyHealthextension./readyzreports it but does not gate on it (theassemble_readyzrule for non-core arms). Gating arrives with the first consumer, together with a longercrates/canopy-test-lib/src/multi_replica.rsceiling. -
Metrics.
canopy_identity_active_key_age_seconds,canopy_identity_published_keysandcanopy_identity_db_clock_offset_seconds. -
Hardening.
-
The first line of canopy-security’s
main()callsrustix::process::set_dumpable_behavior(NotDumpable). -
rustix is a new
[workspace.dependencies]entry (version = "1", featureprocess), used under[target.'cfg(target_os = "linux")'.dependencies], since xtask links canopy-security and must build on Windows. It is already inCargo.locktransitively, and its licence is allowed. -
The alternatives lose:
libc::prctlneedsunsafe, which the workspace denies, andnixis not in the lock. -
Compose sets
ulimits: core: 0. -
deployment-guide.adocdocuments a read-only root filesystem and no exec for production.
-
U5: the JWKS
-
Routing.
ApiServer::routergains apublic_routes: Routerparameter, merged before its outer layer stack, so public routes get the security headers, access log, trace, CORS and body limit. Every service passesRouter::new(); canopy-security passes/identity/jwks. -
GET /identity/jwks:-
reads through the issuer pool, keeping D2’s isolation;
-
returns published (
created_at ⇐ now < publish_until) and unrevoked keys, newest first, at most 64, as theJwkKey/Jwkswire types (crates/canopy-contracts-security/src/signing_keys.rs); -
skips, with a warning log, any row whose
(x, y)is not a P-256 point; -
memoizes single-flight for up to 5 s per replica (5 s + the 30 s receiver debounce, well inside the 60 s lead);
-
sends the memo’s age in the standard
Ageheader (RFC 9111 §5.1). I1b’s receiver validator measures staleness from the set’s generation time (request start −Age), so ADR-049’s 300 s and 720 s bounds hold as stated; -
answers
503on a database error, never a stale set; -
sets
Cache-Control: no-cache.
-
-
Documentation. The route is outside
/v1and outside the OpenAPI document, which is relative to/v1. It is documented inapi/canopy-security.adocand pinned by a route test. The path count stays 21.
Units — U1 → U2 → U3 → U4 → U5
Every unit ships its CHANGELOG.adoc bullet (Added, or Changed for U1’s dependency inversion).
U1 (w3) — feat(signing): add the KeySigner primitive and RFC 7638 kids (#2496)
Files: crates/canopy-signing/src/{key.rs,jwk.rs,conformance.rs,lib.rs,applicant_claim.rs,Cargo.toml}, crates/canopy-auth/src/{applicant_verifier.rs,lib.rs,Cargo.toml}, the nine callers of boot_applicant_verifier, and shared-crates.adoc.
Tests:
-
assert_key_signer_conformance(&dyn KeySigner): a 64-byte signature, verification by bothp256andjsonwebtokenagainst the published JWK, and refusal under a mismatched key; -
the thumbprint equals
jsonwebtoken'sJwk::thumbprint(SHA256)(dev-dependency); -
proptests:
-
mint-then-verify round trip, and any single-bit tamper is refused;
-
Kidparsing never panics, andPublicJwkencoding round-trips to the canonical form.
-
U2 (w2) — feat(devstack): reconcile least-privilege logins on every start (#2497)
Files: docker-compose.yml, devstack/postgres/{roles.sql,init.sql}, xtask/src/docker.rs, local-dev.adoc.
Tests: the one-shot exemption, as a pure parse_not_running test: exit 0 is exempt, non-zero is stuck.
U3 (w5) — feat(security): add the identity key registry and issuer login (#2498)
Files:
-
the migration;
-
services/canopy-security/src/{identity/mod.rs,identity/registry.rs,identity/probe.rs,config.rs,main.rs}; -
crates/canopy-test-lib/src/db.rs(disposable_login); -
docker-compose.yml; -
docs:
data-models/canopy-security.adoc,configuration-reference.adoc, andsecurity-operations.adoc(guard rows, issuer provisioning, the revocation and compromise runbook, cap break-glass); -
ADR-049 Amendment 1. Revoked rows free their slot, and the cap is serialized by an owner-held guard row, replacing D9’s "checked under a table lock". It also records the
Age-based staleness measure. -
The compromise runbook:
-
ALTER ROLE canopy_identity_issuer NOLOGIN; -
pg_terminate_backendon every issuer session inpg_stat_activity, waiting until none remain. A password change alone leaves live sessions usable. -
revoke the attacker’s rows with
identity_revoke_key; -
set a new password and restore
LOGIN; -
restart every replica.
-
Tests (EphemeralSchema, disposable issuer login, each #[ignore = "requires devstack"]):
-
caller timestamps are overwritten, or refused by the column grant;
-
each CHECK refuses its violation (a kid mismatch, a non-canonical encoding, a NULL coordinate, a lifetime out of range);
-
two concurrent inserts at 63 published rows leave exactly 64;
-
two inserts in one transaction at 63 rows leave exactly 64;
-
the real probe passes for the directly granted disposable login, and refuses each over-privilege: revocation insert,
EXECUTE, a grant option, schema or database ownership; -
a revocation frees a slot;
-
UPDATE, DELETE and TRUNCATE are refused;
-
the issuer cannot run
ALTER TABLE,DISABLE TRIGGER,SET session_replication_role,CREATEin the schema, oridentity_revoke_key; -
each probe fact refuses on its own;
-
the override flag’s literal matching.
U4 (w3) — feat(security): add the per-replica ephemeral key ring (#2499)
Files: services/canopy-security/src/{identity/key_ring.rs,main.rs,Cargo.toml}, crates/canopy-api/src/lib.rs (IdentityKeyHealth), docker-compose.yml, deployment-guide.adoc.
Tests (state machine, no sleeps):
-
the 600 s first key, then 21600 s keys;
-
the next insert at
sign_until − 120 s; -
never signs before
sign_from; -
a wall-clock step of ±1 h moves no window, and is detected and resampled;
-
a lost response at a full cap recovers by read-back;
-
Noneaftersign_untilwith the database down; -
54000retries and counts; -
23505on its own kid is success; -
a failed first insert still lets the server start with
active()=None; -
canopy-security’s tests call
assert_key_signer_conformancethroughcanopy-signing = { workspace = true, features = ["test-helpers"] }, so clippy--all-targetsalso compiles the helper in a downstream consumer. -
the readiness body reports without gating.
U5 (w3) — feat(security): serve the canopy-identity JWKS (#2500)
Files: crates/canopy-api/src/lib.rs (public_routes) and its callers, services/canopy-security/src/identity/jwks.rs, api/canopy-security.adoc, services.adoc (the route and tables), authorization-inventory.adoc (a public-route row).
The follow-up docs MR, after the plan’s MR merges, closes the plan:
* it sets Done (YYYY-MM-DD) — !N with the merged MR’s number;
* it moves the page into docs/modules/ROOT/pages/plans/archive/;
* it repoints the nav entry into the archive list;
* it runs cargo xtask plan-lint --done.
Tests:
-
published-minus-revoked, newest-first, capped at 64;
-
an invalid point is skipped;
-
503on a database error; -
memo bound and single-flight;
-
unauthenticated access, with the outer layers present;
-
end to end in process: the key ring on an EphemeralSchema mints a compact JWS through
mint_compact_jws, the router serves/identity/jwks, andjsonwebtoken::DecodingKey::from_jwkover the parsedJwkSetverifies it, as canopy-auth’sjwks.rsdoes.
Verification
-
Per unit:
-
fmt;
-
clippy in both profiles (the
lanes::CLIPPY_FEATURESset); -
the non-live tests and the named EphemeralSchema tests;
-
cargo docwith broken intra-doc links denied; -
migrations-lint,quality-budgets,test-lanes-lint --staticandsecret-loads.
-
-
CANOPY_CARGO_FEATURES=canopy-api/test-clock cargo xtask dev reload. The roles one-shot completes, canopy-security boots with both probes passing, and/identity/jwkslists the replica’s key within 60 s. -
git push, which runs the pre-push battery.
Follow-up issues
-
#2501: canopy-security’s main runtime connects as a least-privilege login. It is the D9 prerequisite for the database caps to bind against the main credential.
-
#2502: adopt
KeySignerfor determination signing (ADR-049 D9).
Review log
| round | vendor | resolved model | verdict |
|---|---|---|---|
1 (2026-09-30) |
Anthropic |
claude-opus-5-5 |
no-ship. Five blockers fixed:
|
2 (2026-09-30) |
OpenAI |
gpt-6-astra |
no-ship. Nine findings and two gaps, all fixed:
No round 3. |