Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Zitadel Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-zitadel-knowledge-patch)
---
name: zitadel-knowledge-patch
description: Zitadel
version: "4.20.7"
license: MIT
metadata:
author: Nevaberry
---
# Zitadel knowledge patch
Load this skill when upgrading Zitadel, migrating APIs or Actions, implementing a
custom Login UI, configuring identity providers, or operating a self-hosted instance.
Use the topic references for complete request shapes, configuration, examples, and
the release context of behavior changes.
## Reference index
| Reference | Topics |
| --- | --- |
| [Actions](references/actions.md) | V1 migration, V2 targets and executions, payload signing, hooks and metadata |
| [APIs and protocols](references/api-and-protocols.md) | Resource APIs, deprecations, SCIM preview, OAuth/OIDC, SAML, web keys |
| [Application examples](references/application-examples.md) | Tenant sign-in, project grants, branding, application frameworks, guest identities |
| [Concepts and migrations](references/concepts-and-migrations.md) | Password imports, consistency, rolling updates, audit access, delegation |
| [Integrations and identity providers](references/integrations-and-idps.md) | Service credentials, System API, provider templates, external applications |
| [Login and management](references/login-and-management.md) | Login deployment, sessions, protocol completion, MFA, notifications, policies |
| [Release changes by topic](references/release-changes-by-topic.md) | Console and Login fixes, authorization, localization, metrics and tracing |
| [SDKs and clients](references/sdk-and-clients.md) | Go, management clients, Auth.js, generated gRPC clients, Terraform |
| [Self-hosting and operations](references/self-hosting-and-operations.md) | Setup, Compose, Helm, PostgreSQL, proxies, mirroring, caches, quotas |
## Upgrade and deprecation checks
Use v4.19.2 or later for 4.x deployments and skip v4.18.0, which fails during setup.
v4.19.1 batches the unique-constraint owner backfill in setup step 79;
v4.19.4 skips that backfill once finalized.
CockroachDB support is removed in v3.0.0. Migrate to PostgreSQL with `mirror`
before upgrading. The operations reference preserves the affected releases and
technical advisory 10016 for decimal event positions and mirror fixes.
Use v2 where it provides the required resource and retain v1 for capabilities
that have yet to migrate. Review the deprecated V1 calls and v2beta services in
the API reference. New v2 endpoints use gRPC with ConnectRPC and ship without
OpenAPI 2.0 definitions; existing APIs retain their interfaces.
Actions V1 is scheduled for API removal in v5. Move embedded JavaScript to an
HTTP endpoint and translate registration and login hooks to V2 request or response
executions. V1 and V2 can both run for the same operation: disable the corresponding
V1 hook when its V2 execution takes over to avoid duplicate side effects.
The Actions runtime blocks filesystem access through `require` in v4.16.1 and
v3.4.13. Remove dependencies on loading local files through `require` before upgrading.
v4.19.5 enforces default and maximum query limits on v1 and v2 list endpoints.
Paginate clients that need more results than one request can return.
## Login secrets and upgrade interruptions
Starting in v4.19.2, set `ZITADEL_SESSION_COOKIE_SECRET` on every Login V2 replica
to the same secret of at least 32 characters. Shorter values leave Login unready.
For Docker Compose, use `LOGIN_SESSION_COOKIE_SECRET`. A comma-separated list
of secrets permits rotation without signing users out.
Generate the secret once and distribute the resulting value to every replica:
```sh
export ZITADEL_SESSION_COOKIE_SECRET="$(openssl rand -base64 32)"
```
If unset, Login derives the signing key from its API credential and logs a startup
deprecation warning. Rotating that credential then signs users out of the Login UI.
The upgrade discards old unsigned cookies, requiring Login UI sign-in again,
potentially more than once during a rolling deployment.
v4.19.5 extends signing to email and invite verification, passkey registration,
and identity-provider linking. Replace example secrets with a random secret and
expect users to repeat steps in progress. v4.20.0 also signs the device-code check;
users in the middle of device authorization must enter the user code again.
Starting in v4.20.3, external provider sign-in must finish in the browser that
started it; sign-ins in progress at the upgrade must restart.
For custom Login V2 builds, update imports for modules moved to `src/lib/server/`
and `src/lib/actions/`, and list Server Actions in `checks/server-actions.allowlist.json`.
## Permissions and authentication policy changes
In v4.20.3, completing or failing OIDC or SAML through `CreateCallback` or
`CreateResponse` requires `session.link` regardless of request headers.
Calls without it return `PERMISSION_DENIED`; grant `IAM_LOGIN_CLIENT` before
upgrading if the custom Login service user lacks that permission.
Session API password checks follow the user's organization login policy in
v4.20.3. When that policy disables username/password sign-in, route the user to
their identity provider; password-based password changes are also blocked.
The Login reference preserves the precise `FAILED_PRECONDITION` error identifiers.
Custom Login UIs need `session.read` for `GetDeviceAuthorizationRequest` starting
in v4.19.5. Device sign-in requires a grant when the project requires one, and
users confirm the device on a consent screen.
OIDC administrator impersonation requires `admin.impersonation` starting in
v4.19.2. Automatic account linking requires the external provider to report a
verified email starting in v4.15.3.
In v4.20.3, `/oauth/v2/token` returns `invalid_grant` for a Login V1 code if the user
is unauthenticated or differs from the user authenticated at issuance. Users with
codes outstanding at the upgrade must sign in again.
## Reverse proxies and outbound connections
Send a single plain host with an optional port in `x-zitadel-public-host`, for
example `x-zitadel-public-host: login.example.com:8443`. In v4.20.3, an invalid value
returns HTTP 400 with `invalid public host` (`HTTP-Rk7pX`). Notification links fall
back to the instance's primary domain when the triggering host is invalid,
including notifications queued before the upgrade.
v4.20.0 rejects outbound TLS chains through compromised eMudhra intermediates.
Replace affected certificates on SMTP servers, external identity providers,
Action and webhook targets, or HTTP SMS providers; this check is mandatory.
v4.20.0 rejects URLs with invalid colons in the host and offers post-quantum hybrid
TLS key exchanges by default. If a configured URL or outbound connection breaks,
use `GODEBUG=urlstrictcolons=0` for the URL change or `GODEBUG=tlssecpmlkem=0`
for the TLS key-exchange change.
## Resource APIs and token handling
Legacy Management calls select the organization with `x-zitadel-orgid` and
default to the caller's organization. For v2 requests that take organization
context, send it in the request body, such as `{"organization_id":"1234567890"}`.
Use `UserService.CreateUser` for human users and service accounts, selecting the
type in the payload. New users are active immediately; use invitation codes for
human authentication-method setup. `ListProjects` covers owned and granted projects.
Access tokens are opaque by default; validate them by introspection.
For opaque and JWT access tokens, `active: true` requires a live token and audience
membership for the introspecting client. Use
`urn:zitadel:iam:org:project:id:zitadel:aud` for the core APIs.
Keep the replacement refresh token returned by each successful refresh.
SCIM remains documented as a preview at `/scim/v2/<org-id>`. Its query and bulk
limits, supported filters, mappings, and provisioning domains are in the API reference.
Token exchange and OIDC back-channel logout are generally available since v4.11.0.
## Actions V2 quick reference
Create targets with `POST /v2/actions/targets` and configure executions with
`PUT /v2/actions/executions`. Request and response matching selects the most
specific condition: full gRPC `method`, then `service`, then `all`.
Put all required targets in the winning execution's ordered `targets` array.
`restWebhook` checks status and discards the body; `restCall` also consumes the body.
Async targets can run in parallel and discard both status and body.
For synchronous targets, `interruptOnError: true` stops subsequent targets on failure.
For request or response mutation, return the modified message itself at the top level
using protobuf JSON encoding.
Use `preaccesstoken` and `preuserinfo` for token and OIDC UserInfo changes,
`presamlresponse` for SAML attributes, and `user.human.added` for post-creation work.
The SAML result uses singular `append_attribute`; metadata values in
`set_user_metadata` are base64-encoded bytes.
For JSON payloads, verify `ZITADEL-Signature` over the timestamp and original body
bytes and check freshness. For JWT, verify against the instance's web keys.
For JWE, decrypt with the target's private key, then verify the inner JWT.
## Custom Login and MFA
Register the HTTPS Login hostname as an instance Trusted Domain. Set
`x-zitadel-public-host` to the Login hostname and `x-zitadel-instance-host` to the
backend hostname. Configure `ZITADEL_API_URL` without a trailing slash and use an
`IAM_LOGIN_CLIENT` service account's PAT in `ZITADEL_SERVICE_USER_TOKEN`.
Check credentials in stages with the Session API and keep the latest `sessionToken`
after every update. Read `factors.*.verifiedAt` and `expirationDate` to enforce the
required factors and freshness. A session with no configured lifetime does not expire.
Session tokens cannot be introspected at the OAuth endpoint; complete OIDC and redeem
the authorization code to obtain an OAuth access token.
Register `/idps/callback` for Login V2 upstream providers. Identity-provider intent
tokens are single-use and expire; start a new intent after expiration or consumption.
The Login reference contains the exact OIDC, SAML, device, and enrollment requests.
Browser flows should use configured OTP delivery channels: Login rejects browser
requests to receive OTP values through `returnCode` starting in v4.17.1.
A successfully verified TOTP cannot be reused starting in v4.17.2.
Recovery codes are active as soon as added in v4.13.1.
Login V2 requires a confirmation click to add email or SMS OTP in v4.20.3.
Starting in v4.20.5, users must pass their configured second-factor check before
adding an authenticator. Configure the authentication domain before passkey enrollment,
because credentials bind to that domain.
## Operations and client selection
Supply a database `masterkey` of exactly 32 bytes, keep it outside the database,
and make the same key available when restoring a backup.
For an initialized database, run `zitadel start-from-setup`, or run `zitadel setup`
once per new version before rolling out replicas with `zitadel start`.
Keep the old version serving while the new version applies schema changes and
switch traffic after readiness. List and search results can lag writes;
`projections.current_sequences` and `projections.failed_events` support diagnostics.
Reserve Redis indexes for Zitadel: it issues `FLUSHDB` on its cache databases.
Select cache connectors separately for each object; each object defaults to disabled.
Use the operations reference for mirror preparation, scopes, verification, and reruns.
The Go SDK maintains only v3 after breaking security updates. Match a management
client's major version to the server's major version; the SDK reference preserves
the documented package versions, runtime requirements, and request models.