Identity plane split, plan I4: the alternative upstreams (epic &134)

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.gz with a GPG .asc; Java 21.

    • id_token aud = client id, azp = client id, auth_time present. 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 nonce from 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 is node:24-alpine), checksums.txt. It needs PostgreSQL and a 32-character ZITADEL_MASTERKEY; v4.19.2+ also requires ZITADEL_SESSION_COOKIE_SECRET (≥32 characters).

    • id_token aud holds 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 idTokenRoleAssertion and idTokenUserinfoAssertion and the project’s projectRoleAssertion.

    • 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

keycloak

ES256

id_token / reissues_id_token

client_secret_basic

openid profile

/roles / /primary_programs / /preferred_username

zitadel

RS256

id_token / reissues_id_token

client_secret_basic

openid profile offline_access urn:zitadel:iam:org:projects:roles urn:zitadel:iam:org:id:{organization_id}

AL3’s object keys of /urn:zitadel:iam:org:project:{project_id}:roles / its program_ keys / /preferred_username

AL2. ZITADEL’s audience (amends C7)

  • For a zitadel profile, aud may be the client id alone, or an array of exactly the client id and project_id, each once. With two members, azp must 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) or object_keys. object_keys is the zitadel preset’s alone; no file can state a shape.

  • Under object_keys the value must be an object. A key counts only when its value is an object holding organization_id as 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 starting program_, whose suffix is a program wire id (program_snap). A bad suffix is malformed_primary_programs; none is missing_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_persons requires 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-browser flow (a copy of browser whose OTP Form is REQUIRED, not conditional) bound as the realm’s browser flow, and CONFIGURE_TOTP a default required action;

    • primary_programs declared 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 scopes basic and profile (Keycloak 25+ emits sub and auth_time only through basic) and canopy. Redirect URIs are both origins' /auth/callback; post.logout.redirect.uris are both origins' /login (canopy-web’s logout return, post_logout in services/canopy-web/src/auth/mod.rs). Both lists are rewritten on a port change.

  • Client scope canopy: a realm-role mapper to a multivalued roles claim and a user-attribute mapper to a multivalued primary_programs claim, each in the id_token and userinfo only, never an access-token audience for canopy-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 over POST /admin/realms/canopy/partialImport (seeds generated by xtask), then reads the client secret.

AL6. The upstream harness, split from Kanidm

  • upstream::oidc takes the plain OIDC half of upstream/kanidm/login.rs: the authorize request, exchange, refresh, revoke, userinfo, discovery, JWKS and the independent verifier.

  • upstream::cast takes SeedPerson, PERSONS and GROUPS, which are vendor-neutral; realm_subject() stays. upstream::{Secret, TotpSeed, Credentials, UpstreamError} are neutral. TotpSeed carries the algorithm (SHA-1 or SHA-256), digits and step (totp-lite).

  • Credentials holds the issuer, client id, client secret, cast_digest, per person { name, sub, password, totp }, and admin: an enum per vendor (Kanidm’s idm_admin password; Keycloak’s admin user and password; ZITADEL’s admin and login-client PATs).

  • UpstreamDriver is 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) and set_roles(person, roles, programs).

  • link_cast reads each person’s sub and the issuer from Credentials. A subject that already exists (after a switch) is reused, and the new (issuer, sub) link is added.

  • TokenBroker, tools/canopy-token-broker's Plane and its session cache take the neutral types. CANOPY_TESTKANIDM_{ADDR,CREDENTIALS,CA} become CANOPY_TESTUPSTREAM_* (PORTS_ENV_VERSION 9). The TypeScript Upstream gains kind, the discovered authorizationEndpoint and the profile’s scopes.

  • The Rust battery’s tests that import upstream::kanidm::login::Driver or write profile: kanidm take UpstreamDriver::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_session moves into the Kanidm suite.

AL7. The devstack’s upstream

  • cargo xtask dev start|reload|restart --idp kanidm|keycloak|zitadel (default kanidm), sticky in .devstack/upstream. The guard’s refresh paths (auto_refresh, ensure_ready) read it.

  • Compose services kanidm, keycloak and zitadel (ZITADEL’s front, AL8; zitadel-core and zitadel-login behind it are internal). Each is in its own profile upstream-<idp> outside the deployment profiles, and each is aliased idm.canopy.test, so the existing leaf, CA and SPKI pins stand; the TLS volume becomes upstream-tls.

  • Each listens on its reserved port in its container: PORT_MAPPINGS and SAME_PORT_SERVICES rows for all three. upstream_port(ports, idp) picks the running one, and CANOPY_TEST__UPSTREAM_ADDR is 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 -sf by service name), then starts it. Only canopy-token-broker uses the upstream; its depends_on names none, and the bring-up orders it.

  • Cold-start order. For keycloak and zitadel, upstream_phase runs up -d --wait postgres, then the postgres-roles one-shot to completion, then up -d --no-deps --wait on 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’s up. Kanidm keeps today’s order. issuer::profile_yaml writes 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 the keycloak and zitadel dev logins, in source like every devstack credential, and creates their databases with SELECT … \gexec when 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>.env files, which compose names as env_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 volume zitadel-bootstrap, under a directory owned 10001:10001, mode 0750, with the core’s entrypoint at umask 0027. zitadel-login runs as uid 1001 with group_add: ["10001"] to read its PAT. xtask copies the admin PAT out through a one-off container into .devstack/idp/zitadel.json (0600), the way devstack_tls::install moves files through volumes.

AL8. Images on Alpine

Image Base From User HEALTHCHECK

devstack/keycloak

alpine:3.23 + openjdk21-jre-headless

keycloak-26.8.1.tar.gz, SHA-256 pinned (checked once against its .asc)

10001

wget -q -O /dev/null http://127.0.0.1:9000/health/ready (KC_HEALTH_ENABLED=true, KC_HTTP_MANAGEMENT_SCHEME=http; the management port is never published)

devstack/zitadel

alpine:3.23

zitadel-linux-${TARGETARCH}.tar.gz, SHA-256 from checksums.txt

10001

zitadel ready

devstack/zitadel-login

node:24-alpine

zitadel-login.tar.gz, SHA-256 from checksums.txt

1001

wget -q -O /dev/null http://127.0.0.1:3000/ui/v2/login

ZITADEL’s front

the pinned nginx-unprivileged image

an envsubst template (devstack/zitadel/front.conf.template) routing /ui/v2/login to the login and the rest (h2c included) to the core, with TLS for idm.canopy.test

101

wget -q -O /dev/null http://127.0.0.1:8081/healthz

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 of idp_conformance_kanidm.rs, idp_conformance_keycloak.rs and idp_conformance_zitadel.rs (feature idp-conformance).

  • Shared:

    • discovery and C6; PKCE+TOTP sign-in; the upstream_* paths; projection;

    • prompt=login and max_age through the driver (the server’s honouring for Kanidm and Keycloak, whose drivers use their own login);

    • refresh, whose refreshed id_token’s nonce is 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 nonce repetition, 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|zitadel stands up the vendor’s whole conformance graph:

    • kanidm-conformance; keycloak-conformance; zitadel-conformance (the front), zitadel-conformance-core and zitadel-conformance-login;

    • idp-conformance-postgres (tmpfs) for Keycloak and ZITADEL.

      Every one is an OPT_IN_SERVICES row and, where published, a PORT_MAPPINGS row, 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 the devstack_tls generator, publishes on every interface, provisions, runs the suite, and removes the graph on exit, pass or fail. Suites and command reach it at docker_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 touches IDENTITY_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. --all ignores the range; --e2e also brings the devstack up on each upstream and runs the identity-plane project.

  • .githooks/pre-push pipes $PUSH_SPEC into it after its managed region.

AL11. The release gate (the epic’s "release precondition")

  • A tag-only CI job identity-conformance (stage test, tags: [$RUNNER_LARGE], Docker-in-Docker as integration-tests has it, needs: [kanidm-image]) installs cargo-nextest 0.9.140 with its SHA-256 check, as cargo-test does, and runs identity matrix --all. docker-promote waits on the test stage. ci-config-lint pins the job.

  • identity conformance honours CANOPY_PREBUILT_KANIDM_IMAGE (no compose build when set).

  • deployment-guide.adoc › "Release, rollback, recovery" gains the step cargo xtask identity matrix --all --e2e on 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/oauth2 assertion reads the discovered path. pinned-browser.ts pins the upstream leaf by kind.

  • Page objects keycloak-login.page.ts and zitadel-login.page.ts sit beside Kanidm’s. identity-kanidm-ui.spec.ts, identity-keycloak-ui.spec.ts and identity-zitadel-ui.spec.ts (@identity) each test.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=login forces reauthentication, a stale max_age forces it, and a fresh sign-in’s auth_time is current;

    • an account without a TOTP factor cannot finish signing in;

    • RP-initiated logout returns to /login.

  • xtask e2e prints 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.

  1. 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.

  2. 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_id and organization_id are required for zitadel and UnknownField elsewhere; the audience pair is admitted, and an extra, missing-client or project-only audience refused; object keys, the organisation pin and program_ parsing; a no-panic proptest over the object shape.

  3. 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 refreshed nonce absent-or-identical shared, its repetition Kanidm-only); the battery passes unchanged on Kanidm. Erratum (2026-10-13): the broker’s Upstream.authorization_endpoint is each upstream’s static endpoint (Credentials::authorization_endpoint), which a shared conformance case and the broker’s battery test hold equal to discovery’s; UpstreamDriver gains sign_in_with and restore_account.

  4. 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 through UpstreamProfile::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, not compose rm -sf by name; the profile is written from the credentials file once the upstream phase has provisioned it; canopy-token-broker loses depends_on: kanidm, the in-network runners reading CANOPY_UPSTREAM_INTERNAL_ADDR and upstream.json; --idp refuses an upstream the devstack cannot provision before recording it, and dev restart records the choice again.

  5. U5 (w5) feat(devstack): build Keycloak 26.8.1 on Alpine (AL5, AL8) — type::feature, service::devstack. devstack/keycloak/{Dockerfile,realm.json}, compose keycloak, keycloak-conformance and idp-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’s CONFIGURE_TOTP default 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); a canopy-direct-grant flow requires the OTP of admin-cli's password grant too; the conformance server carries no idm.canopy.test alias.

  6. 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 consecutive dev start switches. Erratum (2026-10-13): a Keycloak person’s sub is its cast UUID with the fourth group 0002; 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.

  7. 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; the zitadel-bootstrap volume and its ownership; first-instance config (admin and login-client PATs, Login V2, forced MFA); compose zitadel* and zitadel-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, then start-from-setup); ForceMFALocalOnly is 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).

  8. U8 (w8) feat(test-lib): drive and provision ZITADEL (AL3, AL4, AL6, AL7, AL9) — type::feature, service::shared-crates. v2-API provisioning: the project with projectRoleAssertion; roles including program_*; the app with idTokenRoleAssertion, idTokenUserinfoAssertion, redirects and postLogoutRedirectUris, 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 refused invalid_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).

  9. U9 (w5) test(e2e): sign in through each upstream’s own pages (AL12) — type::chore, service::web. Erratum (2026-10-13): ZITADEL ignores OIDC max_age in 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 imitates max_age, the shared max_age case 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 copies devstack/keycloak/realm.json, which canopy-test-lib compiles in (broken since U6; a guard test holds it).

  10. 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 per IDENTITY_PATHS entry triggers the matrix, and a non-identity file does not; every entry exists; the hook block pin. Erratum (2026-10-13): IDENTITY_PATHS adds xtask/src/devstack_upstream.rs and xtask/src/cmd/identity.rs, and a rename counts at both its paths.

  11. U11 (w3) chore(ci): gate a release on the identity conformance suites (AL11) — type::chore, service::ci. Tests: the ci-config-lint pin (job, rule, nextest install); the prebuilt-image argv. Erratum (2026-10-13): the job runs on the fleet’s dhs-aws-autoscaler-docker.2xlarge tag, as every Docker-in-Docker job does; the matrix keeps each suite’s report as idp-conformance-<idp>.xml; the deployment-guide step landed with this unit.

  12. 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=login or max_age is 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 aud carries 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 check above, 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 keycloak and --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 chore(ci) subject;; the one-MR reason;; per-service port variables and the conformance rows;; the IdP databases in roles.sql (\gexec, dev logins in source);; the driver’s admin writes, neutral Credentials and the Kanidm-only cases;; the battery tests on the running kind;; Docker-in-Docker reach and the prebuilt Kanidm image;; the release step’s page;; the unstated values (paths, ranges, shapes, Keycloak’s realm and OTP provisioning, secrets' delivery, images' bases, users and health).

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 idTokenUserinfoAssertion and projectRoleAssertion (U8);; the cold-start order through postgres and postgres-roles on every path (AL7);; Keycloak’s HTTP management probe (AL8);; removing other upstreams before a start (AL7);; ZITADEL’s PAT volume, ownership and handoff (AL7);; the existing Kanidm specs gated and every authorization-URL builder migrated (AL12);; the refresh nonce absent-or-identical (AL9);; Login V2’s freshness and MFA in the browser (AL12);; RP-initiated logout registered and tested (AL5, U8, AL9, AL12);; the matrix’s paths and single-file triggers (AL10);; the whole conformance graph registered, recreated and removed (AL9);; the release job’s pinned nextest (AL11).

Edit this page · default