Skip to content
Back to skills

Zitadel Knowledge Patch

ASecurity

Zitadel

  • 25 stars
  • 0 votes
  • 1 copy
  • 6 views
  • Added September 5, 2026
developmentjavascriptgojavasqldockerterraformapidatabasesecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill zitadel-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Zitadel Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Zitadel Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-zitadel-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-zitadel-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: zitadel-knowledge-patch
description: Zitadel
version: "4.20.7"
license: MIT
metadata:
  author: Nevaberry
---


# Zitadel knowledge patch

Load this skill for Zitadel upgrades, API integrations, custom Login UIs,
Actions, identity providers, SDK clients, and self-hosted operations.
Use the topic references for complete request shapes, configuration examples,
provider-specific instructions, and version-specific behavior.

## Reference index

| Reference | Topics |
| --- | --- |
| [Actions](references/actions.md) | V1 migration, V2 targets and executions, payload verification, hooks and context |
| [API and protocols](references/api-and-protocols.md) | Resource migration, permissions, OAuth/OIDC, SAML, SCIM, errors and limits |
| [Application examples](references/application-examples.md) | Tenant discovery, project grants, branding, framework integrations, guest accounts |
| [Concepts and migrations](references/concepts-and-migrations.md) | Password imports, master key, rolling updates, projections, delegated access |
| [Service integration and identity providers](references/integrations-and-idps.md) | Service credentials, System API, audit integration, LDAP, provider templates, external services |
| [Login and management](references/login-and-management.md) | Login configuration, session cookies, custom flows, MFA, account linking, notifications, web keys |
| [Release changes by topic](references/release-changes-by-topic.md) | Console behavior, feature configuration, localization, branding and presentation |
| [SDK examples and clients](references/sdk-and-clients.md) | Go SDK, management clients, Auth.js, OIDC library, generated clients, Terraform |
| [Self-hosting and operations](references/self-hosting-and-operations.md) | Setup, Compose, Helm, PostgreSQL, proxies, mirroring, caches, telemetry and quotas |

## Breaking changes and upgrade requirements

### Database and setup

Use v4.19.2 or later for 4.x deployments and skip v4.18.0, which fails during
setup. v4.19.0 fixes that failure; v4.19.1 batches the unique-constraint owner
backfill in setup step 79. v4.19.4 skips the backfill once finalized.

CockroachDB support is removed in v3.0.0. Migrate to PostgreSQL with `mirror`
before upgrading. Follow technical advisory 10016 for the decimal-event-position
upgrades identified in [operations](references/self-hosting-and-operations.md).

### Login cookies and enrollment proofs

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.
Generate the secret once and distribute it to every replica. For Docker Compose,
set `LOGIN_SESSION_COOKIE_SECRET`; use a comma-separated list of secrets to rotate
without signing users out.

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 unsigned cookies, requiring sign-in again, potentially more
than once during a rolling deployment.

v4.19.5 also signs email and invite verification, passkey registration, and
identity-provider linking. Replace example secrets with random values; expect users
to repeat affected steps in progress. v4.20.0 signs device-code checks, so users in the
middle of device authorization during that upgrade must enter the user code again.

### Custom Login permissions and password policy

In v4.20.3, `CreateCallback` and `CreateResponse` require `session.link` to complete
or fail OIDC or SAML requests, 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 users to their
identity provider; password-based password changes are also blocked. See
[Login and management](references/login-and-management.md) for the exact errors.

Since v4.19.5, device sign-in requires a grant when the project requires one,
users confirm the device on a consent screen, and custom Login callers need
`session.read` for `GetDeviceAuthorizationRequest`.

### Host headers and outbound TLS

In v4.20.3, send one plain public host with an optional port, for example
`x-zitadel-public-host: login.example.com:8443`. Invalid values return HTTP 400
with `invalid public host` (`HTTP-Rk7pX`). Notification links fall back to the
instance's primary domain if the triggering host is invalid, including queued
notifications from before the upgrade.

The Go 1.26.10 build in 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.
If an existing configured URL or outbound connection breaks after upgrading, set
`GODEBUG=urlstrictcolons=0` for the separate URL-colon validation change or
`GODEBUG=tlssecpmlkem=0` for the TLS key-exchange change.

### API and Actions migrations

Use v2 where it provides the required resource and retain v1 for capabilities
that have yet to migrate. New v2 endpoints use gRPC with ConnectRPC and ship
without OpenAPI 2.0 definitions; existing APIs retain their interfaces.
The [API reference](references/api-and-protocols.md) lists deprecated methods and
the service-specific beta-to-v2 transitions. v4.19.5 enforces default and maximum
list-query limits on v1 and v2 endpoints; paginate when one request is insufficient.

Actions V1 runs embedded JavaScript and is scheduled for API removal in v5.
Move code 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.
In v4.16.1 and v3.4.13, the Actions runtime blocks filesystem access through
`require`; remove dependencies on loading local files through `require` before upgrading.

For v4.20.3 custom Login builds, update imports for modules moved to
`src/lib/server/` and `src/lib/actions/`, and list Server Actions in
`checks/server-actions.allowlist.json` to pass the build check.

## Common implementation workflows

### Actions V2

Create targets with `POST /v2/actions/targets` and configure executions with
`PUT /v2/actions/executions`. Request and response matching chooses full RPC
method, then service, then `all`; put every required target in the winning
execution's ordered `targets` array.

`restWebhook` checks status and discards the body; `restCall` also consumes the
body. Async targets discard both and can run in parallel. For synchronous
targets, `interruptOnError: true` stops subsequent targets on failure.
With a `restCall` target, return the modified message itself for request or response mutation.

Use `preaccesstoken` and `preuserinfo` for OIDC changes, `presamlresponse` for
SAML attributes, and `user.human.added` for post-creation tasks. Verify JSON
payload signatures against original body bytes and check timestamp freshness.
See [Actions](references/actions.md) for JWT/JWE verification and result schemas.

### Custom Login and authentication factors

Use `SessionService.CreateSession` and updates to check credentials in stages.
Keep the latest opaque `sessionToken` after each update. Inspect
`factors.*.verifiedAt` and `expirationDate` to enforce required factors and
freshness. Sessions without a configured lifetime do not expire; expired sessions
cannot be updated. Session tokens cannot be introspected at the OAuth endpoint.

Read protocol requests with `OIDCService.GetAuthRequest` or
`SAMLService.GetSAMLRequest`; complete them with the latest session token and an
`IAM_LOGIN_CLIENT` credential. Register `/idps/callback` for Login V2 upstream
provider callbacks. Configure the authentication domain before passkey enrollment.

Browser OTP flows should use the configured delivery channel: Login rejects
browser requests for OTP values through `returnCode` starting in v4.17.1.
Automatic account linking requires the provider to report the email as verified
starting in v4.15.3. Starting in v4.20.3, Login V2 external provider sign-in must
finish in the browser that started it, and sign-ins in progress at upgrade must restart.
Adding email or SMS OTP as a second factor in Login V2 requires a confirmation click
in v4.20.3; v4.20.5 requires the configured second-factor check before adding an authenticator.

### OAuth tokens, claims, and service access

Access tokens are opaque by default. For introspection, `active: true` requires
a live token and audience membership for the introspecting client. Request
`urn:zitadel:iam:org:project:id:zitadel:aud` for core APIs, or
`urn:zitadel:iam:org:project:id:<project-id>:aud` for a project audience.

Store the replacement refresh token after each successful refresh. Omit `scope`
to reuse the original authorization scopes or supply a subset. Cache JWKS by
`kid`, refresh regularly, and allow a refresh for an unfamiliar key ID.
The [protocol reference](references/api-and-protocols.md) includes assertion
fields, role scopes, logout requirements, and token-exchange behavior.

### Provisioning and tenant administration

`UserService.CreateUser` creates humans and service accounts, selected in the
payload; new users are immediately active. Use invitations for human onboarding.
For v2 requests that take organization context, put it in the request body.
Legacy Management calls use `x-zitadel-orgid` and default to the caller's organization.

SCIM preview uses `/scim/v2/<org-id>`. Search defaults to at most 100 results and
caps `count` at 100; bulk requests allow 100 operations and 1,000,000 bytes.
Set `urn:zitadel:scim:provisioningDomain` on provisioning service accounts to
isolate `externalId` values. See the [API reference](references/api-and-protocols.md)
for routes, filters, attribute mappings, and verification defaults.

Enable domain discovery and verify each tenant's organization domain to select
its login policy by the domain in the sign-in name. Use project grants to delegate
a subset of project roles; **Only authorized users can authenticate** requires
a project role assignment at sign-in. Provider and framework details are in
[application examples](references/application-examples.md) and
[integrations](references/integrations-and-idps.md).

### SDKs and self-hosted operations

The Go SDK maintains only v3 after breaking security updates. Match a management
client's major version to the server's major version; see
[SDK examples](references/sdk-and-clients.md) for packages and request models.

Supply a database `masterkey` of exactly 32 bytes, keep it outside the database,
and retain the same key for backup restoration. Run `zitadel setup` once with
each new version before rolling out replicas on `zitadel start`.
Route traffic to the new version after readiness passes.

Route `/ui/v2/login` to Login and other paths to the API; use h2c to the API when
the proxy terminates TLS. Reserve Redis indexes for Zitadel because cache databases
receive `FLUSHDB`. List and search reads can lag writes; use projection diagnostics
in [concepts](references/concepts-and-migrations.md) and deployment details in
[operations](references/self-hosting-and-operations.md).

Files in this skill

  • SKILL.md11.6 KB
  • coverage.json2.8 KB
  • references/actions.md6.9 KB
  • references/api-and-protocols.md6.5 KB
  • references/application-examples.md1.8 KB
  • references/concepts-and-migrations.md3.4 KB
  • references/integrations-and-idps.md8.9 KB
  • references/login-and-management.md13.1 KB
  • references/release-changes-by-topic.md31.5 KB
  • references/sdk-and-clients.md3.8 KB
  • references/self-hosting-and-operations.md10.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.