Why Zitadel OIDC signing keys decide the v3 to v4 upgrade plan
The OIDC signing key change is the main behavioral risk in a self-hosted Zitadel upgrade from v3 to v4, and it deserves more planning attention than the binary swap itself. Zitadel's upgrade guidance tells operators to follow technical advisory A-10017 and to soak the upgraded system until JWTs and sessions signed with the legacy keys have expired. If your applications, APIs and gateways validate tokens that Zitadel issues, a token that verifies today may stop verifying, or verify against the wrong key, once the signing material changes. The setup and runtime steps are largely mechanical by comparison, and they can succeed while token validation fails in production.
The supported path treats the key change as a staged transition rather than a single cutover. Your team should read the Zitadel v3 to v4 upgrade guide and the technical advisories page together, then confirm exactly which A-10017 actions apply to your installation, including how web keys are created and activated and how the legacy signing key is retired. Ask your Zitadel contact or confirm in your own environment which key identifiers appear in issued tokens, because relying parties that cache or pin keys by identifier are the ones most likely to break. Plan the soak window from the token and session lifetimes configured in your instance, not from a generic assumption.
The decision you must make early is who owns the key transition across your estate. Identify every relying party, gateway and service that verifies Zitadel tokens, record how each one fetches and caches the JSON Web Key Set, and decide which ones can refresh keys automatically and which need a change window. Those inventory results determine whether the upgrade is a platform task or a coordinated release across application teams, and they should be settled before a staging environment is built. Confirm the scope in writing so that the cutover, rollback and verification steps all refer to the same set of consumers.
What changes in the signing keys and what each change affects
This table compares four changes the v3 to v4 guidance makes relevant to OIDC signing, showing the impact on applications, the action the operator takes and the team member who owns it. Read each row as a checkpoint to clear before cutover, and confirm the specific steps in technical advisory A-10017 itself.
| Change | Impact on applications | Operator action | Owner |
|---|---|---|---|
| Signing key change in the v4 upgrade | Tokens may be signed with a new key, so relying parties must fetch current keys from the JWKS endpoint before they validate new tokens | Read the v3 to v4 upgrade guide and advisory A-10017 before scheduling cutover, then confirm the key handling steps in the advisory | Platform engineering lead |
| Continued validity of legacy-signed JWTs | Tokens signed before the change remain in circulation until they expire, so validators must still accept them during the soak period | Keep the old and new keys available during the soak, and do not remove legacy verification until tokens have expired | Identity platform owner |
| Continued validity of legacy-signed sessions | Sessions created before the upgrade may keep working after cutover, which can hide problems until users sign in again | Plan the soak window around session lifetimes, and test a fresh login alongside an existing session on each application | Identity platform owner with application leads |
| Technical advisory A-10017 | Sets the operational steps for the key change, including staging web keys, so skipping it can leave applications validating against the wrong key | Follow the advisory in order, record which steps were completed, and confirm details against the advisory text in Zitadel's technical advisory listing | Security engineering lead |
| Relying parties that pin keys | Applications or gateways with a hard-coded public key or a cached key set fail to validate new tokens after the change | Inventory every pinned key before cutover, move these parties to JWKS-based retrieval where possible, and test each one in staging | Application owners, supported by platform engineering |
How tokens signed before and after the upgrade reach relying parties
The diagram starts with a client requesting a token from Zitadel during the soak period. Zitadel signs the token with either a legacy key or a web key, depending on the key in use at issuance. The relying party then validates the signature against the published key set, while a relying party that pins a fixed key follows a separate branch and fails once that key is no longer used. Check which keys your relying parties trust before the cutover, and confirm the soak window ends only after legacy-signed tokens have expired.
Simplified view of token signing and validation across the key change.
How relying parties pick up the new signing key
A relying party validates an OIDC token by checking its signature against a public key that the identity provider publishes, and it identifies the right key through the kid (key ID) header in the token. Most libraries and gateways find those keys in one of two ways. Some fetch the set from the issuer's published JSON Web Key Set (JWKS) endpoint, usually cache it for a period, and refetch when they meet a kid they do not recognize. Others have a key pasted into their configuration file or secret store and never look anywhere else. During a signing key change, the first group tends to adapt on its own, while the second group keeps trusting only the key it was given. Which group each relying party belongs to is the single most important fact to establish before the upgrade window opens.
The failure mode is predictable in both groups. A relying party with a pinned key will reject every token signed by the new key, and it will also reject any token that still carries the old kid once the old key is removed from the issuer's published set. A dynamic relying party can fail too, if its cache is long-lived, if it only refreshes on a schedule, or if it treats an unknown kid as a hard error instead of a reason to refetch. Some gateways and proxies also cache validation results or JWKS documents at their own layer, so the behavior you see can come from infrastructure in front of the application rather than from the application itself. The exact handling depends on each library, framework and gateway version, so no general rule in this section replaces a test.
Confirm each relying party's key handling in its own documentation, then prove it in a staging environment that mirrors the v4 setup. For every client, record whether it fetches keys dynamically, how long it caches them, what it does with an unknown kid, and whether it accepts both old and new signatures during the transition. Run a token issued before the change and a token issued after it against each one, and include any API gateway or reverse proxy in the path. The results decide how long the old key must stay published and which relying parties need configuration changes before cutover. The migration steps for the signing key itself are covered in the staging and expiry sections of this page.
How to sequence the web key cutover during the v3 to v4 upgrade
This sequence moves Zitadel's OIDC signing keys to web keys in a controlled order, so every relying party trusts the new keys before production changes and legacy-signed tokens are allowed to expire before the old material is removed.
Read advisory A-10017 and the upgrade guide
Start by reading technical advisory A-10017 and the v3 to v4 upgrade guide in the Zitadel documentation. The guide names OIDC signing keys as the main behavioral risk of this upgrade and tells operators to follow the advisory and soak until legacy-signed JWTs and sessions have expired. Your team lead for identity, with the platform owner, records the specific advisory steps that apply to your version and deployment. Done means a written checklist exists that the change board has signed off, with each advisory action mapped to an owner. Rollback point: none yet, since no system has changed.
Inventory relying parties and pinned keys
List every application, API gateway, and service that validates tokens issued by your Zitadel instance. For each one, record how it obtains signing keys (JWKS endpoint discovery or a hard-coded public key), whether it caches keys, and whether it checks the key identifier (kid) and algorithm. Ask each owning team to confirm in writing whether they pin keys or restrict algorithms. Done means every relying party has an owner, a key-retrieval method, and a test contact. Rollback point: none yet, since this step only reads configuration.
Stage web keys in a non-production instance
In a non-production Zitadel instance that matches production configuration as closely as you can manage, create and activate the web keys that the upgrade path requires, following the advisory. Confirm that the JWKS endpoint publishes the expected keys and that the issuer and discovery document look correct. Done means the staging JWKS output has been saved and compared against your inventory, with any mismatch resolved. Rollback point: delete the staging keys and restore the prior staging configuration, which has no effect on production.
Run the v4 upgrade in staging
Apply the v3 to v4 upgrade to the staging environment using your normal deployment method, following the upgrade guide in order. Record each completed setup step and any warnings about signing keys or sessions in the upgrade log. The platform owner confirms that the service starts cleanly and that the discovery and JWKS endpoints respond. Done means the staging upgrade completes with no unresolved key-related warnings. Rollback point: restore the staging database and binaries or chart version from the snapshot taken before the upgrade.
Verify token issuance and validation in staging
Have each relying party in your inventory obtain new tokens from staging and validate them against the staging JWKS. Include a token from every client type, such as web, mobile, machine, and API clients, plus a test that confirms the validator rejects a token with a tampered signature. Also test a relying party that pins keys, so you learn what breaks before production. Done means every relying party has a signed test result, and each failure has a fix or an accepted exception recorded by its owner. Rollback point: revert staging to the pre-upgrade snapshot and rerun this step after fixes.
Cut over production with a defined rollback
Schedule the production upgrade and key change using the same runbook that passed staging. Before starting, capture a database backup and the current configuration, and confirm that a named person can restore both. Run the upgrade, then repeat the token issuance and validation checks against production with a small set of test accounts. Done means production issues and validates new tokens for every relying party in your inventory. Rollback point: restore the pre-cutover backup and configuration, which returns the instance to v3 signing behavior before any user tokens depend on the new keys.
Soak until legacy-signed tokens expire
Keep the legacy signing material available and monitor authentication errors, token validation failures, and support tickets from relying parties while legacy-signed JWTs and sessions remain in circulation. Do not remove the old keys until the advisory's expiry guidance is satisfied for your session and token lifetimes. Record the date when the last legacy-signed token could have been issued, as calculated from your configured lifetimes. Done means monitoring shows no validation failures tied to the key change for the full window, and the owner signs off on the expiry date. Rollback point: re-enable the legacy material if a relying party fails, while the window is still open.
Retire legacy material and record the outcome
After the soak completes, remove the legacy signing material from the instance and from any relying party that held a pinned copy, then confirm that the JWKS output contains only the intended keys. Update the inventory, close the advisory actions, and file the upgrade evidence, including staging results, cutover logs, and the expiry sign-off. Done means the change record is closed with each relying party confirming the removal. Rollback point: after removal, the only recovery is restoring the pre-cutover backup, so confirm no relying party still needs the legacy key before this step.
What to prepare before staging web keys
Staging web keys is safe only when the team knows which relying parties depend on Zitadel signatures, can restore the instance if something breaks, and has proven that tokens still validate. The cards below cover the inventory, recovery material, staging, testing, sessions and communication that must be ready before the key change is rehearsed.
Relying party and key inventory
Produce a register of every application, API gateway, service and partner that validates Zitadel tokens, with the JWT signature algorithm it expects, how it fetches keys (the JWKS endpoint or a pinned copy), and the owner of each. Pinned keys are the item most likely to fail after a key change, so flag any integration that stores a key or thumbprint in code, configuration or a vendor console. Confirm the inventory against the technical advisory before rehearsing.
Technical advisoriesDatabase, masterkey and configuration backups
Take a restorable backup of the PostgreSQL database that holds Zitadel's keys and configuration, plus the masterkey and the full deployment configuration, stored separately from the running cluster. Test a restore into an isolated environment and record how long it took. Without a verified restore, a failed key change can turn into an identity outage, so the backup is the rollback path for the whole upgrade.
Staging that mirrors identity sources
Build a staging instance on the same Zitadel version path, with a copy of production data, the same external identity providers, the same domains and TLS setup, and representative test clients. Staging that uses only local test users will not show how federated logins, custom actions or organization-level settings behave with the new signing keys. Document every difference from production so the results can be read correctly.
Token issuance and validation test plan
Write test cases that request tokens for each client type, including web, native, API and machine clients, and check that each relying party accepts the new signature, rejects tampered tokens, and handles tokens signed with the legacy key. Include ID tokens, access tokens and introspection calls. Assign a named QA owner and record pass or fail results so the go or no-go decision rests on evidence.
Session and logout test
Verify that existing sessions survive the rollout, that refresh flows continue or fail in a predictable way, and that single logout reaches every application. Test long-lived sessions and refresh tokens, since these keep legacy-signed credentials in use for longer than a normal login. Record how long legacy tokens remained valid so the soak period before the old key is retired is based on measured behavior.
Application owner communication plan
Send each application owner the inventory entry for their system, the expected change, the staging test window and a named contact on the platform team. Ask owners to confirm how their service caches keys, to commit to a verification step, and to report failures through an agreed channel. Keep a dated log of notices and confirmations so the team can show that owners were warned before production changes.
How pinned keys and key fetching change the work for each relying party
Applications and libraries that load signing keys from the published JWKS endpoint usually pick up a new key without a code change, as long as they refresh the key set when they meet a token signed with an unknown key identifier. The risk during cutover is not the presence of a new key but a library that caches keys for a long period, ignores unknown identifiers, or only reads the key set at startup. Those consumers may reject valid new tokens or keep trusting keys that should be retired.
- Refresh behavior: Confirm whether the library re-fetches the key set on an unknown
kidor only on a timer, and what that timer is. - Startup reads: Check whether the service loads keys once at boot, which would need a restart after the switch.
- Staged test: Run a token issued after the new key is active against a staging copy of each application and confirm it is accepted.
- Legacy tokens: Confirm the application still accepts tokens signed with the legacy key until those tokens expire, if the soak plan depends on it.
- Owner request: Ask each application owner for the library name, version and documented key refresh behavior.
Confirm each library's behavior against its own documentation and test it, because the facts supplied here do not describe any particular product.
Services that have a public key or key material stored in their own configuration, a secret store or a container image do not learn about new keys from the JWKS endpoint. For these services the key change is a configuration change that must land before new tokens arrive, and it must be reversible. The main risk is a service that continues to verify against the old key after the new key is active, which rejects every new token and fails in ways that look like authentication outages.
- Inventory: List every service that stores a verification key, including those in deployment manifests and CI variables.
- Ordering: Plan the configuration update to be deployed before the cutover to new signing keys, with a rollback path.
- Dual trust: Confirm whether the service can trust both keys during the transition, if the product supports it.
- Rollback test: Restore the previous key in staging and confirm the service recovers without a rebuild.
- Owner request: Ask the team that owns each service to name where the key is stored and who approves the change.
As a rule, treat every hard-coded key as a change ticket, not as a background refresh, and confirm the service's support for multiple keys with its vendor or source code.
API gateways, reverse proxies and sidecars that verify tokens often cache the key set for performance. A cached set can serve the old key after the new key is published, and a gateway may accept or reject tokens based on a stale copy. Because one gateway can front many applications, a caching mismatch can affect a large share of traffic at once, so these components need their own test plan.
- Cache lifetime: Find the key cache duration and any setting that forces an early refresh.
- Multiple gateways: Check each replica, since instances may hold different cached sets during a rolling change.
- Validation rules: Confirm which claims the gateway checks, such as issuer, audience and expiry, and whether any are pinned to a specific key.
- Staged test: Publish the new key in staging, wait for the gateway's cache interval to pass, then send new and legacy tokens and record the results.
- Owner request: Ask the platform team for the gateway version, its key cache settings and a documented way to flush the cache.
Confirm cache behavior with the gateway's documentation, since this topic does not establish how any specific gateway handles keys.
Vendor products, partner systems and SaaS tools that trust your identity provider may fetch keys on their own schedule, pin a key or require a manual registration. You cannot test their internal behavior directly, and you may not control the change window. The practical risk is discovering a pinned key only after users cannot sign in, so this group needs the earliest outreach and a clear list of contacts.
- Dependency list: Identify each external consumer that relies on your Zitadel issuer, including integrations set up by business teams.
- Pinning check: Ask each vendor whether it stores the key, fetches the key set from the discovery document, or both.
- Sandbox test: Where the vendor offers a test environment, run a sign-in there after the staging change.
- Notice period: Agree on a date for the change with each vendor and record who is responsible for confirmation.
- Owner request: Ask each vendor to confirm in writing how it refreshes keys and to name a contact for the cutover window.
Do not assume a vendor's behavior from its marketing or documentation alone, and ask for written confirmation before the planned change date.
What makes the signing key cutover take longer
This table lists the factors that stretch the OIDC signing key cutover during a Zitadel v3 to v4 upgrade. Each row shows which way the factor pushes effort and the question to put to a partner or internal team before agreeing scope. Use it to find where your environment is heavier than a simple single-application setup.
| Driver | Effort direction | Question to ask in a quote |
|---|---|---|
| Number of relying parties | Each relying party needs its own check of how it fetches and validates keys, so more applications means more testing | How many OIDC and OAuth relying parties will be tested, and which ones are in scope? |
| Relying parties that pin keys | Pinned keys break when the signing key changes, so each pinned client needs a code or configuration change before cutover | Which clients hard-code a public key or thumbprint, and who owns each change? |
| Gateways or proxies that cache keys | Cached JWKS responses can serve the old key set after cutover, so cache lifetimes must be found and shortened or flushed | Which API gateways, reverse proxies or sidecars cache the JWKS document, and for how long? |
| Third-party systems the team cannot change | Systems outside your control may keep old keys, so the plan needs a fallback window or a vendor request | Which external SaaS or partner integrations validate Zitadel tokens, and do their vendors support key rotation? |
| Token and session lifetimes | Longer access, refresh and session lifetimes extend the soak period in which legacy-signed tokens stay valid | What are the configured token and session lifetimes, and how long must the old key remain trusted? |
| Custom Actions or customizations that touch tokens | Custom claims, Actions or token handling must be rechecked against the new signing behavior, adding test cases | Which Actions or custom code modify tokens or read signing material, and who reviews them? |
| Number of environments to test | Each environment (development, staging, production, and any regional or tenant-specific instance) repeats the key staging and verification steps | How many environments and Zitadel instances will be upgraded, and in what order? |
Questions teams ask before hiring help with Zitadel signing keys
How much does the Zitadel signing key change work cost?
No fixed figure can be given here because the cost depends on the written scope. DeployOpen does not publish a price list, and a quote follows from the scope agreed in writing before work starts. The main cost drivers are the number of Zitadel instances and environments, how many relying parties and applications validate tokens, whether those applications pin keys, how much logging and monitoring already exists, and how much of the soak period needs active follow-up. Most of the cost is one-time planning, staging and verification work. Ongoing support or retesting after the upgrade is a separate, recurring item. Ask the quote to split the one-time work from any retainer.
How long does the soak period last, and what sets it?
The soak period ends when legacy-signed tokens and sessions have expired, so its length is set by your own token and session lifetimes rather than by a fixed number. The v3 to v4 upgrade guide tells operators to follow technical advisory A-10017 and soak until legacy-signed JWTs and sessions have expired. Confirm the lifetimes configured for access tokens, ID tokens, refresh tokens and sessions in your instance, and confirm the current guidance in the Zitadel upgrade guide. Long refresh token lifetimes or long-lived sessions extend the wait. Relying parties that cache keys can also affect when new signatures are accepted everywhere.
What does the work need from our own team?
Expect to need access from several teams at once. Identity engineers need to own the Zitadel instance and its upgrade. Application owners need to confirm which services validate tokens, how they fetch signing keys and whether any of them pin a specific key. Platform or infrastructure staff need to provide staging environments that mirror production, and security or compliance staff need to agree on the evidence they expect. A named owner for each relying party matters more than any single technical skill, because the most common delays come from unknown validators. Ask the partner to produce an inventory of relying parties as an early deliverable.
Can our internal team handle the key change without a partner?
Yes, a capable internal team can do this, provided it has time, the right access and a clear inventory of token consumers. The work is mostly methodical: staging web keys, confirming that each relying party accepts both signing keys, watching logs for validation failures, waiting for legacy-signed tokens to expire and then retiring the old key. The risk is usually not the Zitadel step itself but missed consumers, such as a batch job or a partner integration that pins a key. Consider a partner when the team lacks staging capacity, when many relying parties are owned by different groups, or when the upgrade falls inside a compliance-driven timeline.
What does a rollback look like if validation fails?
A rollback depends on whether the new key has been promoted and whether the old key is still available to validate tokens. The safe approach keeps the legacy-signed key in place during the soak, so applications can continue validating existing tokens while new tokens are verified. If a relying party fails after promotion, the team needs a documented procedure to restore the previous signing configuration and a record of the affected applications. Confirm the exact rollback steps for your Zitadel version against the technical advisory and the upgrade guide before the change, and rehearse them in staging. Whether a rollback is clean also depends on how database backups are taken before the upgrade.
Does DeployOpen issue audit reports for the key change?
No. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. For this work, that can include a documented inventory of relying parties, the staging and verification records, change records for the key promotion, and the evidence of the soak period. Independent auditors and certification bodies decide whether your controls meet a given framework. Ask your auditor early which records they will want to see, so the evidence is collected during the work rather than reconstructed afterward.
What should a fixed-scope quote for this work include?
A fixed-scope quote should state the work in writing before it starts. Ask for the list of Zitadel instances and environments in scope, the relying parties covered and who confirms each one, the staging and verification steps, the soak monitoring period and who watches it, the rollback procedure and its rehearsal, the evidence deliverables, and the retest or post-upgrade support, if any. Also ask what the client must provide, such as access, staging environments and named contacts, and what happens if relying parties are discovered during the work. Separate one-time work from any recurring retainer, and confirm the timelines and exclusions in the written scope.
How do we find out which applications pin Zitadel signing keys?
Start by searching your code, configuration and deployment manifests for hard-coded key identifiers, static JWKS copies or fixed public key files. Then check how each service fetches keys: a service that reads the JWKS endpoint and refreshes it regularly is usually safer than one that stores a key at deployment time. Review logs from the staging environment after the new key is published to find validation failures. Confirm the key discovery behavior of each library you use, since refresh intervals and caching differ. Record each finding in the relying party inventory with an owner and a test result.
How DeployOpen scopes and delivers a Zitadel signing key cutover
DeployOpen treats the OIDC signing key change in a Zitadel v3 to v4 upgrade as its own scoped piece of work, separate from the rest of the upgrade. We inventory relying parties and their key handling, stage the new web keys, and plan the soak period before the legacy key is retired.
How we scope
- Inventory every OIDC client, resource server and token consumer that validates Zitadel-signed tokens.
- Record which relying parties cache or pin public keys, and who owns each one.
- Agree the written, fixed scope with the upgrade timeline, test environments and acceptance criteria before work starts.
How we build
- Review technical advisory A-10017 against your current instance and confirm which changes apply to your version path.
- Stage new web keys in a non-production instance and verify token signing and JWKS publication end to end.
- Test each relying party against both the old and new keys, then document the cutover sequence and rollback steps.
How we hand over
- Deliver a runbook covering key staging, the soak window, legacy key retirement and post-cutover checks.
- Provide a register of relying parties with their key refresh behavior, owners and required fixes.
- Walk your operations and application teams through the evidence and the retest results before sign-off.
How we support
- Offer ongoing support and upgrade assistance as a retainer after the cutover, if your environment needs it.
- Retest relying parties after later Zitadel upgrades or changes to their key handling.
- Keep the upgrade evidence current so your security and compliance reviewers can trace each signing key decision.

