Identity plane split, plan I4: the alternative upstreams (epic &134)
- Context
- Decisions (ADR-049 Amendment 26, AL1–AL12; land with U1)
- AL1. Four profiles
- AL2. ZITADEL’s audience (amends C7)
- AL3. ZITADEL’s claim shape and organisation pin (amends C8)
- AL4. Where each upstream enforces MFA (the trust boundary)
- AL5. Keycloak’s provisioning convention
- AL6. The upstream harness, split from Kanidm
- AL7. The devstack’s upstream
- AL8. Images on Alpine
- AL9. A conformance suite per upstream
- AL10. The identity matrix before an identity push
- AL11. The release gate (the epic’s "release precondition")
- AL12. Playwright per upstream
- Units
- STOP rules (from plan I0)
- Scope
- Risks
- Verification
- Review log
Status: Done (2026-10-13) — !1597
Epic: &134 (stage I4 of &130)
Issues: #2891 (U1, w3); #2892 (U2, w5); #2893 (U3, w8); #2894 (U4, w5); #2895 (U5, w5); #2896 (U6, w8); #2897 (U7, w5); #2898 (U8, w8); #2899 (U9, w5); #2900 (U10, w5); #2901 (U11, w3); #2902 (U12, w5). #2342 left &134 (a second upstream at the edge is ADR-048 reopen trigger 4); #2347 and #2349 close after merge, superseded by the per-IdP suites (ADR-049 › Consequences).
MR: feat/identity-alternatives, "the alternative upstreams (#2891 … #2902)", one signed commit per issue, local with a bundle after each unit, one push once green.
This is a Design + Scope plan. GitLab owns tracking, and the plan freezes when U1 starts. AL1–AL12 are this plan’s decisions (ADR-049 Amendment 26).
Each issue carries priority::high, program::infrastructure, workflow::ready and planning::has-plan, plus the one type:: and one service:: its unit names.
Why one MR: a vendor profile must not be accepted before its suite passes (ADR-050 §2), and U2’s presets precede U6’s and U8’s suites. One MR also runs the push battery, with its identity matrix, once.
Context
ADR-050 made Kanidm canopy-identity’s default upstream and promised that "ZITADEL and Keycloak are first-class alternatives. Each gets a profile and a conformance suite (epic &134)". ADR-050 §2 and ADR-048 Amendment 1 hold that no vendor profile ships unverified.
Today the profile layer knows kanidm and oidc-generic only, and refuses keycloak and zitadel by test. The devstack, provisioning, the token broker, the conformance lane and Playwright are hard-coded to Kanidm, and no lane runs any conformance suite. This plan makes Keycloak and ZITADEL tested, supported upstreams and finishes the identity rework (&130).
Vendor facts (fetched 2026-10-13):
-
Keycloak 26.8.1 (2026-10-13):
keycloak-26.8.1.tar.gzwith a GPG.asc; Java 21.-
id_token
aud= client id,azp= client id,auth_timepresent. Claims reach the id_token only through protocol mappers. -
The default browser flow’s OTP step is conditional: a user without an OTP credential signs in on a password alone.
-
Keycloak 25+ omits
noncefrom a refreshed id_token. Post-logout redirects have their own allowlist.
-
-
ZITADEL v4.19.4 (2026-10-01):
zitadel-linux-{amd64,arm64}.tar.gz,zitadel-login.tar.gz(Login V2; its own Dockerfile isnode:24-alpine),checksums.txt. It needs PostgreSQL and a 32-characterZITADEL_MASTERKEY; v4.19.2+ also requiresZITADEL_SESSION_COOKIE_SECRET(≥32 characters).-
id_token
audholds the project’s client ids and the project id. -
The project-roles claim is an object keyed by role name; each value maps an organisation id to its domain.
-
Claims reach the id_token only with the app’s
idTokenRoleAssertionandidTokenUserinfoAssertionand the project’sprojectRoleAssertion. -
Actions v2 need a deployment-hosted webhook. TOTP is SHA-1.
-
Factor sufficiency is decided by the trusted login client: the server does not enforce the MFA policy when a login client finalises an authorization request.
-
First-instance PAT files are written 0644 (the settings are in
cmd/setup/steps.yaml).
-
The maintainer’s rulings (2026-10-13): ZITADEL is read through its native claims; ZITADEL uses Login V2; Studio stays out of this epic; an identity push runs the conformance suites, and the per-IdP e2e runs on demand and before a release.
Decisions (ADR-049 Amendment 26, AL1–AL12; land with U1)
AL1. Four profiles
ProfileKind gains Keycloak and Zitadel. A vendor file states the common fields (issuer, client id, optional endpoints, trust anchors) plus its vendor fields; the preset fixes the rest, and stating a preset field is PresetField. oidc-generic still states everything.
A zitadel file also states project_id and organization_id (strings), both required; any other kind stating either is UnknownField. The PresetField and UnknownProfile messages stop naming kanidm alone.
| Preset | Algorithms | claims_from / refresh | Client auth | Scopes | Roles / programs / username |
|---|---|---|---|---|---|
|
ES256 |
id_token / reissues_id_token |
client_secret_basic |
|
|
|
RS256 |
id_token / reissues_id_token |
client_secret_basic |
|
AL3’s object keys of |
AL2. ZITADEL’s audience (amends C7)
-
For a
zitadelprofile,audmay be the client id alone, or an array of exactly the client id andproject_id, each once. With two members,azpmust be the client id. -
Any other member, a missing client id or a project-only audience is refused as today. Every other profile keeps C7’s exact rule.
-
UpstreamIdTokenValidator::new(profile)(upstream/id_token.rs) takes the allowed set from the profile.
AL3. ZITADEL’s claim shape and organisation pin (amends C8)
-
A claim pointer gains a shape:
array(today’s) orobject_keys.object_keysis the zitadel preset’s alone; no file can state a shape. -
Under
object_keysthe value must be an object. A key counts only when its value is an object holdingorganization_idas a key, so a project grant from another organisation grants nothing. -
Roles are the counted keys intersected with
ROLE_VOCABULARY. Programs are the counted keys startingprogram_, whose suffix is a program wire id (program_snap). A bad suffix ismalformed_primary_programs; none ismissing_primary_programs.
AL4. Where each upstream enforces MFA (the trust boundary)
MFA stays an upstream obligation canopy cannot see in a token (ADR-049 D6; idp-integration › what an upstream must deliver). Each preset names where it is enforced, and the suites test it there:
-
Kanidm:
idm_all_personsrequires MFA (unchanged). -
Keycloak: in the server. The realm’s browser flow requires the OTP form for every user (AL5), so an account without an OTP credential cannot finish signing in.
-
ZITADEL: in Login V2, its trusted login client; the server leaves factor sufficiency to the login client.
-
The login-client PAT is therefore a credential of the IdP itself. Deployments protect it as they protect ZITADEL’s admin credential, and the login policy forces MFA.
-
The broker’s Session API driver (AL6) holds that PAT as the login client. It is a test convenience, never evidence of ZITADEL’s own enforcement; Login V2’s behaviour is tested in the browser (AL12).
-
AL5. Keycloak’s provisioning convention
-
Realm
canopy:-
an ECDSA P-256 key provider and
defaultSignatureAlgorithm: ES256; -
OTP policy TOTP HmacSHA256, 6 digits, 30 s;
-
a
canopy-browserflow (a copy ofbrowserwhose OTP Form is REQUIRED, not conditional) bound as the realm’s browser flow, andCONFIGURE_TOTPa default required action; -
primary_programsdeclared in the user profile (Keycloak 24+ refuses unmanaged attributes); -
realm roles named as canopy’s role vocabulary.
-
-
Client
canopy-web: confidential, standard flow only, PKCE S256 required. Default client scopesbasicandprofile(Keycloak 25+ emitssubandauth_timeonly throughbasic) andcanopy. Redirect URIs are both origins'/auth/callback;post.logout.redirect.urisare both origins'/login(canopy-web’s logout return,post_logoutinservices/canopy-web/src/auth/mod.rs). Both lists are rewritten on a port change. -
Client scope
canopy: a realm-role mapper to a multivaluedrolesclaim and a user-attribute mapper to a multivaluedprimary_programsclaim, each in the id_token and userinfo only, never an access-token audience forcanopy-web. -
The realm is a template,
devstack/keycloak/realm.json, with no secrets. Provisioning creates it over the admin REST API (POST /admin/realms), then the cast’s users with their passwords and OTP credentials overPOST /admin/realms/canopy/partialImport(seeds generated by xtask), then reads the client secret.
AL6. The upstream harness, split from Kanidm
-
upstream::oidctakes the plain OIDC half ofupstream/kanidm/login.rs: the authorize request, exchange, refresh, revoke, userinfo, discovery, JWKS and the independent verifier. -
upstream::casttakesSeedPerson,PERSONSandGROUPS, which are vendor-neutral;realm_subject()stays.upstream::{Secret, TotpSeed, Credentials, UpstreamError}are neutral.TotpSeedcarries the algorithm (SHA-1 or SHA-256), digits and step (totp-lite). -
Credentialsholds the issuer, client id, client secret,cast_digest, per person{ name, sub, password, totp }, andadmin: an enum per vendor (Kanidm’sidm_adminpassword; Keycloak’s admin user and password; ZITADEL’s admin and login-client PATs). -
UpstreamDriveris an enum{ Kanidm, Keycloak, Zitadel }(a closed set, no trait object) with:-
sign_in(person) → UpstreamSession. Kanidm: its JSON auth API to a UAT. Keycloak: its HTML login forms with a cookie jar, its own login. ZITADEL: the Session API v2 as the login client (AL4). -
authorise(session, request) → Authorization. -
The admin writes the shared cases use:
expire_account(person)andset_roles(person, roles, programs).
-
-
link_castreads each person’ssuband the issuer fromCredentials. A subject that already exists (after a switch) is reused, and the new (issuer, sub) link is added. -
TokenBroker,tools/canopy-token-broker'sPlaneand its session cache take the neutral types.CANOPY_TESTKANIDM_{ADDR,CREDENTIALS,CA}becomeCANOPY_TESTUPSTREAM_*(PORTS_ENV_VERSION9). The TypeScriptUpstreamgainskind, the discoveredauthorizationEndpointand the profile’sscopes. -
The Rust battery’s tests that import
upstream::kanidm::login::Driveror writeprofile: kanidmtakeUpstreamDriver::devstack()(the devstack’s running kind) and its profile:web_session_engine_test,native_session_test,upstream_relying_party_test,admin_client_test,edge_forwarder_test, and the web-sender, device-client, receiver and devstack-identity tests.kanidm_advertises_no_end_sessionmoves into the Kanidm suite.
AL7. The devstack’s upstream
-
cargo xtask dev start|reload|restart --idp kanidm|keycloak|zitadel(defaultkanidm), sticky in.devstack/upstream. The guard’s refresh paths (auto_refresh,ensure_ready) read it. -
Compose services
kanidm,keycloakandzitadel(ZITADEL’s front, AL8;zitadel-coreandzitadel-loginbehind it are internal). Each is in its own profileupstream-<idp>outside the deployment profiles, and each is aliasedidm.canopy.test, so the existing leaf, CA and SPKI pins stand; the TLS volume becomesupstream-tls. -
Each listens on its reserved port in its container:
PORT_MAPPINGSandSAME_PORT_SERVICESrows for all three.upstream_port(ports, idp)picks the running one, andCANOPY_TEST__UPSTREAM_ADDRis rendered from it. -
One upstream on the network.
upstream_phase, on every path (do_start,auto_refresh,ensure_ready), first removes every upstream service graph but the chosen one (rm -sfby service name), then starts it. Onlycanopy-token-brokeruses the upstream; itsdepends_onnames none, and the bring-up orders it. -
Cold-start order. For
keycloakandzitadel,upstream_phaserunsup -d --wait postgres, then thepostgres-rolesone-shot to completion, thenup -d --no-deps --waiton the upstream’s graph (ZITADEL: core, then login, then front). It then provisions or settles, reads the client secret and writes the env files, before the stack’sup. Kanidm keeps today’s order.issuer::profile_yamlwrites the chosen kind’s file. Tests pin each path’s order. -
Switching compares the whole profile, clears the broker cache and device sessions, and relinks.
-
Databases.
roles.sql(run on every start) gains thekeycloakandzitadeldev logins, in source like every devstack credential, and creates their databases withSELECT … \gexecwhen absent. Its scope header says so. -
Secrets. Keycloak’s bootstrap admin and ZITADEL’s masterkey, cookie secret and first-instance admin are generated by xtask into 0600
.devstack/identity/env/<service>.envfiles, which compose names asenv_file(required: false), as canopy-web’s are. -
ZITADEL’s PATs. The core writes the admin and login-client PATs (the first-instance PAT-path settings of v4.19.4’s
cmd/setup/steps.yaml) into a named volumezitadel-bootstrap, under a directory owned 10001:10001, mode 0750, with the core’s entrypoint atumask 0027.zitadel-loginruns as uid 1001 withgroup_add: ["10001"]to read its PAT. xtask copies the admin PAT out through a one-off container into.devstack/idp/zitadel.json(0600), the waydevstack_tls::installmoves files through volumes.
AL8. Images on Alpine
| Image | Base | From | User | HEALTHCHECK |
|---|---|---|---|---|
|
|
|
10001 |
|
|
|
|
10001 |
|
|
|
|
1001 |
|
ZITADEL’s front |
the pinned |
an envsubst template ( |
101 |
|
As in plan I0, an image that fails its suite is replaced by the vendor’s, pinned by digest, with its Alpine exception recorded in ADR-050 (devstack and test images only).
AL9. A conformance suite per upstream
-
The Kanidm suite’s shared cases move to
crates/canopy-test-lib/tests/idp_conformance/cases.rs, a module ofidp_conformance_kanidm.rs,idp_conformance_keycloak.rsandidp_conformance_zitadel.rs(featureidp-conformance). -
Shared:
-
discovery and C6; PKCE+TOTP sign-in; the
upstream_*paths; projection; -
prompt=loginandmax_agethrough the driver (the server’s honouring for Kanidm and Keycloak, whose drivers use their own login); -
refresh, whose refreshed id_token’s
nonceis absent or identical (production’s rule); a revoked refresh; an expired account; -
the id_token carrying the profile’s username and roles claims; the
session_*cases.
-
-
Kanidm-only: its access-token lifetime, code reuse and lifetime, rotation replay, offered mechanisms, no end_session, and its refreshed
noncerepetition, signing algorithm and header facts. -
Keycloak-only: an access token refused as an id_token; an account without an OTP credential cannot finish signing in; RP-initiated logout returns to
/login. -
ZITADEL-only: the audience pair; the organisation pin; RP-initiated logout returns to
/login. Login V2’s MFA and freshness are AL12’s browser tests, per AL4. -
cargo xtask identity conformance --idp kanidm|keycloak|zitadelstands up the vendor’s whole conformance graph:-
kanidm-conformance;keycloak-conformance;zitadel-conformance(the front),zitadel-conformance-coreandzitadel-conformance-login; -
idp-conformance-postgres(tmpfs) for Keycloak and ZITADEL.Every one is an
OPT_IN_SERVICESrow and, where published, aPORT_MAPPINGSrow, so devstack health and teardown ignore them. Each run removes and recreates the graph (the postgres container included), uses a throwaway CA and leaf from thedevstack_tlsgenerator, publishes on every interface, provisions, runs the suite, and removes the graph on exit, pass or fail. Suites and command reach it atdocker_host::published_host(), so Docker-in-Docker works.
-
AL10. The identity matrix before an identity push
-
cargo xtask identity matrix [--all] [--e2e]reads the push spec on stdin and runs every upstream’s suite when the pushed range touchesIDENTITY_PATHS:-
crates/canopy-auth/src/upstream/,crates/canopy-test-lib/src/upstream/,crates/canopy-test-lib/src/identity_broker.rs,crates/canopy-test-lib/src/identity_broker/,crates/canopy-test-lib/tests/idp_conformance*,tools/canopy-token-broker/; -
devstack/{kanidm,keycloak,zitadel,zitadel-login}/,devstack/postgres/roles.sql,docker-compose.yml; -
xtask/src/docker.rs,xtask/src/devstack_tls.rs,xtask/src/devstack_identity.rs,xtask/src/devstack_identity/,xtask/src/cmd/identity/,.config/nextest.toml,.githooks/pre-push.
-
-
The range is
<remote>..<local>per pushed ref. For a new ref (remote all zeros) it is$(git merge-base <local> origin/main)..<local>; deletions are skipped.--allignores the range;--e2ealso brings the devstack up on each upstream and runs theidentity-planeproject. -
.githooks/pre-pushpipes$PUSH_SPECinto it after its managed region.
AL11. The release gate (the epic’s "release precondition")
-
A tag-only CI job
identity-conformance(stagetest,tags: [$RUNNER_LARGE], Docker-in-Docker asintegration-testshas it,needs: [kanidm-image]) installscargo-nextest0.9.140 with its SHA-256 check, ascargo-testdoes, and runsidentity matrix --all.docker-promotewaits on the test stage.ci-config-lintpins the job. -
identity conformancehonoursCANOPY_PREBUILT_KANIDM_IMAGE(no compose build when set). -
deployment-guide.adoc› "Release, rollback, recovery" gains the stepcargo xtask identity matrix --all --e2eon the release commit before tagging.
AL12. Playwright per upstream
-
routeUpstreamSignIn(lib/identity/sign-in.ts) and the stand-in relying party (lib/identity/stand-in-rp.ts) build and match the upstream’s discovered authorization endpoint and the profile’s scopes, not Kanidm’s/ui/oauth2.identity-sign-in.spec.ts's/ui/oauth2assertion reads the discovered path.pinned-browser.tspins the upstream leaf by kind. -
Page objects
keycloak-login.page.tsandzitadel-login.page.tssit beside Kanidm’s.identity-kanidm-ui.spec.ts,identity-keycloak-ui.spec.tsandidentity-zitadel-ui.spec.ts(@identity) eachtest.skip, with a message naming the running upstream, when the devstack runs another. -
The Keycloak and ZITADEL specs go through the upstream’s own pages at both origins:
-
a worker signs in;
-
with an existing SSO session,
prompt=loginforces reauthentication, a stalemax_ageforces it, and a fresh sign-in’sauth_timeis current; -
an account without a TOTP factor cannot finish signing in;
-
RP-initiated logout returns to
/login.
-
-
xtask e2eprints the upstream it ran against.
Units
Subjects are at most 72 characters with ` (#N). Each unit leaves `cargo check --workspace --all-targets --features canopy-portal/server,canopy-portal/preview passing; the devstack default stays Kanidm throughout.
-
U1 (w3)
docs(adr): record the alternative upstreams—type::documentation,service::security. ADR-049 Amendment 26 (AL1–AL12, the rulings) and its impact notes (C2, C7, C8, D6); this page (In progress) and its nav group; the issues, this header and the epic list; #2342 out of &134. -
U2 (w5)
feat(auth): add the keycloak and zitadel upstream profiles(AL1–AL3) —type::feature,service::shared-crates.upstream/{profile,id_token,projection,pointer}.rs. Tests: the unknown-profile test flips; each preset resolves and refuses a preset field;project_idandorganization_idare required for zitadel andUnknownFieldelsewhere; the audience pair is admitted, and an extra, missing-client or project-only audience refused; object keys, the organisation pin andprogram_parsing; a no-panic proptest over the object shape. -
U3 (w8)
refactor(test-lib): split the upstream harness from Kanidm(AL6) —type::chore,service::shared-crates. Tests: RFC 6238 TOTP vectors (SHA-1, SHA-256); the credentials round trip; links with string subjects and a reused subject; the Kanidm suite on the shared cases (the refreshednonceabsent-or-identical shared, its repetition Kanidm-only); the battery passes unchanged on Kanidm. Erratum (2026-10-13): the broker’sUpstream.authorization_endpointis each upstream’s static endpoint (Credentials::authorization_endpoint), which a shared conformance case and the broker’s battery test hold equal to discovery’s;UpstreamDrivergainssign_in_withandrestore_account. -
U4 (w5)
feat(xtask): choose the devstack upstream(AL7, Kanidm only yet) —type::feature,service::xtask. Tests: marker stickiness; argv pins per path; each kind’s generated profile loads throughUpstreamProfile::load; the other upstream graphs removed before a start; the cold-start order per path; a switch clears the cache. Erratum (2026-10-13): other upstreams' containers are removed by compose’s project and service labels, notcompose rm -sfby name; the profile is written from the credentials file once the upstream phase has provisioned it;canopy-token-brokerlosesdepends_on: kanidm, the in-network runners readingCANOPY_UPSTREAM_INTERNAL_ADDRandupstream.json;--idprefuses an upstream the devstack cannot provision before recording it, anddev restartrecords the choice again. -
U5 (w5)
feat(devstack): build Keycloak 26.8.1 on Alpine(AL5, AL8) —type::feature,service::devstack.devstack/keycloak/{Dockerfile,realm.json}, composekeycloak,keycloak-conformanceandidp-conformance-postgres,roles.sql. Tests: Dockerfile and compose pins; the realm’s roles, users, required OTP flow and logout URIs. Erratum (2026-10-13): AL5’sCONFIGURE_TOTPdefault required action is dropped and the action disabled, since it would let a password alone enrol the second factor; the devstack realm accepts a TOTP code more than once a step (otpPolicyCodeReusable, devstack only); acanopy-direct-grantflow requires the OTP ofadmin-cli's password grant too; the conformance server carries noidm.canopy.testalias. -
U6 (w8)
feat(test-lib): drive and provision Keycloak(AL5–AL7, AL9) —type::feature,service::shared-crates. The admin REST client, the HTML login driver, the xtask Keycloak phase,--idp keycloak,idp_conformance_keycloak.rs. Tests: form-parsing units and a no-panic proptest; the suite twice from a fresh instance;dev start --idp keycloak, then the broker’s tokens; two consecutivedev startswitches. Erratum (2026-10-13): a Keycloak person’ssubis its cast UUID with the fourth group0002; Keycloak’s expired account is a disabled one; one browser sign-in’s tokens share one Keycloak session, so revoking one refresh token refuses the others (the suite pins it); AL9’s publication on every interface, reach at the docker host and removal pass or fail apply to the Kanidm run too. -
U7 (w5)
feat(devstack): build ZITADEL v4.19.4 and Login V2 on Alpine(AL7, AL8) —type::feature,service::devstack. The core, login and front; thezitadel-bootstrapvolume and its ownership; first-instance config (admin and login-client PATs, Login V2, forced MFA); composezitadel*andzitadel-conformance*. Tests: Dockerfile, compose and front-config pins; the PAT directory’s owner and mode. Erratum (2026-10-13): the core runs as its own database login (zitadel init zitadel, thenstart-from-setup);ForceMFALocalOnlyis baked into its image; the front’s template is installed into its TLS volume; each service reads its own env file; each architecture’s tarball has its own fetch stage; the provisioner’s PAT has its own volume (zitadel-provisioner, 0700), apart from Login V2’s (zitadel-bootstrap, 0750). -
U8 (w8)
feat(test-lib): drive and provision ZITADEL(AL3, AL4, AL6, AL7, AL9) —type::feature,service::shared-crates. v2-API provisioning: the project withprojectRoleAssertion; roles includingprogram_*; the app withidTokenRoleAssertion,idTokenUserinfoAssertion, redirects andpostLogoutRedirectUris, its secret stored at creation; users; TOTP; grants. The Session API driver,--idp zitadel,idp_conformance_zitadel.rs. Tests as U6, plus the id_token’s actual claims. Erratum (2026-10-13): ZITADEL refuses a reused TOTP code (TOTP-Auw0a) and creating a person spends that step’s code, so the driver tries the adjacent steps' codes and then waits for the next step (the suite takes about five minutes); a revoked token’s or a deactivated account’s refresh is refusedinvalid_request, so the refusal code is per upstream; tokens are read out of their volumes by one-off containers of the core, and an instance the credentials do not record is reset; the upstream TLS volume’s directory is handed to the terminator’s user at every install; ZITADEL’s end session leaves its refresh tokens valid (#2905). -
U9 (w5)
test(e2e): sign in through each upstream’s own pages(AL12) —type::chore,service::web. Erratum (2026-10-13): ZITADEL ignores OIDCmax_agein Login V2 and in the core (zitadel/zitadel#12258), a STOP rule; the maintainer accepted ZITADEL with the defect on record, tracked by #2906: the Session API driver no longer imitatesmax_age, the sharedmax_agecase is Kanidm’s and Keycloak’s (tests/idp_conformance/max_age.rs), and the ZITADEL suite and spec pin the defect. Login V2 returns to the relying party by its page’s own navigation, which the shared walk (tests/e2e/lib/identity/upstream-ui.ts) accepts. The broker gains account and redeem routes, and its image copiesdevstack/keycloak/realm.json, which canopy-test-lib compiles in (broken since U6; a guard test holds it). -
U10 (w5)
feat(xtask): run the identity matrix before an identity push(AL10) —type::feature,service::xtask. Tests: push-spec parsing including new refs and deletions; a representative single-file change perIDENTITY_PATHSentry triggers the matrix, and a non-identity file does not; every entry exists; the hook block pin. Erratum (2026-10-13):IDENTITY_PATHSaddsxtask/src/devstack_upstream.rsandxtask/src/cmd/identity.rs, and a rename counts at both its paths. -
U11 (w3)
chore(ci): gate a release on the identity conformance suites(AL11) —type::chore,service::ci. Tests: theci-config-lintpin (job, rule, nextest install); the prebuilt-image argv. Erratum (2026-10-13): the job runs on the fleet’sdhs-aws-autoscaler-docker.2xlargetag, as every Docker-in-Docker job does; the matrix keeps each suite’s report asidp-conformance-<idp>.xml; the deployment-guide step landed with this unit. -
U12 (w5)
docs: record the Keycloak and ZITADEL profiles—type::documentation,service::security. ADR-050 amendments with each vendor’s run record (and any Alpine exception); ADR-048’s supported set; Amendment 26 as built;idp-integration(per profile: a setup checklist, a YAML skeleton and where MFA is enforced),configuration-reference,local-dev,xtask-catalog,testing,deployment-guide, the CHANGELOG; this plan Done and archived; after merge, #2347 and #2349 closed.
STOP rules (from plan I0)
STOP and report, per vendor, when:
-
no claim path exists;
-
prompt=loginormax_ageis ignored on the product’s own login (Keycloak: its forms; ZITADEL: Login V2); -
an expired or disabled account can still refresh;
-
MFA cannot be made mandatory on the product’s own login;
-
Keycloak’s provisioning lets an access token pass C7 as an id_token;
-
ZITADEL’s
audcarries more than the client and project with canopy-web alone in its project.
Not a STOP: claims only in userinfo, or refresh without an id_token (the preset names userinfo for both, F9); a failed Alpine image (AL8’s fallback); any other fact (correct it and its test, and record it in the unit’s commit and in U12).
Scope
In: AL1–AL12; closing #2347 and #2349.
Out:
-
Studio’s wizard and its bundle README (the maintainer’s ruling).
-
#2342.
-
Renaming
.devstack/idp/kanidm-ca.pem, which is the shared devstack CA (a one-line note in local-dev). -
Trusting more than one upstream at once (ADR-049 D1 stands).
Risks
-
Push time: an identity push runs three suites, each from a fresh graph.
-
ZITADEL’s login-client PAT is an IdP credential (AL4). Its handling in the devstack (AL7) and the deployment guide’s checklist are the controls.
-
Keycloak on the musl JRE and Next.js on musl (AL8’s fallback).
-
Memory: Keycloak’s JVM; one upstream runs at a time.
-
ZITADEL’s app secret is shown once: provisioning stores it at creation and re-provisions on loss.
-
Vendor drift: pins are exact; a bump is a unit with its suite.
Verification
-
Per unit: the
cargo checkabove, fmt, clippy and unit tests on the touched crates, check-docs, plan-lint. -
cargo xtask identity conformance --idp kanidm|keycloak|zitadel, each from a fresh graph, twice. -
For each of
--idp keycloakand--idp zitadel:-
cargo xtask dev start --idp <idp>; -
CANOPY_TEST_INFRA=required cargo nextest run -p canopy-test-lib --no-fail-fast, and-p canopy-cli --test device_login_test; -
cargo xtask e2e --no-refresh — --project identity-plane(AL12’s sign-in, freshness, MFA and logout specs).
-
-
Before the push:
cargo xtask identity matrix --all --e2e, then the pre-push battery (whose matrix runs for this identity push). -
By hand, recorded in the MR: a host browser signs in and out through Keycloak’s and ZITADEL’s pages at
https://web.canopy.test:<P>.
Review log
| Round | Vendor | Resolved model | Verdict |
|---|---|---|---|
1 |
Anthropic |
claude-opus-5-5 |
No-ship. Nine blockers, fixed: the |
2 |
not stated (the maintainer’s other vendor) |
not stated |
No-ship. 14 findings (4 P1), fixed in-plan: ZITADEL’s MFA trust boundary in Login V2, tested in the browser (AL4, AL12);; Keycloak’s required-OTP browser flow and a no-OTP account test (AL5, AL9);; ZITADEL’s |