Identity plane split, plan I1b: canopy-identity client authentication and system tokens (epic &131)
- Context
- Scope
- Design
- Decisions (recorded in ADR-049 Amendment 3, which lands with U2)
- U1: a provisioned P-256
KeySigner(crates/canopy-signing) - U2: purposes and token claim types (crates/canopy-auth)
- U3: issuer identifier and client registry (canopy-security config)
- U4: the jti store and the issuance log (one migration, the probes)
- U5: the issuance-log writer (services/canopy-security/src/identity/issuance_log.rs)
- U6: client-assertion verification (services/canopy-security/src/identity/client_auth.rs)
- U7: the token endpoint and RFC 8414 metadata (services/canopy-security/src/identity/token_endpoint.rs)
- U8: the receiver validator, unwired (crates/canopy-auth/src/identity_token.rs)
- U9: the client side, unwired (crates/canopy-auth/src/identity_client.rs)
- Conventions every unit follows
- Units
- Verification
- Review log
Status: Done (2026-10-03) — !1558
Epic: &131 (stage I1 of &130)
Issues: #2548 (w3), #2557 (w1), #2549 (w3), #2550 (w3), #2514 (w1), #2551 (w5), #2552 (w5), #2560 (w2), #2553 (w3), #2554 (w5), #2555 (w5), #2556 (w3), #2559 (w1), #2562 (w3)
MRs:
-
MR 1,
feat/identity-clients-and-purposes: U1, #2557, U2, U3, #2514, U4, U5 and #2560, in that order, titled "canopy-identity clients, purposes and issuance stores (#2548, #2557, #2549, #2550, #2514, #2551, #2552, #2560)". #2557 corrects a doc comment in canopy-signing found while planning. #2560 makes the issuer probe refuse PUBLIC grants, which U4 would otherwise extend to the issuance log. -
MR 2,
feat/identity-token-endpoint: U6, U7, U8, U9, #2559 and #2562, titled "canopy-identity token endpoint, receiver validator and client (#2553, #2554, #2555, #2556, #2559, #2562)". It ships after MR 1 merges. #2559 corrects the expiry and skew bounds that #2557’s sibling search found in other doc comments. #2562 derives every issuer-probe fact from one catalog snapshot. -
Erratum (2026-10-02): U1 as built.
ProvisionedKeyErrorhas a fifth variant,Unreadable: a secret-provider failure other than absence, kept apart fromMissingso that an outage never reads as an unset key. -
Erratum (2026-10-02): U3 as built.
identity_internal_urlis held to the issuer’s rules. Both values must equal theirurl::Urlserialization, so the issuer identifier is one exact string. A blank value counts as unset. canopy-common gainssettings::config_root(), which the layered config and the client registry share.urlbecomes a workspace dependency. -
Erratum (2026-10-02): U4 as built:
-
The jti insert is a targetless
ON CONFLICT DO NOTHING. On PostgreSQL 18, a conflict target needs SELECT on its columns, which the issuer must not hold, so the primary key stays the table’s only unique index. -
The stamp function pins
TimeZone = 'UTC', becauseto_jsonb(timestamptz)renders in the session’s zone. -
The purge refuses a batch outside 1..10000.
-
The probe keys function privileges by signature, as the closing audit does, and adds a
NoStoreReadrequirement.
-
-
Erratum (2026-10-02): U6–U9 as built:
-
The compact-JWS parser both validators share is canopy-auth’s
identity_jws. It comparestypby RFC 7515 §4.1.9 media-type equivalence (theapplicationprefix optional, case-insensitive) for A1 as for A4. Theclient-authentication+jwt, jwt-bearer,at+jwtand lifetime constants are inidentity_policy. -
Both validators require
exp − iatof at least 1 s. U6 refuses a NUL injti, which PostgreSQL text cannot store, so it never reads as a store failure. U8 caps a token at 8 KiB and requiressub=client_id(A4). With one compiled client, aniss,suborclient_idnaming another client fails deserialization, soClientMismatchandSubjectwait for a second client. -
U6’s exactly-once test runs two authenticators on two pools. The routed two-router test is U7’s. Both live in
tests/identity_token_test.rs, which U6 creates, with fixtures inservices/canopy-security/tests/common/mod.rs. -
U7 reads the body itself, so a wrong content type or a body over 16 KiB is an audited
invalid_request. The 5 s budget splits into 2 s of processing and 3 s of audit. An optionalclient_idmust name the assertion’s client (RFC 7521 §4.2), elseinvalid_client. A row names the client only once its assertion is spent, so a jti-store 503 names none.peer_addris the TCP peer. When an answer’s row fails, the 503 makes one more attempt to logaudit_unavailable.routertakes the rate (main passes 120), and the audit, the signing keys and the jti store sit behind traits that fault-injection tests replace. -
U8’s 30 s debounce spaces every fetch attempt, scheduled or forced. A malformed
Agefails the fetch, and a set older than the one held does not replace it. canopy-auth re-exports p256’sVerifyingKey.IdentityHttpClient, the bounded client with no redirects, is a newtype that U8 and U9 share, soSystemTokenSource::newtakes it rather than a raw client. -
U9’s close cites the archive directory by its full path, which
plan-lint --doneresolves.
-
-
Erratum (2026-10-03): MR 2 carries #2562, #2571, #2513 and #2572 with U6–U9, in that order. #2571 (the issuer’s temp tables could shadow the registry), #2513 and #2572 (canopy-reporting’s boot guard, the class #2562 fixed in the identity probes) were found while building it; #2559 shipped in sweep 6 (!1557).
The issues are bundled into two MRs under the maintainer’s one-MR-per-related-group ruling: each MR is one deliverable, and its commits build on each other. Each MR has one commit per issue. MR 1’s U1 commit adds this page (Status In progress) and its nav entry. MR 2’s U9 commit closes the plan.
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. Plan I1a (archive) built its keys, the database-guarded registry and /identity/jwks. It left I1b everything that mints:
-
client authentication (D10);
-
the token endpoint and RFC 8414 metadata (D2);
-
system tokens (D3) and their purposes (D4);
-
the issuance audit (D13);
-
the receiver validator (D9);
-
the issuer identifier config.
In the tree today:
-
LocalP256Key::generate()is canopy-signing’s only productionKeySigner. No signer loads provisioned key material (crates/canopy-signing/src/key.rs). -
canopy-auth’s validator stack is the Keycloak era’s.
JwksProviderchecks no JOSEtyp, keeps keys after a failed refresh with no bound, and accepts any audience in a set.Claimswould read a system token as a user (crates/canopy-auth/src/{jwks,claims}.rs). Changing it would alter the running path. -
No purpose name exists anywhere. The only compiled scopes are the portal’s nine targets and 13 scopes (
services/canopy-portal/src/tokens.rs). -
The issuer login’s grant matrix is closed across canopy-security’s schema, and boot probes it (
services/canopy-security/src/identity/probe.rs). The I1a migration’s closing audit cannot change, so new issuer-written tables need a migration with its own closing audit. -
canopy-security’s public routes carry only
/identity/jwks, and public routes skip the per-IP limiter (crates/canopy-api/src/lib.rs). -
The ADR-041 audit-export channel D13 names does not exist: its Child B, #1301, is blocked and not started.
Scope
In scope: U1–U9 below, plus #2514 (the issuer probe reads its facts in one snapshot), which U4 builds on. U7 adds a live route; no caller uses it until I3.
Out of scope:
-
wiring a consumer (I3, &133): the sender cache,
AuthLayer, the issuer-host bootstrap, readiness gating, provisioning a real client’s private key, and the receiver’s HTTP status for an unavailable key set; -
session and delegation tokens, the call graph, runtime client disablement and the admin routes (I2, &132);
-
the ADR-041 export of the issuance log, and its retention (#1301, #1303);
-
moving canopy-security’s main runtime off the superuser (#2501).
Design
Decisions (recorded in ADR-049 Amendment 3, which lands with U2)
| # | Decision |
|---|---|
A1 |
Assertion audience and type.
|
A2 |
Purposes.
|
A3 |
Audiences. The request names its audience with RFC 8707 |
A4 |
System token claims.
|
A5 |
Stores. The jti store and the issuance log live in canopy-security’s database and are written by the issuer login (D2: the issuer depends on its own database). The log is INSERT-only by trigger, and the issuer cannot read either table. Expired jti rows go only through an owner-run |
A6 |
Audit before release. Every mint and every handled refusal waits for its log row to commit, through a bounded group-commit writer. A response that cannot be audited, because the queue is full, the write failed or the deadline passed, is a 503 that releases nothing. An |
A7 |
Client disablement in I1. A registry entry’s |
A8 |
The D13 export. The log carries a stable |
A9 |
JOSE headers. Both canopy-identity JWS validators accept exactly the protected headers |
U1: a provisioned P-256 KeySigner (crates/canopy-signing)
-
ProvisionedP256Key::from_pkcs8_pem(&zeroize::Zeroizing<String>) → Result<Self, ProvisionedKeyError>, behind the existingKeySignertrait:-
the
kidis computed byKid::rfc7638; -
the key is zeroized on drop and never serialized;
-
ProvisionedKeyErroris a thiserror enum:Missing,Malformed,NotP256,Encrypted.
-
-
load_provisioned_key(&dyn SecretProvider, key_name: &str)reads throughrequire_secret(crates/canopy-common/src/key_material.rs). There is no file fallback (D10). Key names end in_PRIVATE_KEY, socargo xtask secret-loadscovers them. -
Tests:
-
assert_key_signer_conformance(canopy_signing::conformance, featuretest-helpers); -
a loader proptest: no input panics, and each error variant is reached;
-
a round trip against
PublicJwk::verifying_key.
-
-
Relates to #2502.
DeterminationSigneris unchanged.
U2: purposes and token claim types (crates/canopy-auth)
-
crates/canopy-auth/src/identity_policy.rsholds:-
SystemClient(canopy-portal, serialized as that string); -
SystemPurpose; -
fn purpose_for(client: SystemClient, audience: &str) → Option<&'static SystemPurpose>.
-
-
SystemTokenClaimsandClientAssertionClaims, serde types withdeny_unknown_fields(A4). -
Tests:
-
each (client, audience) pair has at most one purpose;
-
every scope set is non-empty and unique;
-
every
namefollows A2’s rule; -
the claim serialization is pinned.
-
-
services/canopy-portal/src/tokens.rsgains a test, under theserverfeature, that canopy-auth’s portal purposes equalTarget::op_scopes. canopy-portal is a binary crate depending on canopy-auth, so the test lives on its side. -
ADR-049 Amendment 3: A1–A9, and the I1b staging of D10, D12 and D13.
U3: issuer identifier and client registry (canopy-security config)
-
New
SecurityConfigfields:identity_issuerandidentity_internal_url. Both are optional, but they must be set together; setting one alone refuses boot.-
identity_issuermust behttps, except underCANOPY_ENV=development. Its path must be exactly/identity, and it may carry no query, fragment or userinfo (RFC 8414 §2). Endpoint URLs are built structurally withurl::Urlpath segments, never by string concatenation, so they are the mounted/identity/tokenand/identity/jwks. -
When they are unset, the token endpoint and the metadata answer 503
temporarily_unavailableand boot logs once. -
The devstack sets both to
http://canopy-security:8012/identityindocker-compose.yml, the container’s port. -
configuration-reference.adocdocuments both. The names collide with neitherOIDC_*norRESERVED_KEYS.
-
-
The client registry:
-
read with the
configcrate (already used bycrates/canopy-common/src/settings.rs) from<CANOPY_CONFIG_ROOT>/canopy-security/identity-clients.yaml. The file does not layer. The repo ships none, a deployment mounts its own, and an absent file means no clients. -
Each entry:
client(aSystemClientid string),enabled(bool) andkeys(one or two{x, y}public JWK coordinates). -
The
kidis computed (RFC 7638), never configured. -
A malformed entry, an unknown client, a third key or a duplicate key refuses boot, naming the entry.
-
-
Tests: each refusal, the absent file, and a proptest that no YAML input panics the loader.
U4: the jti store and the issuance log (one migration, the probes)
-
A migration sorting after
20261209000000, owned bycanopy_identity_owner, with two tables.identity_client_assertions, keyed on (client,jti):Column
Type
Notes
clientTEXT NOT NULLCHECK (client <> '')jtiTEXT NOT NULLCHECK (length(jti) BETWEEN 1 AND 128)expires_atTIMESTAMPTZ NOT NULLthe assertion’s
exp+ 60 sidentity_issuance_log:Column
Type
Notes
record_idUUID PRIMARY KEYv7, from the writer
occurred_atTIMESTAMPTZ NOT NULLstamped
clock_timestamp()by aSECURITY DEFINERtrigger, as I1a stampsoutcomeTEXT NOT NULLCHECK (outcome IN ('issued','refused'))errorTEXTthe RFC 6749/8707 code;
CHECK outcome = 'refused') = (error IS NOT NULLreasonTEXTthe typed refusal reason,
CHECK (reason ~ '^[a-z_]{1,64}$'); its vocabulary is pinned in code by a testclient,purpose,audience,scopeTEXTNULLwhen not yet known (an unauthenticated refusal)token_jti,kid,expires_atUUID,TEXT,TIMESTAMPTZset only when
outcome = 'issued'(a CHECK)peer_addrINETthe request’s source address
schema_versionSMALLINT NOT NULL1
row_digestBYTEA NOT NULLcomputed by the stamp trigger:
sha256of the stored row asjsonb(to_jsonb(NEW) - 'row_digest'),occurred_atincluded;CHECK (octet_length(row_digest) = 32)An index on
identity_client_assertions (expires_at)serves the purge. -
Functions and triggers:
-
the stamp trigger (
SECURITY DEFINER) setsoccurred_atand thenrow_digest, overriding any supplied value; -
an
identity_registry_immutable-style trigger makes the log INSERT-only; -
identity_purge_client_assertions(batch INT) RETURNS INTis owner-run andSECURITY DEFINER. It deletes up tobatchexpired rows underFOR UPDATE SKIP LOCKED, so concurrent sweepers never block each other, and returns the count.
-
-
Issuer grants:
-
column-level
INSERTon both tables, the log withoutoccurred_atandrow_digest; -
no
SELECT,UPDATEorDELETEon either. A jti replay is detected fromON CONFLICT DO NOTHING's row count, which needs no read; -
EXECUTEon the purge.Grants carry
-- global-ddl:markers. The migration ends with its own closing audit over every identity object, old and new.
-
-
Code changes:
-
probe.rsin_grant_matrix/holds_grant_matrix/outside_matrix,REGISTRY_TABLES/REGISTRY_FUNCTIONSand the test fixtures are extended. #2514’s single-snapshot read lands just before. -
The issuer pool grows from 4 to 8 connections. Its doc derives the size: one group-commit writer, one jti insert per token request at the route’s limit (U7), and I1a’s registry and JWKS traffic.
-
-
Tests (EphemeralSchema, in
services/canopy-security/tests/identity_registry_test.rs):-
a jti inserts once, and a duplicate reports zero rows;
-
the issuer cannot read either table, nor UPDATE, DELETE or TRUNCATE the log;
-
the purge removes only expired rows, and two concurrent purges never delete a row twice or block;
-
the trigger’s digest covers
occurred_at, and a supplied digest is overridden; -
the probes refuse a grant outside the extended matrix.
-
-
Docs:
data-models/canopy-security.adocandsecurity-operations.adoc#identity-registry(the purge and the grants).
U5: the issuance-log writer (services/canopy-security/src/identity/issuance_log.rs)
-
A group-commit writer.
-
Callers enqueue a row with its deadline and a oneshot on a bounded queue of 256 rows. Enqueueing waits at most until the caller’s deadline; a full queue past that is a 503, with the row not written.
-
One task gathers up to 32 rows or 10 ms, drops the rows whose callers have gone, inserts the rest in one transaction on the issuer pool, and answers each caller after COMMIT.
-
-
A writer-owned deadline of 2 s covers each batch from pool acquisition through COMMIT. On expiry the writer closes that connection rather than returning it, fails the batch’s callers, and takes a fresh connection for the next batch.
-
Fail closed: a failed write, an expired batch deadline or an expired caller deadline fails every affected caller, and nothing is released.
-
Metrics:
-
canopy_identity_issuance_batch_rows(histogram); -
canopy_identity_issuance_commit_seconds; -
canopy_identity_issuance_queue_depth; -
canopy_identity_issuance_failures_total{cause}.
-
-
The jti sweeper runs every 60 s with a jittered first tick. Each run calls the purge in batches of 1000 until a call returns fewer than 1000 or 2 s pass. That catches up with any ingress below 60 000 assertions a minute per replica, far above the token route’s limit times any realistic sender count.
-
The export follow-up is #2561, blocked by #1301.
-
Tests:
-
concurrent rows commit in batches;
-
a failed commit fails every waiter;
-
a stalled connection (the
canopy_test_lib::stalling_relayfrom #2538) trips the batch deadline, and the next batch succeeds on a fresh connection; -
a saturated queue answers 503 at the caller’s deadline and recovers once drained;
-
a caller that gives up before its batch starts leaves no row;
-
two sweepers on two pools purge concurrently without errors.
-
U6: client-assertion verification (services/canopy-security/src/identity/client_auth.rs)
-
The pipeline, cheapest checks first:
-
parse the compact JWS, refusing anything over 8 KiB;
-
the protected header holds only A9’s parameters, with
alg= ES256; -
typper A1; -
kidis the thumbprint of one of the client’s enabled keys; -
verify with
PublicJwk::verifying_key.
-
-
Then the claims:
-
iss=sub=client_id, naming an enabledSystemClient; -
aud=identity_issueras its sole value; -
iatis present and at most now + 60 s; -
expis after now andexp − iat≤ 60 s; -
jtiis 1–128 characters.
-
-
Single use:
INSERT … ON CONFLICT DO NOTHINGintoidentity_client_assertions. Zero rows is a replay. -
Each refusal is a typed
ClientAuthRefusal. A failure of the jti store (an error or a timeout) is a separateClientAuthError::StoreUnavailable, never a refusal or a replay. U7 maps and audits both. -
The shared corpus:
crates/canopy-auth/src/jws_corpus.rs, behind a new canopy-auth featuretest-helpers, providesjws_evil_cases!, a parametric macro over these cases:-
alg: none; -
HS256 confusion;
-
an embedded
jwkheader; -
a signed unknown
critextension; -
a signed
b64: false; -
nested JWS;
-
an oversize token;
-
bad base64;
-
a truncated signature;
-
a duplicate header key.
canopy-security dev-depends on canopy-auth with that feature.
lanes::FEATURE_BUILDSgains a default-features canopy-auth entry, following canopy-signing’s, so thefeature-buildsgate still covers the build withouttest-helpers.
-
-
Tests:
-
a table of each refusal;
-
the corpus;
-
a proptest that no input panics the parser;
-
two routers on two pools over one EphemeralSchema accept a jti exactly once.
-
U7: the token endpoint and RFC 8414 metadata (services/canopy-security/src/identity/token_endpoint.rs)
-
POST /identity/token, merged intopublic_routesbeside/identity/jwks(services/canopy-security/src/main.rs):-
form-urlencoded only, with a body limit of 16 KiB;
-
a whole-request budget of 5 s, of which the audit wait gets at most 3 s;
-
a dedicated per-IP limiter at 120 requests/min (
canopy_api::apply_rate_limit).
-
-
The request:
grant_type=client_credentials,client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer,client_assertion, exactly oneresource, and an optionalscope. -
The flow: authenticate (U6), then
purpose_for(U2), then the scope check, thenkey_ring.active(), thenmint_compact_jws(&active, "at+jwt", …)with times fromchrono::Utc::now()(D14). The log row commits (U5), and only then is the token released. -
Success:
{access_token, token_type: "Bearer", expires_in: 600, scope}. -
Response headers: every response carries
Cache-Control: no-storeandPragma: no-cache(RFC 6749 §5.1). They are set by a layer outside the route’s rate limiter, so a 429 carries them too. -
Errors:
Cause
errorStatus
malformed or duplicate parameters, a missing parameter, several
resourcevaluesinvalid_request400
grant_typeis notclient_credentialsunsupported_grant_type400
a wrong assertion type, any U6 refusal, an unknown or disabled client
invalid_client400
resourcenames no service, or the client has no purpose for itinvalid_target400
scopeis not within the purpose’s setinvalid_scope400
no active key; a
SignError(a window closing afteractive(), a timeout); the jti store unavailable; an audit failure; the issuer unconfigured; the budget spenttemporarily_unavailable503
invalid_clientis a 400: the client authenticates in the form, not in anAuthorizationheader, and RFC 6749 §5.2 requires a 401, which carries aWWW-Authenticatechallenge (RFC 9110 §15.5.2), only for header-based authentication. Each 503 cause is audited with its ownreason, and none releases a token. -
Metadata:
GET /.well-known/oauth-authorization-server/identity(RFC 8414 §3.1) returns:-
issuer,token_endpoint: {issuer}/token,jwks_uri: {issuer}/jwks; -
grant_types_supported: [client_credentials]; -
token_endpoint_auth_methods_supported: [private_key_jwt]; -
token_endpoint_auth_signing_alg_values_supported: [ES256]; -
response_types_supported: [].In-cluster clients use the same paths under
identity_internal_url.
-
-
Metrics:
canopy_identity_tokens_issued_total{purpose}andcanopy_identity_token_refusals_total{error}. -
Tests: routed tests over an EphemeralSchema, with a client registered in the test (no grant is test-only, D14):
-
each table row, asserting its log row;
-
fault injection for each 503 cause, a signer that refuses and a jti store that fails among them, each releasing nothing and audited;
-
the cache headers on a success, an error and a 429;
-
a form-parse proptest;
-
the metadata document, and that its
token_endpointandjwks_uriresolve to the mounted routes.
-
-
Docs:
api/canopy-security.adoc,authorization-inventory.adoc,services.adocandsecurity.adoc.
U8: the receiver validator, unwired (crates/canopy-auth/src/identity_token.rs)
-
IdentityTokenValidator::new(issuer, audience, key_source)andvalidate(&self, token, request_start) → Result<SystemTokenClaims, IdentityTokenError>.-
IdentityTokenErrorseparatesRejected(reason)fromKeysUnavailable. -
The checks:
-
the protected header holds only A9’s parameters:
typper A4,algES256, a knownkid; -
the signature, verified with p256;
-
issandaudexact (A3); -
exp − iat≤ 600,iat≤ now + 60,nbf≤ now + 60, with a 60 s leeway onexp; -
no user claims (A4).
-
-
-
#[async_trait] pub trait IdentityKeySource: Send + Sync, with one method:async fn key(&self, kid: &Kid, request_start: SystemTime) → Result<Option<p256::ecdsa::VerifyingKey>, KeysUnavailable>. -
HttpJwksKeySource:-
refreshes every 300 s, and at most once per 30 s on an unknown
kid; -
fails closed once its set is 720 s stale, measured from request start −
Age(D9, Amendment 1); -
a 64 KiB body cap; an empty set is valid;
-
a bounded client with no redirects (the
http-clientsgates).
-
-
canopy-security’s in-process source:
services/canopy-security/src/identity/key_source.rsreadsJwksMemo<PgPublishedKeys>, the database registry, never the ring, since each ring holds only its own key. -
Tests:
-
a rejection table;
-
staleness with a fake clock and
Age; -
the unknown-
kiddebounce; -
the corpus;
-
a proptest that no token panics the validator.
-
U9: the client side, unwired (crates/canopy-auth/src/identity_client.rs)
-
ClientAssertionMinter::new(signer: Arc<dyn KeySigner>, client: SystemClient, issuer: Url)andasync fn mint(&self) → Result<String, SignError>. Each assertion has a fresh v7jti,exp=iat+ 60 s and A1’saudandtyp. -
SystemTokenSource::new(minter, token_endpoint: Url, http)andasync fn token(&self, resource: &str, scope: Option<&str>) → Result<Arc<str>, SystemTokenError>:-
it caches each (resource, scope), single-flight, for the shorter of 300 s and
exp− 60 s. 300 s is the receivers' JWKS refresh, so a token signed by a revoked key leaves the cache no later than receivers stop accepting it; -
fn invalidate(&self, resource: &str, scope: Option<&str>)drops an entry, and the next call reacquires. Wiring a receiver’s 401 to it is part of each sender’s I3 cut-over, asServiceTokenSource's reacquisition is today; -
it uses a bounded client with no redirects;
-
it sits beside
ServiceTokenSource, which is unchanged.
-
-
Round trip:
services/canopy-security/tests/identity_token_test.rs. An in-process canopy-security router over an EphemeralSchema mints a portal token, and U8’s validator accepts it with the in-process key source. -
The plan closes here:
-
Status becomes
Done (YYYY-MM-DD) — !N; -
the page moves to
docs/modules/ROOT/pages/plans/archive/, with the nav moved as the header says; -
Amendment 3’s link is repointed;
-
cargo xtask plan-lint --done docs/modules/ROOT/pages/plans/archive/identity-plane-split-i1b.adoc --allow-openruns, exempting MR 2’s own issues (2562, 2571, 2513, 2572, 2553, 2554, 2555, 2556, still open until it merges) and 1301, 1303, 2501, 2502 and 2561.
-
Conventions every unit follows
-
Database tests use EphemeralSchema in
infra_testsmodules ortests/binaries, gated byinfrastructure_available(). The battery setsCANOPY_TEST_INFRA=required, so a missing database fails instead of passing (I1a’s U3 erratum). It never runs#[ignore]tests (xtask/src/cmd/test.rs). -
Every parser gets a proptest, and the token parsers share the U6 corpus (
adr-049Consequences). Issuer and receiver code readschrono::Utc::now(), nevercanopy_common::clock(D14). Every unit ships itsCHANGELOG.adocAddedbullet and the doc pages its section names.
Units
-
U1 (w3) —
feat(signing): load a provisioned P-256 key as a KeySigner (#2548).crates/canopy-signing/src/provisioned.rs. This page and its nav entry. -
#2557 (w1) —
require_unexpired_with_leeway's doc comment states the bound the code enforces, as filed. -
U2 (w3) —
feat(auth): compiled system purposes and token claim types (#2549).crates/canopy-auth/src/identity_policy.rs,services/canopy-portal/src/tokens.rs(test), ADR-049 Amendment 3. -
U3 (w3) —
feat(security): identity issuer config and the client registry (#2550).services/canopy-security/src/{config,identity/clients}.rs,docker-compose.yml,configuration-reference.adoc. -
#2514 (w1) — the probe reads its facts in one snapshot, as filed.
-
U4 (w5) —
feat(security): client-assertion and issuance-log stores (#2551). The migration,identity/{probe,registry}.rs, the fixtures, the data-model and operations pages. -
U5 (w5) —
feat(security): a group-commit issuance log (#2552).identity/issuance_log.rs, the sweeper, metrics. -
#2560 (w2) — the issuer probe refuses PUBLIC grants on identity objects, as filed.
-
U6 (w3) —
feat(security): verify private_key_jwt client assertions once (#2553).identity/client_auth.rs,crates/canopy-auth/src/jws_corpus.rs. -
U7 (w5) —
feat(security): token endpoint and RFC 8414 metadata (#2554).identity/token_endpoint.rs,main.rs, the API docs. -
U8 (w5) —
feat(auth): an unwired canopy-identity token validator (#2555).crates/canopy-auth/src/identity_token.rs,identity/key_source.rs. -
U9 (w3) —
feat(auth): a private_key_jwt system-token client, unwired (#2556).crates/canopy-auth/src/identity_client.rs,tests/identity_token_test.rs, the plan close. -
#2559 (w1) and #2562 (w3) — as filed, in MR 2.
Verification
-
Per unit: fmt; clippy in both profiles; nextest for the touched crates; the named database tests with
CANOPY_TEST_INFRA=required;rustdoc-private;migrations-lint,secret-loads,http-clients audit-redirectsandaudit-timeouts,db-pools,web-pathsandquality-budgets. -
Per MR: every
validatestage, thengit push(the pre-push battery). -
After MR 2, on the devstack (
cargo xtask dev reloadapplies the U4 migration):-
the metadata answers at
/.well-known/oauth-authorization-server/identityon canopy-security’s port; -
its
token_endpointandjwks_uriarehttp://canopy-security:8012/identity/tokenand…/jwks, and both answer in the compose network; -
an unsigned
POST /identity/tokenis refused 400invalid_clientwith both cache headers. U7’s routed test asserts the refusal’s log row.
-
-
git grep -nE 'use canopy_common::clock|canopy_common::clock::' services/canopy-security/src/identity crates/canopy-auth/srclists no I1b file.
Review log
| round | vendor | resolved model | verdict |
|---|---|---|---|
1 (2026-10-02) |
Anthropic |
claude-opus-5-5 |
no-ship. Fifteen blockers, all fixed: the nav group; the page in the first commit; subject lengths; the MR justification; the data-model, operations and CHANGELOG docs; plan-lint’s |
2 (2026-10-02) |
OpenAI |
gpt-6-astra |
no-ship. Twelve findings, all fixed: a writer-owned batch deadline with connection recovery; a bounded, deadline-aware audit queue; a jti purge sized for ingress, with an index and concurrent sweepers; a database-computed digest covering |