ADR-050: Kanidm Is the Default Upstream Identity Provider; IdP Profiles Are Deployment Configuration

Status: Accepted (2026-09-30); amended by Amendment 1 (2026-10-02, #2558), Amendment 2 (2026-10-05, #2692), Amendment 3 (2026-10-05, #2698), Amendment 4 (2026-10-05, #2719), Amendment 5 (2026-10-13, #2902), Amendment 6 (2026-10-13, #2902) and Amendment 7 (2026-12-02, #3625)
Issue: #2488
Ruling: the maintainer, 2026-09-29: Kanidm as the default, with ZITADEL and Keycloak as first-class, tested alternatives.
Relates to:

  • ADR-049 (the identity plane split this sits on);

  • ADR-048 (its §3 vendor-preset rule restated per profile);

  • epic &130;

  • design: plan I0.

Context

ADR-049 makes the upstream identity provider an edge concern. It signs workers in at canopy-web, and canopy-identity federates its id_token. An upstream therefore owes canopy four things:

  • OIDC sign-in with PKCE;

  • validated claims for roles and programs, in the id_token or userinfo;

  • a refresh that re-issues them;

  • enforced multi-factor authentication.

It no longer serves the internal token plane.

The maintainer wants Kanidm as the default. Choosing a default identity provider is a new, hard-to-reverse external dependency, so it needs an ADR, a comparison against alternatives, and evidence gathered live rather than read from documentation. Plan I0 added an opt-in Kanidm devstack profile and a headless conformance suite (#2486, #2487) to produce that evidence.

Decision

1. The default and the alternatives

  • Kanidm is the default upstream for the devstack, the reference deployment and greenfield jurisdictions.

  • ZITADEL and Keycloak are first-class alternatives. Each gets a profile and a conformance suite (epic &134).

  • A jurisdiction whose identity sources Kanidm cannot broker picks one of these as its single upstream: ZITADEL, Keycloak, or its own OIDC provider through the oidc-generic profile. That is configuration, not code.

    • Georgia, for example, has Okta SAML and an eDirectory directory.

    • Kanidm has no SAML and no upstream federation.

The devstack’s default flips to Kanidm at the I3 cut-over (epic &133). Until then the Kanidm profile is opt-in (cargo xtask identity conformance --idp kanidm), and the devstack still runs Keycloak.

2. IdP profiles are deployment configuration

  • Where profiles live. [identity] and [[idp]] leave the ruleset’s idp.toml. They become deployment configuration, read by canopy-web and by canopy-identity’s federation grant. Jurisdiction policy stays in the packs; the IdP product is an operational choice.

  • The profiles. kanidm, zitadel, keycloak and oidc-generic. Each names:

    • the claim contract (pointers for roles and programs);

    • whether claims come from the id_token or userinfo;

    • whether refresh re-issues an id_token;

    • the upstream client-authentication method;

    • the signing algorithms.

  • No vendor profile ships without a conformance suite. A vendor profile ships only with a passing conformance suite against that product. This restates ADR-048 §3 per profile.

  • Trust anchors. Upstream-facing clients take extra trust anchors (a PEM bundle) from configuration, because deployments commonly front their IdP with an internal PKI.

3. The Kanidm operating model

  • Upgrades. Kanidm releases quarterly. It supports upgrades from N-1 only and keeps a four-month support window. A deployment upgrades at least quarterly.

  • Replication is capped at two nodes.

  • Logout. Kanidm advertises no end-session endpoint. canopy-web revokes the upstream refresh token (RFC 7009), and the next sign-in sends prompt=login (ADR-049 D6).

  • AC-8. Kanidm’s login page has no system-use banner. canopy-web renders it.

  • The image is built from source on rust:1.96-alpine and runs on alpine:3.23 (devstack/kanidm/Dockerfile). No Alpine exception is needed.

  • Build cost. The cold build takes about 11 minutes and peaks at about 6 GB while linking. A prebuilt image for CI is an I3 deliverable.

4. Verified facts

On 2026-09-30, cargo xtask identity conformance --idp kanidm exercised Kanidm v1.11.2 (commit 547933867e87da737e79d26942dc9261adaa5ee9; release tarball SHA-256 a8ed31203e5f8c036b9cb261c85ddac19291bc6ca16981495495cd9621c56529). Each fact below is the assertion of a test in crates/canopy-test-lib/tests/idp_conformance_kanidm.rs. All eleven tests passed on twelve runs, including fresh runs and runs after --keep.

Test Observed

discovery_names_a_per_client_es256_issuer_without_end_session

  • The issuer is https://<origin>/oauth2/openid/canopy-web: one issuer per client.

  • Signing algorithms are exactly ES256.

  • Client auth methods are exactly client_secret_basic and client_secret_post.

  • There is no end_session_endpoint.

  • The authorization_endpoint is the HTML /ui/oauth2.

sign_in_with_pkce_and_totp_yields_a_verified_id_token

  • Authorise redirected with a code and the request’s state, with no consent step.

  • The id_token is ES256. iss is the discovery issuer. aud and azp are the string canopy-web.

  • nonce is echoed, sub is the entry UUID, and auth_time is present.

  • There is no acr or amr.

id_token_claims_project_through_an_oidc_generic_contract

A three-role person’s roles, and five programs, project as JSON arrays through an ES256 oidc-generic contract.

prompt_login_refuses_a_session_that_is_not_fresh

A UAT issued moments earlier is refused (401) with prompt=login, and accepted without it.

max_age_refuses_a_stale_uat_and_a_fresh_sign_in_updates_auth_time

With max_age=2, a 3.1 s-old UAT is refused. A fresh sign-in is accepted, with an auth_time no earlier than the sign-in.

the_access_token_lives_900_seconds_and_carries_no_claim_maps

expires_in = 900, typ = at+jwt, and exp − iat = 900. There are no roles or programs, while the id_token carries them.

a_person_cannot_commit_a_password_only_credential_and_is_offered_only_passwordmfa

MFA is mandatory by default. A throwaway person’s password-only credential is refused at commit (MfaRequired), and every seeded person is offered only passwordmfa.

refresh_reissues_claims_from_current_membership_and_userinfo_matches

  • Refresh re-issued an id_token.

  • iss, aud, sub, auth_time and nonce were unchanged, and iat advanced.

  • A new program group appeared.

  • Userinfo returned the same sub and programs.

replaying_a_rotated_refresh_token_revokes_the_session

After a rotation in a later second, the replayed token and its successor are both refused (invalid_grant).

a_revoked_refresh_token_cannot_refresh

Revocation returns 200, and the next refresh is refused.

an_expired_account_cannot_refresh

After account_expire is set in the past, refresh is refused and userinfo returns 401.

Facts read from source (server/lib/src/idm/oauth2.rs at the tag) and not exercised:

  • A replay within the same second as the rotation is not detected, because the comparison is in whole seconds. Excluded by design, since a test of it would depend on timing.

  • Refresh tokens live 16 hours.

  • Authorization codes may be reusable within their 60 s lifetime, which is a deviation from RFC 6749 §4.1.2. It is tolerated: exploiting it requires both the PKCE verifier and canopy-web’s client secret.

Erratum (2026-10-02): the first and third bullets above are superseded by Amendment 1. Codes are reusable until they expire. A replayed refresh token is refused when it was issued in an earlier second than the latest rotation, whenever the replay arrives. Both facts are now exercised by tests.

What this settles for ADR-049:

  • The kanidm profile reads claims from the id_token, and refresh re-issues it. The userinfo fallback is not needed.

  • prompt=login and max_age both work, so logout and step-up are available.

  • Deprovisioning reaches canopy through refresh refusal.

  • canopy-web’s upstream refresh must be single-flight across replicas, because any detected replay revokes the whole session. A lost refresh response forces a re-login; that is accepted.

5. The comparison

The candidates were compared on 2026-09-30. Licences are read from each project’s LICENSE file at the pinned tag.

Kanidm 1.11.2 ZITADEL 4.19.3 Keycloak 26.7.4 authentik

Licence

MPL-2.0

AGPL-3.0

Apache-2.0

MIT, with an enterprise directory under its own licence

Language and runtime

Rust, one binary, embedded SQLite

Go, one binary, PostgreSQL

Java (Quarkus), a JVM

Python, PostgreSQL

Alpine / musl fit

Builds from source on rust:alpine (verified above)

A static Go binary; the upstream image is scratch

UBI9-micro upstream; a JVM

Debian upstream

Footprint

341 MiB image; a small resident set

Moderate

Heavy (the devstack caps it at 3 GB)

Moderate, several processes

Upstream brokering (SAML, LDAP)

None; LDAP sync-in only

SAML and LDAP

SAML, LDAP and Kerberos

SAML and LDAP

MFA and passkeys

Mandatory by default; passkeys first-class

Yes

Yes

Yes

Adoption and maintenance

Smaller community; quarterly releases

Large; active

Largest; active

Large; active

Kanidm is the default because it best fits canopy’s stack:

  • Rust, musl and Alpine;

  • the smallest footprint;

  • mandatory MFA by default;

  • a licence that coexists with canopy’s AGPL.

Its gap is brokering. That is exactly what the alternatives supply, and ADR-049’s single-upstream model lets a jurisdiction choose one by configuration.

Consequences

  • The devstack gains Kanidm now as an opt-in profile. It becomes the default at I3, which also brings a prebuilt image for CI and the per-IdP Playwright login pages.

  • Operators own a quarterly upgrade cadence for Kanidm deployments.

  • Alternative images. The ZITADEL and Keycloak images are not Alpine. Their exceptions are recorded when their profiles land (epic &134).

  • Onboarding a jurisdiction means choosing a profile and running its conformance suite against the jurisdiction’s IdP.

Amendment 1 (2026-10-02, #2558) — Kanidm’s code reuse and refresh-replay rule, exercised

Status unchanged (still Accepted). §4 recorded two facts as read from source and not exercised. A re-read of the source and a live probe on 2026-10-02 found one stated too weakly and the other wrongly. These tests now assert them:

Test Observed

one_authorization_code_redeemed_twice_yields_two_working_token_sets

One code redeemed twice issues tokens both times, into two distinct OAuth2 sessions. Afterwards both access tokens pass userinfo and both refresh tokens refresh.

an_authorization_code_is_redeemable_until_sixty_whole_seconds_after_its_minting_second

A code minted in second S is redeemed at once and again in S + 59, both issuing tokens. In S + 60 it is refused with invalid_request (RFC 6749 §5.2 names invalid_grant).

a_refresh_token_rotated_in_its_issuance_second_is_accepted_on_replay

  • A token issued and rotated in one second is accepted when replayed in a later second. The replay joins the same session, and its access token passes userinfo.

  • The rotated successor’s next refresh is then refused (invalid_grant). That revokes the session: the replay’s refresh token is refused, and its access token fails userinfo (401).

replaying_a_rotated_refresh_token_revokes_the_session

A token rotated in a later second than its issuance is refused (invalid_grant) when replayed inside the rotation’s second. The rotated successor is refused next, and its access token fails userinfo (401).

The tests read the second of each issued response from its access token’s iat. A refused request and a code carry no iat; for those they read the client clock, which Kanidm’s container shares. A sequence whose seconds miss is retried on a fresh session or code, at most five times. The code-expiry test’s redemptions at S + 59 and S + 60 are not retried: a miss fails the test.

The facts, from server/lib/src/idm/oauth2.rs at the tag:

  • Authorization codes are reusable until they expire. A code is a stateless JWE holding its expiry: the second it was minted in, plus 60 (:2549, or :1422 after a consent prompt). The exchange decrypts it, checks the expiry, PKCE and the redirect URI, and opens a new OAuth2 session (:1492-1599). Nothing records that the code was redeemed, and earlier tokens stay valid. This deviates from RFC 6749 §4.1.2. Kanidm chose it: with multi-master replication, an exchange can reach a node before any record of the code could, so codes are stateless (kanidm#2775). It was reported again in GHSA-hh34-7jqq-3f73 (Low, no patched version).

  • Refresh replay is decided in whole seconds. Each issue records its time as the session’s issue time (:2148-2179). A refresh token is refused, and its session revoked, only when its iat second is earlier than the issue time’s second (:1682). So a token rotated in a later second than its issuance is refused on replay, even inside the rotation’s second. A token rotated in its own issuance second stays accepted on replay until a refresh in a later second moves the issue time past its iat, and an accepted replay forks the session. The fork is caught once a refresh in a later second, which may be the replay itself, moves the issue time past the other branch’s iat: that branch’s next refresh is refused, which revokes the session.

A search of Kanidm’s issues, pull requests and security advisories on 2026-10-02 found no record of the refresh-replay rule.

Run record. On 2026-10-02, cargo xtask identity conformance --idp kanidm exercised Kanidm v1.11.2 (commit 547933867e87da737e79d26942dc9261adaa5ee9). All fourteen tests passed on each of six consecutive full runs.

What this changes for canopy: nothing. canopy-web is a confidential client. Reusing one of its codes needs the PKCE verifier and canopy-web’s client secret, and the refresh grant needs the client secret (:1216-1238). Every session a code opens is a child of the person’s Kanidm session; once that is revoked, the children’s tokens are refused when used at refresh or userinfo (read from source, server/lib/src/idm/server.rs:640-733). A refresh token presented twice still revokes the whole session when its first presentation comes in a later second than its issuance, so canopy-web’s cross-replica refresh single-flight (§4) stays required.

Amendment 2 (2026-10-05, #2692) — the TLS trust-anchor bundle replaces the built-in roots

Status unchanged (still Accepted). §2’s Trust anchors bullet has upstream-facing clients take "extra" trust anchors (a PEM bundle) from configuration, without saying whether the bundle adds to the built-in roots or replaces them. Plan I2b decides it (ADR-049 Amendment 5, C4):

  • The bundle replaces the built-in roots. The upstream profile names the bundle in tls_trust_anchors, one file name resolved against the config root. When it names one, the upstream client trusts only the bundle’s certificates. Without one it trusts reqwest’s built-in roots: in the shipped image, webpki-roots and the OS store, since object_store's rustls-tls-native-roots feature unifies into the build.

  • Why. Replacing pins discovery, JWKS and userinfo to the deployment’s PKI, so a mis-issued public certificate cannot substitute the upstream’s keys. Which roots are trusted then no longer depends on how reqwest’s features unify.

  • Not adopted: an additive mode, trusting the built-in roots and the bundle together. It waits for a deployment that needs one.

What this changes for canopy: §2’s "extra trust anchors" now means the profile’s TLS trust anchors, in place of the built-in roots. canopy-identity’s upstream client (plan I2b) is the first upstream-facing client to take them, and canopy-web’s upstream clients take them at I3.

Amendment 3 (2026-10-05, #2698) — the kanidm profile, verified through canopy-identity’s upstream path

Status unchanged (still Accepted). §2 ships no vendor profile without a passing conformance suite. Plan I2b built canopy-identity’s upstream path and its kanidm profile (ADR-049 Amendment 5), and its last unit runs that path against the lane’s Kanidm. Each of the tests below writes a kanidm profile into a config root: the per-client issuer, the client canopy-web, and the lane’s CA as tls_trust_anchors. It loads the profile and the CA as canopy-security’s boot loads them. The lane’s own verifier (§4) still checks every id_token beside it. These tests now assert:

Test Observed

upstream_keys_are_fetched_over_the_private_ca_and_hold_the_id_tokens_kid

  • The key source fetched discovery and the JWKS through the upstream client, which trusts only the lane’s CA. It held the key the id_token’s kid names, bound to ES256.

  • The same profile on the built-in roots fetched nothing, so the keys were unavailable.

  • Discovery’s jwks_uri and userinfo_endpoint share the issuer’s origin. The key source served discovery’s userinfo endpoint.

upstream_validator_accepts_a_real_id_token_whose_header_has_no_typ

  • The validator accepted the id_token. Its anchor held the discovery issuer, the entry UUID as sub, the request’s nonce and the auth_time the lane’s verifier read. Its payload equalled the claims the lane’s verifier read.

  • The id_token’s header has no typ, and exp − iat = 900.

upstream_validator_refuses_kanidms_access_token_presented_as_an_id_token

The lane’s verifier accepts the access token against the same JWKS, issuer and audience. Presented as an id_token, it was refused for its header typ, at+jwt.

upstream_validator_accepts_a_refreshed_id_token_with_the_original_anchor

The id_token a refresh re-issued was accepted with the sign-in id_token’s iss, sub, auth_time and nonce.

upstream_userinfo_binds_to_the_id_tokens_sub_and_refuses_another

Userinfo, called at discovery’s endpoint, answered claims naming the id_token’s sub. A second request with the same token, expecting another person’s subject, was Invalid: a sub mismatch.

upstream_projection_grants_the_reader_its_roles_programs_and_username

preferred_username is the account name, jane.doe. The reader projected to its three roles, its five programs and that username.

upstream_projection_grants_the_snap_worker_its_seeded_role_and_program

With its program groups restored, the SNAP worker projected to caseworker and snap only.

upstream_projection_refuses_the_unscoped_person_as_missing_programs

The unscoped person’s id_token verified, and its projection was refused as MissingPrograms (missing_primary_programs).

The facts §4 did not record:

  • preferred_username is the short account name, as the migration’s oauth2_prefer_short_username asks (devstack/kanidm/migrations/00-canopy.hjson). The kanidm profile reads the username there, at /preferred_username.

  • The id_token lives 900 s (exp − iat), as the access token does. canopy-identity refuses an id_token issued more than 300 s ago (ADR-049 D5), so a Kanidm id_token federates only in its first 300 s.

  • The id_token’s header carries no typ, while the access token’s is at+jwt (§4). canopy-identity accepts only an absent typ, JWT or application/jwt, so Kanidm’s access token never passes as its id_token.

  • Discovery’s jwks_uri and userinfo_endpoint sit on the issuer’s origin (scheme, host and port). The kanidm profile therefore names neither, and ADR-049 Amendment 5’s origin rule for discovered endpoints (C6) holds.

Run record. On 2026-10-05, cargo xtask identity conformance --idp kanidm exercised Kanidm v1.11.2 (commit 547933867e87da737e79d26942dc9261adaa5ee9). All twenty-two tests passed on each of two consecutive full runs.

What this changes for canopy: the kanidm profile has its conformance suite, as §2 requires. canopy-identity’s upstream path verifies the lane’s real tokens end to end:

  • the profile loader;

  • the TLS trust anchors in place of the built-in roots, the positive proof no in-process test can make;

  • the lazy discovery and key cache;

  • the id_token validator;

  • the userinfo client;

  • the projection.

Nothing federates yet: plan I2c’s grant is the first caller.

Amendment 4 (2026-10-05, #2719) — the web-session rules, run on the lane’s real tokens

Status unchanged (still Accepted). Plan I2c builds canopy-identity’s federation grant and its web sessions (ADR-049 Amendment 6). Its last unit runs the session rules canopy-auth holds on the lane’s real tokens, through Amendment 3’s kanidm profile, trust anchors and upstream path. Where a test needs a session’s stored state, it builds the StoredAnchor canopy-security’s store records: the opening id_token’s issuer, subject, auth_time and nonce digest, the profile’s client, and the latest recorded id_token’s iat and digest. These tests now assert:

Test Observed

session_terms_open_a_fresh_sign_in_fresh_until_its_id_tokens_exp

  • The validator’s iat (VerifiedUpstreamIdToken::issued_at) is the one the lane’s verifier read.

  • Under the default limits, a fresh sign-in’s session ends at its auth_time plus 43200 s and is fresh until its iat plus 900 s, which is the id_token’s own exp.

session_refresh_check_finds_a_newer_id_token_then_its_replay_then_the_original_stale

  • The SNAP worker’s stored anchor is bound to the lane’s profile: the validator’s issuer is the profile’s, as written.

  • The id_token a refresh re-issued in a later second is Newer.

  • Once the stored anchor records it, the same id_token again is a Replay, and the sign-in’s id_token is NotNewer.

session_stored_anchor_projects_userinfo_as_the_id_token_did

The reader’s userinfo, fetched bound to the stored sub and projected through the stored anchor, equals the id_token’s projection: the issuer, subject, auth_time, roles, programs and username.

session_userinfo_refused_for_an_expired_account_revokes

The unscoped person’s userinfo answered while the account was live. Once the account expired, it was Refused with 401, which the renewal table classifies as Revoke(UpstreamRefused).

The facts earlier amendments did not record:

  • A session opened from a Kanidm id_token is fresh exactly as long as that id_token lives. F4 keeps a session fresh for 900 s after its validation instant, the presented id_token’s iat, and the id_token lives 900 s (Amendment 3).

  • A refreshed id_token is newer only from a later second. iat is whole seconds, so F5’s newness rule accepts a refresh in a later second than the last recorded id_token and refuses one in the same second as NotNewer, which leaves the session as it was. The test waits for the next second.

  • Kanidm’s userinfo carries roles, primary_programs and preferred_username as the id_token does. The kanidm profile renews by a re-issued id_token, so it never reads them there; a profile renewing through userinfo with the same pointers would grant what the open did.

  • An expired account’s userinfo answers 401, so under a profile renewing through userinfo, the expiry revokes the session at its next renewal as the upstream’s own verdict.

Proved only in-process. The grant itself needs canopy-security and a database, so plan I2c’s U4 to U7 prove it with mock_issuer as the upstream and an ephemeral schema as the store: the token-exchange grammar and caps; canopy-web’s private_key_jwt; link-or-mint and the subject’s suspension; the session store, its versions and its issuance-log rows; grace for an unavailable upstream or not_processed, and grace_exhausted; a superseded renewal; a changed issuer or client revoking; auth_time_too_old; the 13 s deadline; and revocation by the opener. A live Kanidm cannot produce most of these: an unavailable upstream needs fault injection, and under the default limits auth_time_too_old needs a sign-in more than 11.75 hours old.

Run record. On 2026-10-05, cargo xtask identity conformance --idp kanidm exercised Kanidm v1.11.2 (commit 547933867e87da737e79d26942dc9261adaa5ee9). All twenty-six tests passed on each of two consecutive full runs.

What this changes for canopy: the session rules canopy-auth holds for the grant agree with the lane’s real tokens. The grant has no caller until plan I3 signs workers in through it.

Amendment 5 (2026-10-13, #2902) — the keycloak profile, verified

Status unchanged (still Accepted). §1 promised Keycloak a profile and a conformance suite, and §2 ships no vendor profile without a passing one. Plan I4 built both (ADR-049 Amendment 26, AL1, AL5, AL9). The suite runs the cases every upstream shares (crates/canopy-test-lib/tests/idp_conformance/cases.rs, with the max_age case of max_age.rs) and Keycloak’s own (idp_conformance_keycloak.rs), against Keycloak 26.8.1 provisioned with canopy’s realm (devstack/keycloak/realm.json).

The image. devstack/keycloak/Dockerfile installs the release tarball, its SHA-256 pinned, on alpine:3.23 with OpenJDK 21. It runs as uid 10001, with a health check on the HTTP management port. Keycloak passed its suite on it, so no Alpine exception is needed.

Verified facts:

  • Discovery names the realm’s issuer, an end-session endpoint and client_secret_basic. The JWKS holds one signing key, ES256 on P-256.

  • The id_token names the client as exactly its aud and its azp, and lives 300 s. A refresh re-issues it with the sign-in’s auth_time and no nonce, which canopy accepts (absent or identical).

  • Projection. The canopy client scope’s mappers put roles and primary_programs in the id_token, so the preset’s pointers read them. canopy-identity’s validator refuses Keycloak’s access token presented as an id_token, for its audience.

  • MFA is the server’s (ADR-049 Amendment 26, AL4). The realm’s browser flow requires the OTP form of every user, and CONFIGURE_TOTP is disabled. An account with a password and no OTP credential is refused ("credential setup required") in the browser and by a password grant.

  • Freshness. prompt=login and a stale max_age each show Keycloak’s login form again, and the new id_token’s auth_time is current. An SSO session answers a plain request with no form and the same auth_time.

  • Expiry. Keycloak has no account expiry. A disabled account’s refresh is refused invalid_grant, and its userinfo answers 401.

  • Sign-out. canopy-web’s RP-initiated logout returns to canopy-web’s /login and ends the SSO session and its refresh.

  • One session per browser sign-in. Every canopy-web token of one browser sign-in shares one Keycloak session. Revoking one refresh token, such as a native session’s from its step-up, therefore refuses the others.

Run record. On 2026-10-13, cargo xtask identity conformance --idp keycloak exercised Keycloak 26.8.1 from a fresh graph. All twenty-six tests passed on two consecutive full runs, each from a fresh graph. The identity-plane Playwright project passed against the devstack’s Keycloak: sign-in through Keycloak’s pages at both of canopy-web’s origins, the freshness cases above through the stand-in relying party, the no-OTP account refused, and sign-out back to /login.

What this changes for canopy: keycloak is a supported upstream profile.

Amendment 6 (2026-10-13, #2902) — the zitadel profile, verified

Status unchanged (still Accepted). §1 promised ZITADEL a profile and a conformance suite as well. Plan I4 built both (ADR-049 Amendment 26, AL1–AL4, AL9), against ZITADEL v4.19.4 with Login V2, provisioned through its v2 APIs with canopy’s project, roles, application, users and grants. The suite runs the shared cases and ZITADEL’s own (idp_conformance_zitadel.rs). The max_age case is the exception (below).

The images. The core runs on alpine:3.23, from each architecture’s release tarball with its SHA-256 pinned. Login V2 runs on node:24-alpine, from its release tarball. In front of both, the pinned nginx-unprivileged image routes /ui/v2/login to Login V2 and the rest to the core. All passed the suite, so no Alpine exception is needed.

Verified facts:

  • Discovery names the instance’s origin as the issuer, an end-session endpoint and client_secret_basic. The signing keys are RSA, RS256, each one that verifies an id_token at least 2048 bits.

  • The id_token names exactly the client and its project as aud, and the client as azp (AL2). Its roles claim keys every role by the organisation that granted it (AL3). A role another organisation granted, through a project grant, counts for nothing in canopy’s projection. A refresh re-issues it with the sign-in’s nonce and auth_time.

  • canopy-identity’s validator refuses ZITADEL’s access token presented as an id_token.

  • MFA is Login V2’s (AL4). ZITADEL’s server leaves factor sufficiency to its login client. With the login policy forcing MFA, an account with a password and no second factor is sent to set one up and never reaches the relying party. The browser spec shows this. The harness’s Session API driver acts as a login client, so it is never evidence of ZITADEL’s enforcement. The login client’s credential is a credential of the IdP.

  • Freshness. prompt=login shows Login V2’s sign-in again, with a current auth_time, and an SSO session answers a plain request with no sign-in. max_age is ignored by Login V2 and by the core (zitadel/zitadel#12258, open). A request whose max_age the session has outlived is answered from the session with its earlier auth_time. canopy-web’s relying party refuses that auth_time and retries once with prompt=login, so freshness holds at canopy’s boundary at the cost of one redirect. The maintainer accepted this on 2026-10-13. #2906 tracks the upstream fix, and the suite (a_stale_max_age_is_answered_from_the_session_and_canopy_refuses_its_auth_time) and the browser spec pin the behaviour, so a fix fails them.

  • Expiry. A deactivated account’s refresh, and a revoked refresh token, are refused invalid_request. canopy ends a session on any 4xx refusal.

  • TOTP. ZITADEL refuses a code already used (TOTP-Auw0a), without counting it toward lockout, and creating a person with a seed spends that step’s code.

  • Sign-out. canopy-web’s RP-initiated logout returns to canopy-web’s /login and ends the Session API session. ZITADEL’s refresh tokens survive it. canopy-web therefore revokes the session’s refresh token at sign-out, beside the end session (#2905, 2026-10-13), and the engine’s battery test asserts ZITADEL then refuses it.

Run record. On 2026-10-13, cargo xtask identity conformance --idp zitadel exercised ZITADEL v4.19.4 from a fresh graph. All twenty-four tests passed. A run takes about five minutes: the driver waits out spent TOTP steps, and the max_age case waits out the relying party’s 60 s leeway. The identity-plane Playwright project passed against the devstack’s ZITADEL: sign-in through Login V2 at both of canopy-web’s origins, the freshness cases above, the no-second-factor account sent to set one up, and sign-out back to /login.

What this changes for canopy: zitadel is a supported upstream profile, with its max_age gap (#2906) on record, and its surviving refresh tokens revoked at every sign-out (#2905). On ZITADEL, canopy-web’s auth_time check is what enforces a step-up’s freshness, so that check must not be relaxed while #2906 is open.

Amendment 7 (2026-12-02, #3625) — the three upstreams at their latest releases, verified again

Status unchanged (still Accepted). §2 supports an upstream at the release its conformance suite passed on. The dependency refresh (plan, unit I1) moves the three images: Kanidm 1.11.2 to 1.12.2, Keycloak 26.8.1 to 26.8.2, and ZITADEL v4.19.4 to v4.21.0, core and Login V2. Each carries upstream security fixes: Kanidm 1.12.1 a denial of service open to an unauthenticated caller, Keycloak 26.8.2 its release's list of CVEs, and ZITADEL 4.20.3 and 4.20.8 checks they tighten.

Run record. On 2026-12-02, on a developer machine, each from a fresh graph:

  • cargo xtask identity conformance --idp kanidm exercised Kanidm 1.12.2 (commit dc87d9a14a3ebbf041240b9d908b877d789bd59e; release tarball SHA-256 4ed023d39ddf304cd24d829cd6c5b90689d8e50428a043c8033fc75e813a5b47), built from that tarball on Rust 1.100.1: all thirty tests passed.

  • cargo xtask identity conformance --idp keycloak exercised Keycloak 26.8.2: all twenty-seven tests passed.

  • cargo xtask identity conformance --idp zitadel exercised ZITADEL v4.21.0: all twenty-five tests passed.

No test changed. The facts Amendments 1 to 6 record therefore hold on these releases. One of them is a gap: ZITADEL v4.21.0 still ignores max_age (zitadel/zitadel#12258, open on 2026-12-02), since the test that pins the gap passed; #2906 stays open.

What this changes for canopy: the supported set is Kanidm 1.12.2, Keycloak 26.8.2 and ZITADEL v4.21.0.

Edit this page · default