Commit Graph
237 Commits
Author SHA1 Message Date
Tim MöhlmannandGitHub e94d4c3986 feat(crypto): FIPS 140-3 compliant build and runtime checks (#12233)
# Which Problems Are Solved

Enable FIPS 140-3 compliant build.

# How the Problems Are Solved

- Add runtime config validation, if the FIPS flag is enabled fail the
application when a non-compliant hasher is used, or throw a warning when
a legacy verifier is used
- Add a build matrix for FIPS certified build:
  - Go binary is built with `GOFIPS140=certified`
- Login container uses a separate base:
[ubi9](https://catalog.redhat.com/en/software/containers/ubi9/ubi/615bcf606feffc5384e8452e)
from redhat which provides a FIPS certified OpenSSL (used by NodeJS TLS
stack)
- Non-FIPS images where already pushed to both Github Container Registry
and Google Artifact Repository (GAR). Fips images are only pushed to the
GAR.
- Tag versions are suffixed `-fips`. So on release the following images
will be additionally available:

```
europe-docker.pkg.dev/zitadel-common/zitadel-repo/zitadel-login:vX.Y.Z-fips
europe-docker.pkg.dev/zitadel-common/zitadel-repo/zitadel:vX.Y.Z-fips-debug
europe-docker.pkg.dev/zitadel-common/zitadel-repo/zitadel:vX.Y.Z-fips
```
  
# Other changes

- Bumb Go toolchain. At least v1.25.10 is required for a
GOFIPS140=certified setting.
 
# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/4335
- Build [test
run](https://github.com/zitadel/zitadel/actions/runs/27253916052)
pushing FIPS and non-FIPS images
2026-06-16 10:16:49 +02:00
Max PeintnerandGitHub fdafb95a63 fix(login): load custom font from branding settings and allow in CSP (#12279)
Closes #11200

# Which Problems Are Solved

Custom fonts uploaded via the branding/label policy were not supported.

# How the Problems Are Solved

- The login now correctly applies the branding settings, based on the
organization context
- Use the absolute `fontUrl` from the branding API directly in the
`@font-face` `src`, matching how logo and icon assets are already loaded
via absolute URLs.
- Add the Zitadel service URL to the `font-src` CSP directive so the
browser permits loading the cross-origin font.

# Additional Changes

- Updated CSP tests to reflect the new `font-src` behavior.
2026-06-15 14:33:54 +00:00
8e82ec1cb9 Merge commit from fork
* Add DenyLists parsing

* Remove unneeded returned error

* Plug global denylist into Command

* app creation: apply denylist to backchannel logout URI

* Inject denylist to backchannel logout worker

* webhook config: validate against blocked URLs

* Add notificationsWebhook denylist target

* command: Add SMTP endpoint validation against blocklist

* command: Add SMS endpoint validation against blocklist

* Validate webhook endpoint against denylist on channel notification

* Remove unused tests

* handle deprecated denylists

* remove unintended denylist entry in deprecated list

* use single http client

* fix tests

* update comments

* fixes

* cleanup

* address comments

* fix merge

---------

Co-authored-by: Livio Spring <[email protected]>
2026-06-15 15:36:14 +02:00
Livio SpringandGitHub d184e976fc Merge commit from fork
* feat(jwt idp): manage and validate audience

* translations

* fix tests

* address comments

* update migration version

* fix merge
2026-06-15 15:27:47 +02:00
Max PeintnerandGitHub 4459a1380c fix(login): accept IDP sessions on passkey registration (#12275)
# Which Problems Are Solved

The local `isSessionValid` in `passkeys.ts` only checked `password` and
`webAuthN` factors, so sessions authenticated via an external IDP
(`intent` factor) were treated as invalid. This caused a "You have to
authenticate" error when redirecting to `/passkey/set` after IDP login.

# How the Problems Are Solved

Added `session.factors.intent.verifiedAt` to the validity check,
consistent with the canonical `isSessionValid` in `session.ts`.
2026-06-12 12:17:37 +00:00
385c5ae54b docs: Update restrict console guide (#12262)
<!--
Please inform yourself about the contribution guidelines on submitting a
PR here:
https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr.
Take note of how PR/commit titles should be written and replace the
template texts in the sections below. Don't remove any of the sections.
It is important that the commit history clearly shows what is changed
and why.
Important: By submitting a contribution you agree to the terms from our
Licensing Policy as described here:
https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions.
-->

# Which Problems Are Solved

The projects setting texts and sceenshot where outdated. 

# How the Problems Are Solved

Update the text and screenshot.

# Additional Changes

* Rewording
* Lockout warning component

---------

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
2026-06-10 10:38:37 +00:00
Max PeintnerandGitHub b27fdfc28c chore: update dependencies (#12242)
# Which Problems Are Solved

Fixes multiple high-severity Dependabot alerts for transitive
dependencies (axios, protobufjs, systeminformation, tmp, fast-uri,
@babel/plugin-transform-modules-systemjs).
 
# How the Problems Are Solved

**Direct dependency updates:**
- `@opentelemetry/*` 0.217 → 0.218 in login (new otlp-transformer
dropped protobufjs as direct dep)
- `posthog-js` 1.374 → 1.380 in console (dropped the
OpenTelemetry/protobufjs chain entirely)

**pnpm overrides** for remaining transitive deps that can't be updated
via their parents (all pulled by the gRPC stack, Cypress, karma, nx, or
ajv):
- `axios` → ≥1.17.0 (prototype pollution, proxy bypass)
- `protobufjs` → ≥7.5.7 / ≥8.0.2 (code injection, prototype pollution,
DoS)
- `systeminformation` → ≥5.31.6 (command injection)
- `tmp` → ≥0.2.6 (path traversal)
- `fast-uri` → ≥3.1.2 (path traversal, host confusion)

**Benchmark:** refreshed `package-lock.json` to resolve @babel and
fast-uri alerts.
2026-06-09 16:27:12 +02:00
Tim MöhlmannandGitHub 7019a03ec4 chore(test): disable event_testing in backend/v3 (#12241)
# Which Problems Are Solved

`backed/v3` tests are flaky, but the code is not productive. Development
is paused for the moment. Disabling flaky tests helps us to maintain the
product easier.

# How the Problems Are Solved


- Removed 'events_testing' from the integration test command in both
`CONTRIBUTING.md` and `apps/api/project.json` to streamline the testing
process.
- Adjusted the command to ensure it only includes relevant integration
tests, improving clarity and focus for contributors.
2026-06-05 10:46:49 +02:00
cdc6c43d09 fix: update dependencies (#12216)
# Which Problems Are Solved

Fixes open vulnerabilities

# How the Problems Are Solved

Updated npm/js dependencies across console, new login v2, and docs
Based on https://github.com/zitadel/zitadel/pull/12164

---------

Co-authored-by: conblem <[email protected]>
Co-authored-by: Livio Spring <[email protected]>
2026-06-04 14:33:04 +02:00
fc6e2a0f05 fix(login): retry logic for session creation after registration on NotFound (#12189)
After user registration, the backend projections may not be up to date
yet when the Login UI immediately tries to create a session. This
results in a `QUERY-Dfbg2` ("User could not be found") error even though
the user was created successfully.

This adds retry logic with backoff (500ms/1s/2s, up to 3 attempts)
around `createSessionAndUpdateCookie` in the registration flow. Only
`NotFound` errors are retried — other errors are thrown immediately.

Closes #12173

---------

Co-authored-by: Livio Spring <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
2026-06-01 16:49:07 +02:00
f4f43f5248 docs: fix broken GitHub code-reference blocks after fumadocs migration (#12213)
# Which Problems Are Solved

Pages in `apps/docs` that embed source from GitHub via the Docusaurus
convention

````
```js reference

https://github.com/zitadel/actions/blob/main/examples/org_metadata_claim.js
```
````

stopped working after the migration from Docusaurus to fumadocs. The old
`docusaurus-theme-github-codeblock` plugin used to fetch the file and
render it; fumadocs has no support for that meta, so the page rendered
the raw URL as plain code-block text. Visible at
`/docs/apis/actions/code-examples` and 16 other pages.

# How the Problems Are Solved

- Converted every ```` ```<lang> reference\n<URL>\n``` ```` block (46
total across 17 `.mdx` files) to the native fumadocs JSX form:
`<GithubCodeBlock url="<URL>" />`. The existing `<details>`/`<summary>`
collapsibles around blocks are kept — they're an authoring choice, not
part of the rendering bug.
- Updated `apps/docs/components/github-code-block.tsx` to render via
`DynamicCodeBlock` from `fumadocs-ui/components/dynamic-codeblock`
(proper shiki highlighting) instead of raw `CodeBlock` + `Pre` (which
produced unhighlighted output). Also fixed language detection so a URL
hash like `#L10-L20` no longer pollutes the language token.
- Registered `GithubCodeBlock` globally in
`apps/docs/mdx-components.tsx`, matching how every other shared
component (`APIPage`, `Callout`, `Tab/Tabs`, `Step/Steps`, `Admonition`,
`TerminologyUpdate`) is exposed. MDX files no longer need a local
`import`.

# Additional Changes

- Normalized the two MDX files that were already using the JSX form
(`examples/secure-api/python-django.mdx`,
`examples/secure-api/java-spring.mdx`): removed their now-redundant
local `import { GithubCodeBlock }` and rewrote 9 long-form
`<GithubCodeBlock url="..."></GithubCodeBlock>` tags to self-closing for
consistency.

# Additional Context

Verified locally with `pnpm --filter @zitadel/docs dev`:

- `/docs/apis/actions/code-examples` — 20 shiki-highlighted code blocks
rendered inside the `<details>` collapsibles (was 0).
- `/docs/apis/openidoauth/claims` — line-range hashes (`#L9-L11`)
honored.
- `/docs/examples/login/flutter` — mixed languages (xml/dart/html)
detected and highlighted.
- `/docs/guides/integrate/external-audit-log` — edge case of fenced
reference indented inside a numbered list also converted and rendered.

Greps:
- `^[ \t]*\`\`\`[a-zA-Z0-9]+ reference` in `apps/docs/content/**/*.mdx`
→ 0 matches.
- `<GithubCodeBlock url="` in `apps/docs/content/**/*.mdx` → 55 matches.
- `from '@/components/github-code-block'` in
`apps/docs/content/**/*.mdx` → 0 matches.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-28 11:02:44 -07:00
404c23834a fix(login): redirect to email verification when forced MFA has no visible factors (#12060)
# Which Problems Are Solved

When MFA is enforced with only Email OTP as a second factor, new users
hit a dead end on the MFA setup screen. The `ChooseSecondFactorToSetup`
component hides Email OTP when `emailVerified` is `false`, and if email
verification was skipped earlier in the flow (e.g. `EMAIL_VERIFICATION`
env not set to `"true"`), no MFA options are visible and the user cannot
proceed.

# How the Problems Are Solved

In the MFA setup server component (`mfa/set/page.tsx`), before
rendering, detect when forced MFA has no visible second factors because
all configured factors require verification the user hasn't completed.
When Email OTP is configured but the user's email is unverified,
redirect to `/verify` with `send=true` so a verification code is sent
immediately.

After the user verifies their email, the existing flow in `verify.ts`
calls `checkMFAFactors` which redirects back to `/mfa/set` — where Email
OTP is now visible since `emailVerified` is `true`.

The redirect pattern follows the existing precedent in
`authenticator/set/page.tsx`.

# Additional Changes

None

# Additional Context

- Closes #11536

---------

Co-authored-by: Max Peintner <[email protected]>
2026-05-22 11:40:40 +00:00
Federico CoppedeandGitHub b4f2da2171 docs: Add Gateway API routing to Kubernetes deployment guide (#12168)
## Description
This PR updates the Kubernetes deployment documentation to address user
feedback regarding our routing instructions. A user noted that standard
`Ingress` is becoming outdated and requested configuration examples for
the modern Gateway API.

To support both existing and modern clusters, I have updated the guide
to provide two clear pathways for exposing ZITADEL.

## Changes Included
* **Prerequisites updated:** Mentioned Gateway API controllers alongside
standard Ingress controllers.
* **Refactored Stage 2 (Production):** Split the routing configuration
into "Option A: Standard Ingress" and "Option B: Gateway API".
* **Added YAML example:** Provided a sample `HTTPRoute` resource to
route traffic to the `zitadel` and `zitadel-login` backend services.
* **Terminology updates:** Broadened terms like "Ingress" to "Routing"
or "Routing controller" where applicable.
2026-05-18 20:03:27 +05:30
Federico CoppedeandGitHub ecfe72b509 docs: update vue repo url (#12160)
fix broken vue repo url
2026-05-12 11:51:05 +00:00
96b3f3dd35 fix(login): apply custom request headers from environment variable in proxy (#12144)
Closes #12125

# Which Problems Are Solved

The proxy middleware (proxy.ts) did not apply `CUSTOM_REQUEST_HEADERS`
to rewritten requests (/.well-known/*, /oauth/*, /oidc/*, etc.). When
`ZITADEL_API_URL` points to an internal service name, the Host header on
proxied requests remained the internal name instead of the configured
public domain, causing Errors.Instance.NotFound.

# How the Problems Are Solved

The other two outgoing request paths — the connectRPC transport and the
security-settings fetch — already applied these headers. This adds the
same applyCustomHeaders() call to the proxy path.

Co-authored-by: Ramon <[email protected]>
2026-05-12 08:34:39 +02:00
Federico CoppedeandGitHub 1b8b0ac410 docs: move customer portal docs to knowledge base (#12147)
Moved the Customer Portal Documentation to the knowledge base
(help.zitadel.com)
2026-05-10 21:42:08 -03:00
64737bfedf chore: deps update (#12114)
<!--
Please inform yourself about the contribution guidelines on submitting a
PR here:
https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr.
Take note of how PR/commit titles should be written and replace the
template texts in the sections below. Don't remove any of the sections.
It is important that the commit history clearly shows what is changed
and why.
Important: By submitting a contribution you agree to the terms from our
Licensing Policy as described here:
https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions.
-->

# Which Problems Are Solved

Outdated depdencies

# How the Problems Are Solved

This PR mostly just updates our NPM depdencies to the newest feature
releases.
The UUID package was update to version 14, the changelog only includes
changes to the supported node version.

# Additional Changes

Replace tsx for some scripts in the docs.

---------

Co-authored-by: Livio Spring <[email protected]>
Co-authored-by: Max Peintner <[email protected]>
2026-04-30 14:02:28 +00:00
942c959d09 fix(login): resolve localized legal links in signup (#11913)
# Which Problems Are Solved

- Login V2 signup does not resolve the `{{.Lang}}` placeholder in ToS,
Privacy Policy, and help links.
- Clicking those links on the registration page can open URL-encoded
placeholders like `%7B%7B.Lang%7D%7D` instead of the active
language-specific page.

# How the Problems Are Solved

- Adds a small login utility to resolve `{{.Lang}}` placeholders against
the active Login V2 locale.
- Updates the signup legal acceptance component to use the resolved
links before rendering them.
- Applies the same resolution to the optional help link shown alongside
the legal acceptance text.

# Additional Changes

- Adds unit tests for the link placeholder resolver.
- Adds a component test covering localized ToS, Privacy Policy, and help
links on the signup page.

# Additional Context

- Closes #11907

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Max Peintner <[email protected]>
Co-authored-by: Max Peintner <[email protected]>
2026-04-30 13:45:03 +00:00
b1c8781516 fix(login): lru-cache compatibility, improve session error handling (#12099)
# Which Problems Are Solved

- Logo and heading overlap on login pages due to a -mb-4 negative margin
on the logo container
- The /login route returns a 500 when `listSessions` fails (e.g. stale
session cookies), because loadSessions has no error handling.
- The proxy logs `"fetch() returned undefined"` because
`fetchIframeOrigins` returns undefined, which lru-cache's forceFetch
treats as a fetch failure.

# How the Problems Are Solved

- Remove `-mb-4` from the logo container in DynamicTheme.
- Wrap `loadSessions` in a try/catch — failures fall through as empty
sessions instead of crashing.
- Return `null` instead of `undefined` from `fetchIframeOrigins` so
lru-cache caches it normally.

---------

Co-authored-by: Livio Spring <[email protected]>
Co-authored-by: conblem <[email protected]>
2026-04-30 15:27:44 +02:00
Florian ForsterandGitHub 24d0f34f39 perf: optimize docs static generation cost (#12108)
## Summary
- Switch the docs catch-all route to full static generation and prebuild
both latest and versioned docs paths.
- Prebuild OG images for all docs pages, make sitemap and LLM export
static, and remove nondeterministic sitemap timestamps.
- Reduce build-time overhead by memoizing docs sidebar trees and
skipping processed markdown generation for versioned docs.

## Testing
- `pnpm nx run @zitadel/docs:build`
- `pnpm nx run @zitadel/docs:lint`
- `pnpm nx run @zitadel/docs:check-types`
- Verified the prerender manifest contains 8,816 prerendered routes,
3,293 versioned docs routes, 4,406 OG routes, and zero revalidating docs
routes.
2026-04-27 15:34:00 +00:00
Federico CoppedeandGitHub f96a9c54ac docs: clarify exp and iat claim precedence for private key JWTs (#12110)
This PR updates the "Private Key JWT Auth for Service Accounts"
documentation to explicitly clarify the relationship between the exp
(expiration) and iat (issued at) claims.

Previously, the documentation didn't make it clear what happens if a
developer sets an exp claim far into the future. This update clarifies
that while the exp value is strictly enforced, the iat claim takes
precedence if the exp is set to more than 1 hour in the future (i.e.,
ZITADEL will reject the JWT once the iat is older than 1 hour,
regardless of the exp time).

**Changes included:**

Updated the description of the exp claim in the JWT payload section to
highlight the 1-hour iat limit enforcement.
2026-04-27 14:58:50 +02:00
314b1b50dd docs: eliminate runtime ISR writes via full SSG (#12103)
# Which Problems Are Solved

The Vercel `docs` project generated ~64M ISR writes over 30 days (99.5%
of ISR writes across all projects, ~\$258/month).

Root causes in the Next.js 16 docs app:
- `apps/docs/app/[[...slug]]/page.tsx` had `dynamicParams = true` +
`revalidate = 3600`. Bot traffic hitting unknown URLs (`/docs/wp-admin`,
`/docs/.env`, fuzzed paths) got rendered via \`notFound()\`, and the 404
response was cached as an ISR entry — 1 write per unique bad URL. Known
pages were also rewritten hourly for no reason since content only
changes on deploy.
- `apps/docs/app/og/docs/[...slug]/route.tsx` had `revalidate = false` +
empty `generateStaticParams()` + implicit `dynamicParams = true`. Every
unique OG URL (including bot probes) was cached forever — writes
accumulated permanently.

# How the Problems Are Solved

Switch the docs routes to pure SSG (content is static and only changes
on deploy, so ISR provides no value):

- `app/[[...slug]]/page.tsx`: `dynamicParams = false`, `revalidate =
false`, `dynamic = 'force-static'`. Unknown URLs now return a static 404
at the CDN — no function invocation, no ISR write. All 390 pages from
`source.generateParams()` are still pre-rendered.
- `app/og/docs/[...slug]/route.tsx`: `generateStaticParams()` now
returns all 390 pages via the existing `getPageImage(page).segments`
helper, so every OG image is pre-built as a static asset. `dynamicParams
= false` + `dynamic = 'force-static'` locks it down.
- `app/llms-full.txt/route.ts`: added `dynamic = 'force-static'` as a
safety net (already `revalidate = false`, single URL).

The tradeoff is longer CI builds (~40s–2min for 390 OG image
generations, paid on every preview deploy) in exchange for eliminating
~\$258/month in ISR writes plus associated function invocations and CPU
time.

# Additional Changes

None.

# Additional Context

- No changes to `next.config.mjs`, `vercel.json`, or redirects.
- Existing `apps/docs/redirects.json` (3,261 entries) covers legacy URLs
so `dynamicParams = false` won't 404 moved pages linked from elsewhere.
- Versioned routes: `content/versions.json` and `v*/` folders don't
exist yet. When versioning is activated, `generateStaticParams()` in
both files must also include `versionSource.generateParams()` —
otherwise versioned URLs will 404 under `dynamicParams = false`.

## Test plan

- [ ] CI build succeeds (expect modest build-time increase for OG
pre-generation)
- [ ] Inspect `apps/docs/.next/prerender-manifest.json` — all 390 doc
routes + 390 OG routes listed with `initialRevalidateSeconds: false`
- [ ] Local smoke: `/docs` → 200, `/docs/wp-admin` → 404 (static, no
function), `/docs/og/docs/guides/start/image.png` → PNG,
`/docs/og/docs/bogus/image.png` → 404
- [ ] Post-deploy: Vercel **ISR Writes** metric drops to near-zero
within 24h
- [ ] Post-deploy: Vercel **Function Invocations** for `/og/docs/*` drop
to zero
- [ ] Verify no legitimate docs pages 404 (cross-check logs against
`apps/docs/app/sitemap.ts`)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2026-04-24 12:34:57 -03:00
Max PeintnerandGitHub de98c6edb8 fix(login): ClassifiedConnectError breaking ConnectError instanceof checks (#12022)
# Which Problems Are Solved

1. SSL/TLS handshake failures on Cloud Run (middleware self-loopback)
PR #11903 changed the middleware (proxy.ts) to fetch security settings
via fetch(origin + "/security") on every request, including non-proxy
routes like /login. On Cloud Run, this self-loopback goes through the
Google Front End (GFE) load balancer, causing intermittent SSL
routines::record layer failure errors that were tenant-consistent.

2. The ClassifiedConnectError introduced in #11926 set this.name =
"ClassifiedConnectError", which broke ConnectError's custom
Symbol.hasInstance duck-typing check (v.name === "ConnectError"). This
caused ConnectError.from() inside the connectRPC transport's abort
handler to re-wrap classified errors as new ConnectError instances with
Code.Unknown — losing the original gRPC error code and all
classification metadata.

# How the Problems Are Solved

Middleware: eliminate self-loopback fetch:

- Replaced the fetch(origin + "/security") self-loopback with a direct
fetch to ZITADEL_API_URL using the Connect protocol (POST + JSON),
bypassing the load balancer entirely
- Security settings are cached in-memory with a 1-hour TTL per instance
host
- Extracted the fetching/caching logic into
src/lib/server/security-settings.ts
Removed the now-unused /security API route (src/app/security/route.ts)
- CSP headers with iframe origins are now applied to all routes without
any loopback

Error classification interceptor: fixed
- Keep this.name = "ConnectError" in ClassifiedConnectError so the
duck-typing Symbol.hasInstance check passes
- The branded Symbol.for check via isClassifiedError() still correctly
distinguishes the subclass
- Remove redundant Object.setPrototypeOf call (the super constructor
already handles it via new.target)
- Replace remaining instanceof ConnectError checks with
isClassifiedError() in setUserPassword and checkSessionAndSetPassword
2026-04-23 09:11:13 +02:00
dd9dcf9f72 feat(console): improve org search performance in create project grant page #11121 (#12057)
<!--
Please inform yourself about the contribution guidelines on submitting a
PR here:
https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr.
Take note of how PR/commit titles should be written and replace the
template texts in the sections below. Don't remove any of the sections.
It is important that the commit history clearly shows what is changed
and why.
Important: By submitting a contribution you agree to the terms from our
Licensing Policy as described here:
https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions.
-->

# Which Problems Are Solved

When creating a new Project Grant in the Zitadel console, the UI becomes
extremely sluggish/unusable. The issue appears tied to the organization
search dropdown attempting to load a very large dataset.

# How the Problems Are Solved

The refactored `SearchOrgAutocompleteComponent` uses server side
filtering and ondemand loading using infinite scrolling. This makes sure
on a subset of organizations is ever loaded on the client.

# Additional Changes

- Added tailwindcss for easier styling
- Removed build warnings
- Removed some of the SCSS syntax warnings

# Additional Context
- Closes #11121

---------

Co-authored-by: Max Peintner <[email protected]>
2026-04-22 11:46:27 +02:00
01fe34a526 fix(oidc): use authenticated encryption for opaque tokens (#12017)
# Which Problems Are Solved

Opaque tokens now use authenticated encryption.

# How the Problems Are Solved

- Upgrade zitadel/oidc to v3.47
- Copy crypto implementation for refresh and session tokens (internal to
zitadel)
- Added config that allows validating old tokens for gradual roll-out

# Additional Changes

- Set NX cache for `integration-test-build` to `false`, working on a
seperate fix.

# Additional Context

- closes #11315

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: muhlemmer <[email protected]>
2026-04-13 10:59:50 +00:00
Mridang AgarwallaandGitHub a28ee63b02 feat(login): add ZITADEL_API_AWAITINITIALCONN support (#12032) 2026-04-13 09:41:31 +00:00
7d231b43d4 fix(login): replace custom SWR cache with lru-cache (#11945)
# Which Problems Are Solved

The in-memory SWR promiseCache in zitadel.ts used keys like
getBrandingSettings-${org} that had no instance identifier. In
multi-tenant mode, where a single Next.js process serves multiple
instances, an instance A's cached settings without org context
(branding, languages, settings, etc.) could be served to Instance B
request without org context. The cache now additionally is bound to 100
entries by default (configurable via maxSize in `API_CACHE_CONFIG`).
When capacity is exceeded, expired entries are swept first

It additionally replaces the hand-rolled PromiseCache (Map-based, FIFO
eviction) with lru-cache, leveraging its built-in fetchMethod for
stale-while-revalidate, request deduplication, and true LRU eviction.

# How the Problems Are Solved

Added an instanceCacheKey() helpe that prefixes every cache key with
serviceConfig.instanceHost in addition to the org context if available.

---------

Co-authored-by: Ramon <[email protected]>
2026-04-13 11:19:50 +02:00
a2bf528ca0 feat(domain): introduce error slugs (#12030)
# Which Problems Are Solved

As part of https://github.com/zitadel/zitadel/issues/11917 we want to
introduce error slugs so (API) clients can rely on stable,
machine-readable errors and act accordingly.

# How the Problems Are Solved

- Added a `NewSlug` helper function in the domain package.
- Added `ErrorDetails` to the `ZitadelError`
- Added an `zitadel.error.v2.ErrorDetail` proto message
- Updated the connectRPC error interceptor to map new slug based errors
to the new `ErrorDetail`
- Defined some common slugs and error functions like internal errors
- Defined (session) specific slugs used in the `DeleteSession` and
`CheckUser` functions and replaced old implementations
- Updated integration tests to check specific errors if the relation
database feature is enabled
- Updated doc and guideline to reflect the latest changes and decisions
- Updated DeleteSession endpoint API to list possible slugs

# Additional Changes

None

# Additional Context

- closes #11957

---------

Co-authored-by: Wim Van Laer <[email protected]>
2026-04-13 09:47:04 +02:00
Wim Van LaerandGitHub 4fdc3d6d3b docs: fixed login v1 jwt idp callback (#11989)
# Which Problems Are Solved

The example callback url for JWT idP was wrong
2026-04-10 07:51:01 +00:00
Mridang AgarwallaandGitHub ecea44329a fix(login): load SSL_CERT_DIR certificates without requiring hashed filenames (#12029) 2026-04-10 10:28:17 +03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9135ff4b36 chore(deps): bump the go_modules group across 2 directories with 1 update (#11982)
Bumps the go_modules group with 1 update in the
/apps/login/acceptance/idp/oidc directory:
[github.com/go-jose/go-jose/v4](https://github.com/go-jose/go-jose).
Bumps the go_modules group with 1 update in the
/apps/login/acceptance/oidcrp directory:
[github.com/go-jose/go-jose/v4](https://github.com/go-jose/go-jose).

Updates `github.com/go-jose/go-jose/v4` from 4.0.5 to 4.1.4
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/go-jose/go-jose/releases">github.com/go-jose/go-jose/v4's
releases</a>.</em></p>
<blockquote>
<h2>v4.1.3</h2>
<p>This release drops Go 1.23 support as that Go release is no longer
supported. With that, we can drop <code>x/crypto</code> and no longer
have any external dependencies in go-jose outside of the standard
library!</p>
<p>This release fixes a bug where a critical b64 header was ignored if
in an unprotected header. It is now rejected instead of ignored.</p>
<h2>What's Changed</h2>
<ul>
<li>Remove Go 1.23 support by <a
href="https://github.com/mcpherrinm"><code>@​mcpherrinm</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/205">go-jose/go-jose#205</a></li>
<li>Reject JWS with an unprotected critical b64 header by <a
href="https://github.com/mcpherrinm"><code>@​mcpherrinm</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/210">go-jose/go-jose#210</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/go-jose/go-jose/compare/v4.1.2...v4.1.3">https://github.com/go-jose/go-jose/compare/v4.1.2...v4.1.3</a></p>
<h2>v4.1.2</h2>
<h2>What's Changed</h2>
<p>go-jose v4.1.2 improves some documentation, errors, and removes the
only 3rd-party dependency.</p>
<ul>
<li>Update go-jose documentation by <a
href="https://github.com/mcpherrinm"><code>@​mcpherrinm</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/198">go-jose/go-jose#198</a></li>
<li>Remove dependency on testify by <a
href="https://github.com/wardviaene"><code>@​wardviaene</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/197">go-jose/go-jose#197</a></li>
<li>Improve error message for invalid private keys by <a
href="https://github.com/ProjectMutilation"><code>@​ProjectMutilation</code></a>
in <a
href="https://redirect.github.com/go-jose/go-jose/pull/195">go-jose/go-jose#195</a></li>
<li>JWK unsupported error when unmarshalling by <a
href="https://github.com/fprojetto"><code>@​fprojetto</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/191">go-jose/go-jose#191</a></li>
<li>Add JSONWebKey type to makeJWERecipient by <a
href="https://github.com/alvarolivie"><code>@​alvarolivie</code></a> in
<a
href="https://redirect.github.com/go-jose/go-jose/pull/200">go-jose/go-jose#200</a></li>
<li>testutils/assert: remove True, Nil, NotNil by <a
href="https://github.com/jsha"><code>@​jsha</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/202">go-jose/go-jose#202</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/wardviaene"><code>@​wardviaene</code></a> made
their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/197">go-jose/go-jose#197</a></li>
<li><a href="https://github.com/fprojetto"><code>@​fprojetto</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/191">go-jose/go-jose#191</a></li>
<li><a
href="https://github.com/alvarolivie"><code>@​alvarolivie</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/200">go-jose/go-jose#200</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/go-jose/go-jose/compare/v4.1.1...v4.1.2">https://github.com/go-jose/go-jose/compare/v4.1.1...v4.1.2</a></p>
<h2>v4.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Drop go-cmp dependency by <a
href="https://github.com/mcpherrinm"><code>@​mcpherrinm</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/186">go-jose/go-jose#186</a></li>
<li>jws: improve performance and allocations for ParseSignedCompact by
<a href="https://github.com/drakkan"><code>@​drakkan</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/188">go-jose/go-jose#188</a></li>
<li>Add missing quote to unknown curve message <a
href="https://redirect.github.com/go-jose/go-jose/issues/170">#170</a>
by <a
href="https://github.com/sudhanvaghebbale"><code>@​sudhanvaghebbale</code></a>
in <a
href="https://redirect.github.com/go-jose/go-jose/pull/189">go-jose/go-jose#189</a></li>
<li>Fix incorrect validation by <a
href="https://github.com/ProjectMutilation"><code>@​ProjectMutilation</code></a>
in <a
href="https://redirect.github.com/go-jose/go-jose/pull/192">go-jose/go-jose#192</a></li>
<li>Restore Go 1.23 compatibility by <a
href="https://github.com/anuraaga"><code>@​anuraaga</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/193">go-jose/go-jose#193</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/drakkan"><code>@​drakkan</code></a> made
their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/188">go-jose/go-jose#188</a></li>
<li><a
href="https://github.com/sudhanvaghebbale"><code>@​sudhanvaghebbale</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/189">go-jose/go-jose#189</a></li>
<li><a
href="https://github.com/ProjectMutilation"><code>@​ProjectMutilation</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/192">go-jose/go-jose#192</a></li>
<li><a href="https://github.com/anuraaga"><code>@​anuraaga</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/193">go-jose/go-jose#193</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/go-jose/go-jose/compare/v4.1.0...v4.1.1">https://github.com/go-jose/go-jose/compare/v4.1.0...v4.1.1</a></p>
<h2>v4.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Document <code>signatureAlgorithms</code> argument by <a
href="https://github.com/tgeoghegan"><code>@​tgeoghegan</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/163">go-jose/go-jose#163</a></li>
<li>Add custom error for unsupported JWS signature algorithms by <a
href="https://github.com/beautifulentropy"><code>@​beautifulentropy</code></a>
in <a
href="https://redirect.github.com/go-jose/go-jose/pull/181">go-jose/go-jose#181</a></li>
<li>use stdlib pbkdf2 package on go 1.24 by <a
href="https://github.com/kruskall"><code>@​kruskall</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/180">go-jose/go-jose#180</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/go-jose/go-jose/commit/0e59876635f3dbf46d7b5e97b52bb75a3f96e7d9"><code>0e59876</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/ddffdbcec8bdadea8e02a20bdf19239878228215"><code>ddffdbc</code></a>
Bump actions/checkout from 5 to 6 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/213">#213</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/5348b9a4ba4559d2266b5af89fb5353cd1a5360a"><code>5348b9a</code></a>
Reject JWS with an unprotected critical b64 header (<a
href="https://redirect.github.com/go-jose/go-jose/issues/210">#210</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/9153a5e4549c95e97a84e41e6375dc90eac54241"><code>9153a5e</code></a>
Bump actions/setup-python from 5 to 6 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/208">#208</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/2126e17f8791f6a234e63b2e4e8cb9fac8605c3a"><code>2126e17</code></a>
Bump actions/setup-go from 5 to 6 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/209">#209</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/9860c65054c4821d1e7c22200422b04181f58ebc"><code>9860c65</code></a>
Bump actions/checkout from 4 to 5 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/206">#206</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/14239fdb15b88e1c42e41621ef24f1112cf31b5a"><code>14239fd</code></a>
Remove Go 1.23 support (<a
href="https://redirect.github.com/go-jose/go-jose/issues/205">#205</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/a16e15813482ca5e9a679b7f5bb42ddfae616d43"><code>a16e158</code></a>
Update CI to run on Go 1.24 and 1.25 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/204">#204</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/a1565a41aa008ae6545e0f50a636d254de5b4596"><code>a1565a4</code></a>
testutils/assert: remove True, Nil, NotNil (<a
href="https://redirect.github.com/go-jose/go-jose/issues/202">#202</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/3a80e136a96e747bf44049414eadc02828df4d33"><code>3a80e13</code></a>
jwe: accept non-pointer JSONWebKey in Recipient (<a
href="https://redirect.github.com/go-jose/go-jose/issues/200">#200</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/go-jose/go-jose/compare/v4.0.5...v4.1.4">compare
view</a></li>
</ul>
</details>
<br />

Updates `github.com/go-jose/go-jose/v4` from 4.0.5 to 4.1.4
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/go-jose/go-jose/releases">github.com/go-jose/go-jose/v4's
releases</a>.</em></p>
<blockquote>
<h2>v4.1.3</h2>
<p>This release drops Go 1.23 support as that Go release is no longer
supported. With that, we can drop <code>x/crypto</code> and no longer
have any external dependencies in go-jose outside of the standard
library!</p>
<p>This release fixes a bug where a critical b64 header was ignored if
in an unprotected header. It is now rejected instead of ignored.</p>
<h2>What's Changed</h2>
<ul>
<li>Remove Go 1.23 support by <a
href="https://github.com/mcpherrinm"><code>@​mcpherrinm</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/205">go-jose/go-jose#205</a></li>
<li>Reject JWS with an unprotected critical b64 header by <a
href="https://github.com/mcpherrinm"><code>@​mcpherrinm</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/210">go-jose/go-jose#210</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/go-jose/go-jose/compare/v4.1.2...v4.1.3">https://github.com/go-jose/go-jose/compare/v4.1.2...v4.1.3</a></p>
<h2>v4.1.2</h2>
<h2>What's Changed</h2>
<p>go-jose v4.1.2 improves some documentation, errors, and removes the
only 3rd-party dependency.</p>
<ul>
<li>Update go-jose documentation by <a
href="https://github.com/mcpherrinm"><code>@​mcpherrinm</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/198">go-jose/go-jose#198</a></li>
<li>Remove dependency on testify by <a
href="https://github.com/wardviaene"><code>@​wardviaene</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/197">go-jose/go-jose#197</a></li>
<li>Improve error message for invalid private keys by <a
href="https://github.com/ProjectMutilation"><code>@​ProjectMutilation</code></a>
in <a
href="https://redirect.github.com/go-jose/go-jose/pull/195">go-jose/go-jose#195</a></li>
<li>JWK unsupported error when unmarshalling by <a
href="https://github.com/fprojetto"><code>@​fprojetto</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/191">go-jose/go-jose#191</a></li>
<li>Add JSONWebKey type to makeJWERecipient by <a
href="https://github.com/alvarolivie"><code>@​alvarolivie</code></a> in
<a
href="https://redirect.github.com/go-jose/go-jose/pull/200">go-jose/go-jose#200</a></li>
<li>testutils/assert: remove True, Nil, NotNil by <a
href="https://github.com/jsha"><code>@​jsha</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/202">go-jose/go-jose#202</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/wardviaene"><code>@​wardviaene</code></a> made
their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/197">go-jose/go-jose#197</a></li>
<li><a href="https://github.com/fprojetto"><code>@​fprojetto</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/191">go-jose/go-jose#191</a></li>
<li><a
href="https://github.com/alvarolivie"><code>@​alvarolivie</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/200">go-jose/go-jose#200</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/go-jose/go-jose/compare/v4.1.1...v4.1.2">https://github.com/go-jose/go-jose/compare/v4.1.1...v4.1.2</a></p>
<h2>v4.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Drop go-cmp dependency by <a
href="https://github.com/mcpherrinm"><code>@​mcpherrinm</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/186">go-jose/go-jose#186</a></li>
<li>jws: improve performance and allocations for ParseSignedCompact by
<a href="https://github.com/drakkan"><code>@​drakkan</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/188">go-jose/go-jose#188</a></li>
<li>Add missing quote to unknown curve message <a
href="https://redirect.github.com/go-jose/go-jose/issues/170">#170</a>
by <a
href="https://github.com/sudhanvaghebbale"><code>@​sudhanvaghebbale</code></a>
in <a
href="https://redirect.github.com/go-jose/go-jose/pull/189">go-jose/go-jose#189</a></li>
<li>Fix incorrect validation by <a
href="https://github.com/ProjectMutilation"><code>@​ProjectMutilation</code></a>
in <a
href="https://redirect.github.com/go-jose/go-jose/pull/192">go-jose/go-jose#192</a></li>
<li>Restore Go 1.23 compatibility by <a
href="https://github.com/anuraaga"><code>@​anuraaga</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/193">go-jose/go-jose#193</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/drakkan"><code>@​drakkan</code></a> made
their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/188">go-jose/go-jose#188</a></li>
<li><a
href="https://github.com/sudhanvaghebbale"><code>@​sudhanvaghebbale</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/189">go-jose/go-jose#189</a></li>
<li><a
href="https://github.com/ProjectMutilation"><code>@​ProjectMutilation</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/192">go-jose/go-jose#192</a></li>
<li><a href="https://github.com/anuraaga"><code>@​anuraaga</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-jose/go-jose/pull/193">go-jose/go-jose#193</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/go-jose/go-jose/compare/v4.1.0...v4.1.1">https://github.com/go-jose/go-jose/compare/v4.1.0...v4.1.1</a></p>
<h2>v4.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Document <code>signatureAlgorithms</code> argument by <a
href="https://github.com/tgeoghegan"><code>@​tgeoghegan</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/163">go-jose/go-jose#163</a></li>
<li>Add custom error for unsupported JWS signature algorithms by <a
href="https://github.com/beautifulentropy"><code>@​beautifulentropy</code></a>
in <a
href="https://redirect.github.com/go-jose/go-jose/pull/181">go-jose/go-jose#181</a></li>
<li>use stdlib pbkdf2 package on go 1.24 by <a
href="https://github.com/kruskall"><code>@​kruskall</code></a> in <a
href="https://redirect.github.com/go-jose/go-jose/pull/180">go-jose/go-jose#180</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/go-jose/go-jose/commit/0e59876635f3dbf46d7b5e97b52bb75a3f96e7d9"><code>0e59876</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/ddffdbcec8bdadea8e02a20bdf19239878228215"><code>ddffdbc</code></a>
Bump actions/checkout from 5 to 6 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/213">#213</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/5348b9a4ba4559d2266b5af89fb5353cd1a5360a"><code>5348b9a</code></a>
Reject JWS with an unprotected critical b64 header (<a
href="https://redirect.github.com/go-jose/go-jose/issues/210">#210</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/9153a5e4549c95e97a84e41e6375dc90eac54241"><code>9153a5e</code></a>
Bump actions/setup-python from 5 to 6 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/208">#208</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/2126e17f8791f6a234e63b2e4e8cb9fac8605c3a"><code>2126e17</code></a>
Bump actions/setup-go from 5 to 6 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/209">#209</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/9860c65054c4821d1e7c22200422b04181f58ebc"><code>9860c65</code></a>
Bump actions/checkout from 4 to 5 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/206">#206</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/14239fdb15b88e1c42e41621ef24f1112cf31b5a"><code>14239fd</code></a>
Remove Go 1.23 support (<a
href="https://redirect.github.com/go-jose/go-jose/issues/205">#205</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/a16e15813482ca5e9a679b7f5bb42ddfae616d43"><code>a16e158</code></a>
Update CI to run on Go 1.24 and 1.25 (<a
href="https://redirect.github.com/go-jose/go-jose/issues/204">#204</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/a1565a41aa008ae6545e0f50a636d254de5b4596"><code>a1565a4</code></a>
testutils/assert: remove True, Nil, NotNil (<a
href="https://redirect.github.com/go-jose/go-jose/issues/202">#202</a>)</li>
<li><a
href="https://github.com/go-jose/go-jose/commit/3a80e136a96e747bf44049414eadc02828df4d33"><code>3a80e13</code></a>
jwe: accept non-pointer JSONWebKey in Recipient (<a
href="https://redirect.github.com/go-jose/go-jose/issues/200">#200</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/go-jose/go-jose/compare/v4.0.5...v4.1.4">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/zitadel/zitadel/network/alerts).

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 10:24:03 +00:00
Max PeintnerandGitHub 17f49323dd fix(login): preserve OIDC request context during email verification (#11990)
# Which Problems Are Solved

When a user needed to verify their email during an OIDC login flow, the
requestId was lost, preventing the flow from completing with a redirect
back to the relying party.

# How the Problems Are Solved

In `sendVerification()`, the session cookie lookup used `"loginName" in
command` to decide whether to fall back to `user.preferredLoginName`.
Since the `loginName` property key always exists in the command object
(even when its value is undefined), the fallback was never triggered.
This caused the lookup to search for loginName === undefined, finding no
session — and ultimately redirecting to a dead-end success page.

- /authenticator/set redirect: Added missing requestId to the URL params
when redirecting users who need to set up a primary auth method.
- /verify/success page: Added a "Continue" button that re-enters the
login flow with requestId preserved, handling the edge case where no
session cookie exists (e.g. email link opened in a different browser).
2026-04-08 10:25:43 +02:00
Livio SpringandGitHub fbb6a406c8 chore: fix generators in crypto package (#12008)
# Which Problems Are Solved

`@zitadel/api:generate-go` failed due to duplicate generated files.
https://github.com/zitadel/zitadel/pull/11820 removed the old generated
file and added a generate command to the `internal/crypto/crypto.go`
file. However, there was already a `internal/crypto/generate.go` with a
different output file name (the old file).

# How the Problems Are Solved

Removed the `internal/crypto/generate.go` file and moved the second
generate into `internal/crypto/code.go`.

# Additional Changes

Noticed that mockgen is an old version and updated it. Also then checked
all other tools and updated them.

# Additional Context

- relates to #11820
- noted internally
2026-04-08 08:48:05 +02:00
RamonandGitHub 5abb51c263 chore: deps update (#11981)
# Which Problems Are Solved

After merging #11968 and rechecking the dependabot alerts there are
still some issues leftover.

# How the Problems Are Solved

This pr makes overrides for vulnerable transitive depdencies to force
update to safe versions.
It also upgrades the next.js version in the docs and I also ran `pnpm
update` once more.

# Additional Changes

Removed the mochaawesome dependency is this is not really needed and
seems unmaintained.

# Additional Context

- Precursor: #11968
2026-04-07 14:14:12 +02:00
f803ea8298 feat(login): add Portuguese (pt) translations for Login V2 (#11897)
## What does this PR do?

Adds complete **Portuguese (pt)** locale translations for the Login V2
interface, making it the 14th supported language.

### Problem

The Login V2 component currently supports 13 languages but does not
include Portuguese — one of the most spoken languages in the world
(~260M native speakers). This was reported in #11782.

### What we found

- The Login V2 translations are stored as JSON files under
`apps/login/locales/`
- Available languages are registered in the `LANGS` array in
`apps/login/src/lib/i18n.ts`
- Portuguese (`pt.json`) was missing from both the locales directory and
the `LANGS` array

### What we did

1. Created `apps/login/locales/pt.json` with complete Portuguese
translations for all login screens (loginname, password, register, MFA,
passkeys, OTP, sessions, errors, etc.)
2. Added `{ name: "Português", code: "pt" }` to the `LANGS` array in
`apps/login/src/lib/i18n.ts`

### Translation methodology

- Based on the existing `en.json` and `es.json` as reference
- Follows Brazilian Portuguese (pt-BR) conventions, which is understood
by all Portuguese-speaking countries
- All keys translated — no fallbacks to English needed

### Files changed

| File | Change |
|------|--------|
| `apps/login/locales/pt.json` | **New** — Complete Portuguese
translations |
| `apps/login/src/lib/i18n.ts` | **Modified** — Added `pt` entry to
`LANGS` array |

### Testing

We built and deployed this change from source (tag v4.12.1) to a
production Zitadel instance:

- ✅ Portuguese appears in the language dropdown  
- ✅ All login screens display correct Portuguese translations  
- ✅ Language selection persists across pages  
- ✅ OIDC flow works correctly with Portuguese selected  
- ✅ No build warnings or errors related to the translation  

Closes #11782

Co-authored-by: rofilho <[email protected]>
2026-04-07 10:51:55 +02:00
0945195f68 chore: deps update (#11968)
# Which Problems Are Solved
This pr updates major and minor dependencies and is the first step on
getting our dependabot alerts cut down.

# How the Problems Are Solved

Depedency updates across the board eg:
- Upgrade Angular to v21
- Upgrade next.js to v16.2
- Upgrade tailwind to v4 in the login
- Upgrade vitest to v4 in the login

This is an uncompleted list refer to the changed files for a full
overview of all the updates.

# Additional Changes

Migrated all control flow in the console to the modern control flow
syntax.
Fixed the dependsOn setting for the @zitadel/login:test-unit nx target.

# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/11274

---------

Co-authored-by: Max Peintner <[email protected]>
2026-04-02 15:53:08 +02:00
Max PeintnerandGitHub 891c7473ca fix(login): invite flow instead of email verification for users with no primary method, improve sending behaviour (#11837)
Closes #10929

# Which Problems Are Solved

When a human user without a primary authentication method enters their
email on the login screen, the login historically auto-sent an email
code (send=true) and redirected them to the `/verify` flow. If the user
was newly created via the API and already received an initial
verify-email, navigating to the login page would trigger a new invite
code, silently invalidating the code they received in their first email.
Additionally instead of resending the same type of email (invitation) a
regular email verification mail was sent

# How the Problems Are Solved
- Resend an invitation email instead of a email verification if a user
has no method set (still in invitation state)
- Conditional Code Sending: Updated `loginname.ts` to check
`humanUser?.email?.isVerified`. We only auto-send a new code
(`send=true`) if the user's email is already verified. Unverified users
will be redirected with `send=false`, allowing them to safely enter the
code they already have.
- UI State Fix: Fixed an issue in `verify/page.tsx` where the send URL
parameter was being checked directly as a string ("false" is truthy). By
using the properly evaluated doSend boolean, the "Code Sent" alert now
correctly hides itself when a new code is not explicitly sent.
- Translation Updates: Refined the codeSent messaging across all locales
to specify "A new code has been sent..." to provide better context to
the user when they do explicitly request a resend.
2026-04-02 09:58:20 +02:00
Mridang AgarwallaandGitHub 140f07e60b feat(login): simplify login client auth and support PKCS#1 keys (#11888) 2026-04-02 13:10:57 +05:30
Max PeintnerandGitHub ec0bd5790f fix(login): respect branding themeMode for theme toggle, fix CSP (#11903)
Closes #11721

# Which Problems Are Solved

The login app now correctly handles the themeMode from branding
settings:

- Hide toggle when themeMode is LIGHT or DARK — the theme is forced,
users cannot switch
- Show 3-option toggle (light / system / dark) when themeMode is AUTO or
UNSPECIFIED

# How the Problems Are Solved

- Introduced a `BrandingContext` to pass `themeMode` from `ThemeWrapper`
down to `ThemeSwitch`

# Additional Changes

- removed the CSP from next.config.ts to prevent a precedency issue
where the CSP was actually not applied
2026-03-31 12:25:09 +00:00
604d5cb0a9 fix(login): prevent duplicate email-code verification issue (#11893)
<!--
Please inform yourself about the contribution guidelines on submitting a
PR here:
https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr.
Take note of how PR/commit titles should be written and replace the
template texts in the sections below. Don't remove any of the sections.
It is important that the commit history clearly shows what is changed
and why.
Important: By submitting a contribution you agree to the terms from our
Licensing Policy as described here:
https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions.
-->

# Which Problems Are Solved

- With Login V2 and EMAIL_VERIFICATION=true, opening the verify page
with send=true can trigger email code generation twice.
- The second code invalidates the first one, so users may receive two
emails where the first code is always invalid.
- This causes failed verification attempts and blocks onboarding for
affected users.

# How the Problems Are Solved

- Removed side-effectful email-code sending from direct server component
execution path.
- Ensured code sending is executed only once in a safe server-side flow,
so React Server Component re-fetches do not generate additional codes.
- Kept verify flow behavior intact while preventing duplicate code
invalidation.

# Additional Changes

- Added/updated logic around the verify flow to make repeated
render/re-fetch paths idempotent for email-code sending.
- Improved reliability of the Login V2 email verification step under App
Router navigation behavior.

# Additional Context

Fixes #11857
- Tested manually with Login V2 and EMAIL_VERIFICATION=true by
completing a new user registration flow to /verify?send=true.
- Verified that only one verification email is sent and the first
received code is valid (no duplicate invalidating code generated).
Related bug report with reproduction details:
[https://github.com/zitadel/zitadel/issues/11857](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html)

---------

Co-authored-by: Max Peintner <[email protected]>
2026-03-31 12:04:28 +00:00
Max PeintnerandGitHub 9bab764796 fix(login): add OIDC/SAML requestId to resend invite / resend email code (#11927)
# Which Problems Are Solved

This fixes an issue where resending a code for invite flow did not have
the same context it was initially created for

# How the Problems Are Solved

by passing down thre requestId, the context is preserved though a resend
2026-03-31 11:52:06 +02:00
ff4aae7b3f fix(login): improve error classification (#11926)
Closes #11923

# Which Problems Are Solved

Client-side gRPC errors (e.g. NotFound, InvalidArgument,
PermissionDenied) were being surfaced as HTTP 500 Internal Server
Errors, causing false SRE alerts and poor UI feedback.

# How the Problems Are Solved

- New transport interceptor (`error-classification.ts`): Automatically
enriches every ConnectError with httpStatus and isUserError metadata via
a `ClassifiedConnectError` wrapper
- Route handler protection (`route.ts`, `flow-initiation.ts`): Catches
classified errors from `getAuthRequest` / `getSAMLRequest` and returns
correct HTTP status codes instead of 500
- Type safety: Replaced all magic number error.code === 9 checks with
typed Code.FailedPrecondition + instanceof ConnectError across
`oidc.ts`, `saml.ts`, `password.ts`, `zitadel.ts`
- Classification-aware logging (`session.ts`): Client/user errors log at
warn level, server errors at error level
- Observability (`otel.ts`): Spans now include error.is_user_error and
http.status_code attributes for alert filtering

# Additional Changes

Gitignore `next-env.d.ts`: This file is auto-generated by Next.js on
every next dev and next build invocation. The two modes write slightly
different import paths (.next/dev/types/ vs .next/types/), which causes
git diff --exit-code to fail in CI whenever a developer runs next dev
locally before committing. Since Next.js regenerates it automatically,
there's no need to track it

---------

Co-authored-by: Ramon <[email protected]>
Co-authored-by: Copilot <[email protected]>
2026-03-31 11:20:56 +02:00
b145f1c85a docs: added documentation for jwt idp regarding callback uris (#11925)
# Which Problems Are Solved

The documentation did not reflect the difference between login v1 and v2
for configuring a JWT-idp

# How the Problems Are Solved

Added a warning in the docs which highlight that difference.

# Additional Changes

- Restructured the docs to reflect a more generic approach.
- Fixed indentation inside the `<Callout type="warning">` block so the
content renders as formatted text instead of a code block.
- Fixed inconsistent acronym casing in the use-case section: "jwt" →
"JWT" and "idp" → "IdP" to match the rest of the page and UI terms.

# Additional Context

- Closes: #11589

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
2026-03-30 10:23:42 +02:00
SilvanandGitHub 4bc899d052 docs: Improve README for local development and standardize tab usage (#11865)
## Problem statement

- `<Tabs>` were not rendered in docs
- Missing steps in README for local dev

## How it was solved

- Enhance the README to better describe local development setup and
clean up formatting.
- Standardize the use of tabs across various components for consistency.

## Additional info

To not cause merge conflicts with
https://github.com/zitadel/zitadel/pull/11729 changes in
`/self-hosting/manage/configure/configure.mdx` were skipped
2026-03-23 14:39:07 +00:00
70adaff793 feat: add option to use x.509 certificate system-api-user tokens (#11876)
# Which Problems Are Solved

System API users currently authenticate using raw RSA public keys
configured via Path or KeyData. This approach doesn't integrate well
with Kubernetes tooling.

# How the Problems Are Solved

Allow for the `path`/`keyData` to be an X.509 certificate. 

The `NotBefore` and `NotAfter` fields of the certificate are beeing
respected when validating the JWT.

# Additional Changes

# Additional Context

- Closes #11442

---------

Co-authored-by: Livio Spring <[email protected]>
2026-03-23 13:32:27 +00:00
Livio SpringandGitHub 85ce8c153b chore: ignore pre-release tags for version docs build (#11900)
# Which Problems Are Solved

For switching v4.x releases to a corresponding maintenance branch, we
had to trick semantic release and create a `5.0.0-base` tag on main.
This now breaks the docs build, which tries to fetch all tags and build
a corresponding version.

# How the Problems Are Solved

- Ignore pre-released tags/releases for the moment.

# Additional Changes

None

# Additional Context

- requires backport to v4.x
2026-03-23 14:15:23 +01:00
Mridang AgarwallaandGitHub 471ed4a5d7 feat: add DSN/URL connection string support for PostgreSQL and Redis (#11729) 2026-03-20 15:21:15 +00:00
Fabienne BühlerandGitHub a592fd7293 docs: update naming on authorizations requests to role assignments (#11850)
# Which Problems Are Solved

API Requests in the docs, still had old naming

# How the Problems Are Solved

Updated Authorization Reuqest naming in docs with role assignments
2026-03-19 09:45:21 +01:00
Federico CoppedeandGitHub ae32508225 docs: postgresql 18 warning (#11871)
Added a callout to the Kubernetes deployment guide (`Deploy ZITADEL on
Kubernetes`) explicitly stating that PostgreSQL 18 is not currently
supported, ensuring users deploy with a compatible version (14-17).
2026-03-18 12:23:16 -07:00
Federico CoppedeandGitHub 80a20e9680 docs: added link to sidebar title for benchmarks (#11870)
This PR adds a link to the benchmarks title on the sidebar
2026-03-18 15:29:53 +00:00