Commit Graph

4323 Commits

Author SHA1 Message Date
Stefan Benz
1a7cd6e1af feat: http provider signing key addition (#10641)
# Which Problems Are Solved

HTTP Request to HTTP providers for Email or SMS are not signed.

# How the Problems Are Solved

Add a Signing Key to the HTTP Provider resources, which is then used to
generate a header to sign the payload.

# Additional Changes

Additional tests for query side of the SMTP provider.

# Additional Context

Closes #10067

---------

Co-authored-by: Marco A. <marco@zitadel.com>
(cherry picked from commit 8909b9a2a6)
2025-09-15 08:26:41 +02:00
Tim Möhlmann
d2d94ea088 chore(deps): update to latest 1.24 go toolchain (#10667)
# Which Problems Are Solved

Update the Go toolchain to the latest bugfix release, so we include
latest security fixes in the standard library.

# How the Problems Are Solved

Set the toolchain directive to 1.24.7

# Additional Changes

- go mod tidy

# Additional Context

- https://go.dev/doc/devel/release#go1.24.0

Co-authored-by: Marco A. <marco@zitadel.com>

(cherry picked from commit 4440579f0a)
2025-09-15 08:26:21 +02:00
Gayathri Vijayan
3e678ceac0 feat(actionsv2): Propagate request headers in actions v2 (#10632)
# Which Problems Are Solved

This PR adds functionality to propagate request headers in actions v2.

# How the Problems Are Solved
The new functionality is added to the`ExecutionHandler` interceptors,
where the incoming request headers (from a list of allowed headers to be
forwarded) are set in the payload of the request before calling the
target.

# Additional Changes
This PR also contains minor fixes to the Actions V2 example docs.

# Additional Context
- Closes #9941

---------

Co-authored-by: Marco A. <marco@zitadel.com>
(cherry picked from commit 51e12e224d)
2025-09-15 08:23:50 +02:00
Marco A.
8cf623d5b5 feat: List users by metadata (#10415)
# Which Problems Are Solved

Some users have reported the need of retrieving users given a metadata
key, metadata value or both. This change introduces metadata search
filter on the `ListUsers()` endpoint to allow Zitadel users to search
for user records by metadata.

The changes affect only v2 APIs.

# How the Problems Are Solved

- Add new search filter to `ListUserRequest`: `MetaKey` and `MetaValue`
  - Add SQL indices on metadata key and metadata value
  - Update query to left join `user_metadata` table

# Additional Context

  - Closes #9053
  - Depends on https://github.com/zitadel/zitadel/pull/10567

---------

Co-authored-by: Silvan <27845747+adlerhurst@users.noreply.github.com>
Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>

(cherry picked from commit 8df402fb4f)
2025-09-15 08:22:53 +02:00
Gayathri Vijayan
d7f202d20f fix(project): include an option to add project members during project creation (#10654)
# Which Problems Are Solved
When a project is created by a user with only the `PROJECT_CREATOR`
role, they can no longer view/manage the created project. Although the
project is created, the user sees the following error: `No matching
permissions found (AUTH-3jknH)`. This is due to the
[removal](https://github.com/zitadel/zitadel/pull/9317) of
auto-assignment of the `PROJECT_OWNER` role when a project is newly
created.

# How the Problems Are Solved
By introducing optional fields in the CreateProject API to include a
list of users and a list of project member roles to be assigned to the
users. When there are no roles mentioned, the `PROJECT_OWNER` role is
assigned by default to all the users mentioned in the list.

# Additional Changes
N/A

# Additional Context
- Closes #10561 
- Closes #10592
- Should be backported as this issue is not specific to v4

---------

Co-authored-by: conblem <mail@conblem.me>
Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
Co-authored-by: Livio Spring <livio.a@gmail.com>
2025-09-12 09:16:49 +00:00
Stefan Benz
b892fc9b28 chore: move gofakeit integration testing calls (#10684)
# Which Problems Are Solved

Flakiness and conflicts in value from gofakeit.

# How the Problems Are Solved

Move Gofakeit calls to the integration package, to guarantee proper
usage and values for integration testing.

# Additional Changes

None

# Additional Context

None

(cherry picked from commit 492f1826ee)
2025-09-12 10:45:18 +02:00
Tim Möhlmann
78ded99017 perf: drop instance position index (#10626)
# Which Problems Are Solved

There was an left-behind index introduced to optimize the old and
removed event execution handler. The index confuses prostgres and it
sometimes picks this index in favor of the projection specific index.
This sometimes leads to bad query performance in the projectio handlers.

# How the Problems Are Solved

Drop the index

# Additional Changes

- none

# Additional Context

- Forgotten in https://github.com/zitadel/zitadel/pull/10564

(cherry picked from commit 54554b8fb9)
v4.1.4
2025-09-11 06:09:43 +02:00
Livio Spring
069861f3f7 fix(oidc): ignore invalid id_token_hints (#10682)
# Which Problems Are Solved

Invalid id_tokens used as `id_token_hint` on the authorization endpoints
currently return an error, resp. get display on the endpoint itself.

# How the Problems Are Solved

Ignore invalid id_token_hint errors and just log them.

# Additional Changes

None

# Additional Context

- closes https://github.com/zitadel/zitadel/issues/10673
- backport to v4.x

(cherry picked from commit e158f9447e)
2025-09-11 06:09:43 +02:00
Stefan Benz
268dd1d543 chore: fix org v2beta integration tests (#10655)
# Which Problems Are Solved

Flakiness in integration tests for organization v2beta service.

# How the Problems Are Solved

Fix eventual consistent handling of integration tests.

# Additional Changes

None

# Additional Context

None

---------

Co-authored-by: Marco A. <marco@zitadel.com>

(cherry picked from commit 75774eb64c)
v4.1.3
2025-09-08 14:55:36 +02:00
Tim Möhlmann
64bddb328c perf(cache): use redis unlink for key deletion (#10658)
# Which Problems Are Solved

The usage of the Redis `DEL` command showed blocking and slowdowns
during load-tests.

# How the Problems Are Solved

Use [`UNLINK`](https://redis.io/docs/latest/commands/UNLINK/) instead.

# Additional Changes

- none

# Additional Context

- closes https://github.com/zitadel/zitadel/issues/8930

(cherry picked from commit a06ae2c835)
2025-09-08 14:55:36 +02:00
Marco A.
5d3e01bb6e chore(dep): update zitadel SAML library (#10640)
# Which Problems Are Solved

The change partially addresses
https://github.com/zitadel/zitadel/issues/5630 , specifically the part
about "Order of SAML attributes are non-compliant".

# How the Problems Are Solved

  - Upgrade of the zitadel SAML library

# Additional Context

- Partially addresses #5630
- Depends on https://github.com/zitadel/saml/pull/106

(cherry picked from commit 8cc79c1376)
2025-09-08 14:55:36 +02:00
Livio Spring
1d0712b7eb fix(actions v2): send event_payload on event executions again (#10669)
# Which Problems Are Solved

It was noticed that on actions v2 when subscribing to events, the
webhook would always receive an empty `event_payload`:
```
{
    "aggregateID": "336494809936035843",
    "aggregateType": "user",
    "resourceOwner": "336392597046099971",
    "instanceID": "336392597046034435",
    "version": "v2",
    "sequence": 1,
    "event_type": "user.human.added",
    "created_at": "2025-09-05T08:55:36.156333Z",
    "userID": "336392597046755331",
    "event_payload":
    {}
}
```

The problem was due to using `json.Marshal` on the `Event` interface,
where the underlying `BaseEvent` prevents the data to be marshalled:

131f70db34/internal/eventstore/event_base.go (L38)

# How the Problems Are Solved

The `Event`s `Unmarshal` function is used with a `json.RawMessage`.

# Additional Changes

none

# Additional Context

- backport for v4.x
- relates to https://github.com/zitadel/zitadel/pull/10651
- relates to https://github.com/zitadel/zitadel/pull/10564
2025-09-08 14:38:55 +02:00
Ramon
72ca86e153 fix(console): Display MFA Name and Type correctly (#10586)
# Which Problems Are Solved
On the user detail page the mfa names and types where not displayed
correctly.

# How the Problems Are Solved
Switched to our internal TypeSafeCellDef and correctly parse the
@zitadel/proto types.

# Additional Context
- Closes #10493

Co-authored-by: Max Peintner <max@caos.ch>
(cherry picked from commit d9554d483c)
v4.1.2
2025-09-05 09:32:14 +02:00
Elio Bischof
50c667b4ec chore(workflow): temporarily use bigger runners (#10639)
# Which Problems Are Solved

Unit tests can pass again.

# How the Problems Are Solved

As we don't want to waist too much time on this, we just use runners
with bigger disks for now.
Probably we anyway use distributed task execution with Nx Cloud instead
of GitHub runners soon.

# Additional Context

Reverts zitadel/zitadel#9643
Reported internally
https://zitadel.slack.com/archives/C081HPPECKU/p1756470129164019
Failing Actions:
-
https://github.com/zitadel/zitadel/actions/runs/17323362823/job/49181555445?pr=10564
-
https://github.com/zitadel/zitadel/actions/runs/17435007449/job/49502354609?pr=10560#step:7:227

(cherry picked from commit c43164d7e2)
2025-09-05 09:30:48 +02:00
Livio Spring
b11f0f3e98 fix: enable ConsoleUseV2UserApi feature by default (#10631)
# Which Problems Are Solved

Starting with Zitadel v4, the new login UI is enabled by default (for
new instances) through the corresponding feature flag.
There's an additional flag to use the V2 API in console, which is mostly
required to use the login V2 without problems, but was not yet activated
by default (for new instances).

# How the Problems Are Solved

- Enabled the `ConsoleUseV2UserApi` feature flag on the
`defaultInstance`

# Additional Changes

- Cleaned up removed flags on the `defaultInstance`

# Additional Context

- noticed internally
- backport to v4.x

(cherry picked from commit 98bf8359c5)
2025-09-05 09:30:42 +02:00
Tim Möhlmann
a306c3db0f fix(cache): set version in instance by host (#10645)
# Which Problems Are Solved

We noticed a rapid growth of Redis memory usage. Instance By host did
not set the zitadel version, so instance entries got set on every
request again.

# How the Problems Are Solved

Set the version

# Additional Changes

- none

# Additional Context

- internal incident
2025-09-05 05:52:27 +00:00
Stefan Benz
2dba5fa7fc fix: permission check for actions v1 post creation user grants (#10638)
# Which Problems Are Solved

Unnecessary default permission check in creating an authorization fails
even if the functionality was called internally.

# How the Problems Are Solved

Move permission check to the proper implementation, so that necessary
permission checks are provided by the responsible API.

# Additional Changes

None

# Additional Context

Closes #10624

Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit bdefd9147f)
v4.1.1
2025-09-03 16:42:57 +02:00
Livio Spring
d5066237f9 fix: cleanup information in logs (#10634)
# Which Problems Are Solved

I noticed some outdated / misleading logs when starting zitadel:
- The `init-projections` were no longer in beta for a long time.
- The LRU auth request cache is disabled by default, which results in
the following message, which has caused confusion by customers:
```level=info msg="auth request cache disabled" error="must provide a positive size"```

# How the Problems Are Solved

- Removed the beta info
- Disable cache initialization if possible

# Additional Changes

None

# Additional Context

- noticed internally
- backport to v4.x

(cherry picked from commit a1ad87387d)
2025-09-03 16:42:47 +02:00
Max Peintner
e06dee2bc3 fix(login): integration tests failing due to React 19 SSR errors (#10613)
# Which Problems Are Solved

Integration tests were failing with Minified React error 419 caused by
React 19 Suspense boundary issues during server-side rendering (SSR) to
client-side rendering (CSR) transitions.

# How the Problems Are Solved

The fix handles infrastructure-level SSR errors gracefully while
maintaining proper error detection for actual application issues.

- Added Cypress error handling for React 19 SSR hydration errors that
don't affect functionality

# Additional Changes

Enhanced Next.js configuration with React 19 compatibility
optimizations:
- `optimizePackageImports`: @radix-ui/react-tooltip and @heroicons/react
can have large bundle sizes if not optimized. Such packages are
suggested to be optimized in
https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports
- `poweredByHeader`: Not that important. Benefits are smaller HTTP
headers, Tiny bandwidth savings, and more professional appearance due to
cleaner response headers, added it as a "security best practice".

# Additional Context

- Replaces #10611

(cherry picked from commit adaa6a8de6)
2025-09-03 16:41:59 +02:00
Livio Spring
51b8ef989e chore: remove login-integration-test as release requirement v4.1.0 2025-09-01 13:48:00 +02:00
Zach Hirschtritt
6d19be174b fix: correct river otel metrics units (#10425)
# Which Problems Are Solved

The
[otelriver](https://github.com/riverqueue/rivercontrib/tree/master/otelriver)
package uses default otel histogram buckets that are designed for
millisecond measurements. OTEL docs also suggest standardizing on using
seconds as the measurement unit. However, the default buckets from
opentelemetry-go are more or less useless when used with seconds as the
smallest measurement is 5 seconds and the largest is nearly 3 hours.
Example:
```
river_work_duration_histogram_seconds_bucket{attempt="1",kind="notification_request",otel_scope_name="github.com/riverqueue/rivercontrib/otelriver",otel_scope_version="",priority="1",queue="notification",status="ok",tag="[]",le="0"} 0
river_work_duration_histogram_seconds_bucket{attempt="1",kind="notification_request",otel_scope_name="github.com/riverqueue/rivercontrib/otelriver",otel_scope_version="",priority="1",queue="notification",status="ok",tag="[]",le="5"} 1144
river_work_duration_histogram_seconds_bucket{attempt="1",kind="notification_request",otel_scope_name="github.com/riverqueue/rivercontrib/otelriver",otel_scope_version="",priority="1",queue="notification",status="ok",tag="[]",le="10"} 1144
<...more buckets here...>
river_work_duration_histogram_seconds_bucket{attempt="1",kind="notification_request",otel_scope_name="github.com/riverqueue/rivercontrib/otelriver",otel_scope_version="",priority="1",queue="notification",status="ok",tag="[]",le="7500"} 1144
river_work_duration_histogram_seconds_bucket{attempt="1",kind="notification_request",otel_scope_name="github.com/riverqueue/rivercontrib/otelriver",otel_scope_version="",priority="1",queue="notification",status="ok",tag="[]",le="10000"} 1144
river_work_duration_histogram_seconds_bucket{attempt="1",kind="notification_request",otel_scope_name="github.com/riverqueue/rivercontrib/otelriver",otel_scope_version="",priority="1",queue="notification",status="ok",tag="[]",le="+Inf"} 1144
```

# How the Problems Are Solved

Change the default unit to "ms" from "s" as supported by the middleware
API:
https://riverqueue.com/docs/open-telemetry#list-of-middleware-options

# Additional Changes

None

# Additional Context

None

Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
(cherry picked from commit fcdc598320)
2025-09-01 13:10:52 +02:00
Livio Spring
794ab407a2 chore(integration test): prevent eventual consistency issue in TestServer_Limits_AuditLogRetention (#10608)
# Which Problems Are Solved

The TestServer_Limits_AuditLogRetention is too reliant on time
constraints when checking that a limit is correctly applied. IN case it
takes to long to do all the preparation, there won't be any events to
read and the test will fail.

# How the Problems Are Solved

Don't require any events to be returned.

# Additional Changes

None

# Additional Context

- Noted a lot of pipeline to fail on this step.
- requires backport to at least v4.x

(cherry picked from commit 8574d6fbab)
2025-09-01 13:10:45 +02:00
Ramon
e65aac7112 fix(console): Timestamp to date Pipe type coercion (#10588)
# Which Problems Are Solved
Correctly display timestamps even if the seconds or nanos property is 0.

# How the Problems Are Solved
Instead of relying on javascript type coercion correctly check explictly
for undefined.

# Additional Changes

Use TypeSafeCellDefModule in personal-access-tokens component.

# Additional Context

- Closes #10032

Co-authored-by: Max Peintner <max@caos.ch>
Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit 93fd27aebe)
2025-09-01 08:16:57 +02:00
Tim Möhlmann
2727fa719d perf(actionsv2): execution target router (#10564)
# Which Problems Are Solved

The event execution system currently uses a projection handler that
subscribes to and processes all events for all instances. This creates a
high static cost because the system over-fetches event data, handling
many events that are not needed by most instances. This inefficiency is
also reflected in high "rows returned" metrics in the database.

# How the Problems Are Solved

Eliminate the use of a project handler. Instead, events for which
"execution targets" are defined, are directly pushed to the queue by the
eventstore. A Router is populated in the Instance object in the authz
middleware.

- By joining the execution targets to the instance, no additional
queries are needed anymore.
- As part of the instance object, execution targets are now cached as
well.
- Events are queued within the same transaction, giving transactional
guarantees on delivery.
- Uses the "insert many fast` variant of River. Multiple jobs are queued
in a single round-trip to the database.
- Fix compatibility with PostgreSQL 15

# Additional Changes

- The signing key was stored as plain-text in the river job payload in
the DB. This violated our [Secrets
Storage](https://zitadel.com/docs/concepts/architecture/secrets#secrets-storage)
principle. This change removed the field and only uses the encrypted
version of the signing key.
- Fixed the target ordering from descending to ascending.
- Some minor linter warnings on the use of `io.WriteString()`.

# Additional Context

- Introduced in https://github.com/zitadel/zitadel/pull/9249
- Closes https://github.com/zitadel/zitadel/issues/10553
- Closes https://github.com/zitadel/zitadel/issues/9832
- Closes https://github.com/zitadel/zitadel/issues/10372
- Closes https://github.com/zitadel/zitadel/issues/10492

---------

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
(cherry picked from commit a9ebc06c77)
2025-09-01 08:16:52 +02:00
Stefan Benz
d0d8e904c4 chore: use integration package for name generation (#10591)
# Which Problems Are Solved

Integration test failed sometimes with `organization already
exists`-errors.

# How the Problems Are Solved

Use a consistent function to generate name used for organization
creation.

# Additional Changes

Correct a eventual consistent test for username around organization
domain changes with eventual consistent loop.

# Additional Context

None

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>

(cherry picked from commit 5721b63bcb)
2025-08-29 15:09:31 +02:00
Adam Kida
678f9ad448 feat(typescript): add i18n for input labels in Login V2 (#10233)
# Which Problems Are Solved

- Most inputs have hardcoded label

# How the Problems Are Solved

- add usage of i18n library for every label
- add labels to i18n translation files

# Additional Changes

- fixed key used in `device-code-form.tsx` by submit button
- `v2-default.json` was update and contains all values from login app
not only newly added key for labels.

# Additional Context

N.A

---------

Co-authored-by: David Skewis <david@zitadel.com>
Co-authored-by: Max Peintner <max@caos.ch>
(cherry picked from commit 832e78f9bc)
2025-08-29 13:18:05 +02:00
JimmyKmi
73d6cc71f3 chore(i18n): Completion Chinese translation (#10109)
# Which Problems Are Solved

- Inconsistencies in the terminology used for "身份认证提供商" (identity
provider) and "身份认证提供者" (identity supplier) in the Chinese translation
files could lead to confusion among users.
- Missing translations for terminology related to identity providers
could hinder user experience and understanding.

# How the Problems Are Solved

- Unified the terms "身份认证提供商" and "身份认证提供者" to consistently use
"身份认证提供者" across all Chinese translation files.
- Added necessary translations to ensure that all relevant terms related
to identity providers are accurately represented in the Chinese
localization.

# Additional Changes

- Improved overall readability and clarity in the Chinese translations
by ensuring consistent terminology for identity-related phrases
throughout the application.
- Complete the missing translations.

# Additional Context

If I have missed any translations, please point them out, and I would be
happy to complete them.

---------

Co-authored-by: Florian Forster <florian@zitadel.com>
(cherry picked from commit 6d0b7ed2aa)
2025-08-29 13:17:57 +02:00
Stefan Benz
e4517cf15a fix: correctly handle user grants on project grant to same organization (#10568)
# Which Problems Are Solved

Authorizations (aka user grants) could not be managed correctly if they
were created on a project grant, which itself was based on a project
granted to the own organization. The error persisted if the
corresponding (potentially unintended) project grant was removed again.

# How the Problems Are Solved

Fixed checks for managing user grants: Roles from projects and project
grants get handled individually to ensure cases like project grants on
the own organization.

# Additional Changes

Additional tests for the 3 failing scenarios.

# Additional Context

Closes #10556

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit 8e60cce20d)
2025-08-29 13:17:55 +02:00
Noah van der Aa
9adad407ae fix: Fix typo in keyboard shortcuts popup (#10581)
# Which Problems Are Solved

There is a typo in the keyboard shortcuts popup that adds an extra I to
the word instance.

# How the Problems Are Solved

Removed the extra I.

(cherry picked from commit cccba3f8f3)
2025-08-29 13:17:48 +02:00
Thomas Mills
50618f134a fix(translation): en - correct itegrate to integrate (#10367)
# Which Problems Are Solved

In the text shown on the Actions page in the console, 'integrate' is
mistyped as 'itegrate'.

<img width="1235" height="327" alt="image"
src="https://github.com/user-attachments/assets/bd1e8fc2-70bf-4ede-86fa-cc75647ec379"
/>

# How the Problems Are Solved

Spelling corrected to 'integrate'

<img width="1216" height="334" alt="image"
src="https://github.com/user-attachments/assets/68cbe20e-6b9c-4a4c-8c42-a84398ed994d"
/>

# Additional Changes

None

# Additional Context

None

Co-authored-by: Max Peintner <max@caos.ch>
Co-authored-by: Marco A. <marco@zitadel.com>
(cherry picked from commit 1d4e16a7e5)
2025-08-28 09:23:07 +02:00
Marco A.
df0f033880 chore: move converter methods users v2 to separate converter package + add tests (#10567)
# Which Problems Are Solved

As requested by @adlerhurst in
https://github.com/zitadel/zitadel/pull/10415#discussion_r2298087711 , I
am moving the refactoring of v2 user converter methods to a separate PR

# How the Problems Are Solved

Cherry-pick 648c234caf

# Additional Context

Parent of https://github.com/zitadel/zitadel/pull/10415

(cherry picked from commit b604615cab)
2025-08-28 09:23:04 +02:00
Gayathri Vijayan
a3dac4d5cd feat(saml): add SignatureMethod config for SAML IDP (#10520)
# Which Problems Are Solved
When a SAML IDP is created, the signing algorithm defaults to
`RSA-SHA1`.
This PR adds the functionality to configure the signing algorithm while
creating or updating a SAML IDP. When nothing is specified, `RSA-SHA1`
is the default.

Available options:
* RSA_SHA1
* RSA_SHA256
* RSA_SHA512

# How the Problems Are Solved

By introducing a new optional config to specify the Signing Algorithm.

# Additional Changes
N/A

# Additional Context
- Closes #9842

An existing bug in the UpdateSAMLProvider API will be fixed as a
followup in a different
[PR](https://github.com/zitadel/zitadel/pull/10557).

---------

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
(cherry picked from commit 255d42da65)
2025-08-28 09:22:59 +02:00
Max Peintner
39c76a94a8 fix(login): CSP img-src to allow instance assets (#10579)
Fix CSP img-src to allow ZITADEL instance assets

# Which Problems Are Solved

Login app was failing to load images (logos, branding assets) from
ZITADEL instances due to Content Security Policy restrictions. The CSP
img-src directive only allowed 'self' and https://vercel.com, blocking
images from ZITADEL domains like https://login-*.zitadel.app.

# How the Problems Are Solved

- Dynamic CSP configuration: Extract hostname from ZITADEL_API_URL
environment variable
- Fallback support: Use *.zitadel.cloud wildcard when no specific URL is
configured
- Environment-aware: Works across dev/staging/prod without hardcoded
domains

(cherry picked from commit 6699a6f966)
2025-08-28 09:22:56 +02:00
Max Peintner
fe96299b8f fix(console): Improve SAML SP form typing (#10557)
This PR fixes a problem for the SAML provider in console where the
binding selection was not correctly applied when editing existing
providers

# Which Problems Are Solved

- SAML provider binding selection was not correctly applied when editing
existing providers
- Form used untyped reactive forms leading to potential runtime errors
- Hardcoded enum handling made the code fragile to API changes

# How the Problems Are Solved

- Created reusable utility functions (enum.utils.ts) that properly
convert between numeric enum values (from backend) and string keys (for
form controls)
- Improved type safety: Migrated from
UntypedFormGroup/UntypedFormControl to strongly typed
FormGroup<SAMLProviderForm> with FormControl<T>

(cherry picked from commit b6a2b7c70e)
2025-08-28 09:22:52 +02:00
Stefan Benz
ce00cf22db fix: define base uri for login v2 feature as string to make it config… (#10533)
…urable

# Which Problems Are Solved

BaseURI defined in environment variables or configuration files was
ignored for Login v2 feature flag.

# How the Problems Are Solved

Define BaseURI as string so that the environment variables and
configuration files can be parsed into it.

# Additional Changes

None

# Additional Context

Closes #10405

(cherry picked from commit 2a78fdfe1f)
2025-08-28 09:22:18 +02:00
Stefan Benz
1625e5f7bc fix: configure default url templates (#10416)
# Which Problems Are Solved

Emails are still send only with URLs to login v1.

# How the Problems Are Solved

Add configuration for URLs as URL templates, so that links can point at
Login v2.

# Additional Changes

None

# Additional Context

Closes #10236

---------

Co-authored-by: Marco A. <marco@zitadel.com>
(cherry picked from commit 0a14c01412)
2025-08-28 09:22:18 +02:00
Iraq
e06df6e161 chore(docker-integration-postgres): adding volume to internal/integration/config/docker-compose.yaml (#10079)
# Which Problems Are Solved

This change makes it easier to delete the integration database

# How the Problems Are Solved

Gives the integration database a volume you can address via name

`docker volume rm config_zitadel_integration_db`

(cherry picked from commit 2718d345b8)
2025-08-28 09:22:17 +02:00
Livio Spring
1f6a1b3061 fix(service ping): improve systemID search query to use index (#10566)
# Which Problems Are Solved

We noticed that the startup for v4 was way slower than v3. A query
without an instanceID filter could be traced back to the systemID query
of the service ping.

# How the Problems Are Solved

A an empty instanceID to the query to ensure it used an appropriate
index.

# Additional Changes

None

# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/10390
- backport to v4.x

(cherry picked from commit 9621d357c0)
2025-08-28 09:22:16 +02:00
Mridang Agarwalla
c9c88be44e docs: added docs for the new node client library (#10563)
# Which Problems Are Solved

The recently released NodeJS client libraries were missing
documentation, which made it difficult for developers to understand and
use the new features.

# How the Problems Are Solved

This pull request introduces the necessary documentation for the new
NodeJS client library, covering their installation and basic usage.

# Additional Changes

None.

# Additional Context

This documentation supports the recent client library release.

---------

Co-authored-by: Max Peintner <max@caos.ch>
(cherry picked from commit 20a213a3f2)
2025-08-28 09:22:15 +02:00
Nils
5c88576c9e fix(loginV2): Disable image optimization (#10508)
<!--
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

Next.js's Image Optimization feature requires that hostnames for remote
images be explicitly defined in the `next.config.js` file via
`remotePatterns`. This configuration is static and evaluated at **build
time**.

However, the `ZITADEL_API_URL`, which is supposed to be used for
additional whitelisted hostnames, is a dynamic environment variable only
known at **run time**. This creates a fundamental conflict, making it
impossible to add the user-provided URL to the configuration when
building the public Docker image. Consequently, images like instance
logos fail to load.

The existing workaround uses a permissive wildcard pattern
(`*.zitadel.*`). This is a significant security risk, as it could allow
malicious actors to abuse the server as an open image-resizing proxy,
leading to potential denial-of-service (DDoS) attacks or excessive
costs.

# How the Problems Are Solved

This change disables the Next.js Image Optimization feature entirely by
setting `unoptimized: true` in the `images` configuration.

By doing this, Next.js will no longer attempt to optimize, cache, or
validate remote image sources. Instead, it will pass the original image
URL directly to the client. This approach resolves the issue by:

1. **Eliminating the need for `remotePatterns`**, which bypasses the
build-time vs. run-time configuration conflict.
2. **Improving security** by removing the overly permissive wildcard
pattern.
3.  **Ensuring functionality**, as remote images now load correctly.

The trade-off is the loss of performance benefits from Next.js image
optimization, but I see this as an acceptable compromise to restore
essential functionality and secure the application.

Fixes #10456

Co-authored-by: Max Peintner <max@caos.ch>
(cherry picked from commit 7a9cc5c456)
2025-08-25 16:04:57 +02:00
Max Peintner
d350db0a01 fix(login): add email verification check before callback (#10516)
Closes https://github.com/zitadel/typescript/issues/539

This PR adds an additional email verification check before completing an
auth flow, if the environment configuration `EMAIL_VERIFICATION` asks
for it.

# Which Problems Are Solved

https://github.com/zitadel/typescript/issues/539

# How the Problems Are Solved

Adds an additional check before completing an auth flow

(cherry picked from commit b23c0bc6ad)
2025-08-25 15:20:34 +02:00
Livio Spring
f9581909df docs(api): set base uri for connectRPC endpoints (#10536)
# Which Problems Are Solved

connectRPC based endpoints were missing the baseURI leading to wrongly
displayed endpoints in case you last visited anV1 API endpoint, e.g.
after visiting Search Project Grants on the Management API, the endpoint
for ListProjectGrants on the project service would be display as

`https://$CUSTOM-DOMAIN/management/v1/zitadel.project.v2beta.ProjectService/ListProjectGrants
` instead of

`https://$CUSTOM-DOMAIN/zitadel.project.v2beta.ProjectService/ListProjectGrants`

# How the Problems Are Solved

Set the base path / server for the connectRPC calls.

# Additional Changes

None

# Additional Context

- closes #10532

(cherry picked from commit 89221fa402)
2025-08-25 15:18:21 +02:00
Federico Coppede
90d67a42cf docs: update status page URL (#10528)
old status page URL: status.zitadel.com
new status page URL: zitadelstatus.com

Co-authored-by: Florian Forster <florian@zitadel.com>
(cherry picked from commit 756f81534a)
2025-08-25 15:18:19 +02:00
Maximilian
4ac7551266 docs: Update technical advisory links (#10538)
<!--
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

Links to technical advisories were broken.

# How the Problems Are Solved

* Update links in docs
* Add TA to our newsletter subscription form
* Update website to link to the subscription form

(cherry picked from commit 75fe4eb651)
2025-08-25 15:18:15 +02:00
Elio Bischof
e401dee229 docs: improve compose example (#10518)
# Which Problems Are Solved

The [compose deployment
example](https://zitadel.com/docs/self-hosting/deploy/compose) has
improved guidance and a more robust compose configuration. It provides
clear paths to a variety of target environments.

# How the Problems Are Solved

- The introduction sentences make clear that the setup is not intended
to be used as is in production.
- Info blocks are removed as they rather increased the mental overhead
instead of drawing attention to important hints.
- The What's next section adds links and hints that help evolving the
setup towards production.
- The docker-compose.yaml explains variables better, gives hints and
provides configuration examples.
- The root user is used to write and read the `login-client.pat` file to
avoid file permission errors and failing setup steps.
- The postgres data is persisted in a named volume, so it survives the
PostgreSQL container lifecycle.
- `curl` is used instead of `wget`, because `curl` is more likely to
already be installed on hosts.

# Additional Context

- Closes #10432
- Closes #8910
- Implements changes proposed
[here](https://github.com/zitadel/zitadel/issues/10432#issuecomment-3188569674)
and
[here](https://github.com/zitadel/zitadel/issues/10432#issuecomment-3191360487).

To test the changes, you can't download the compose file as suggested
[by the preview
doc](https://docs-nuzruxtoh-zitadel.vercel.app/docs/self-hosting/deploy/compose).
As the updated compose file is not merged to main yet, you have to use a
different download link:

```shell
curl -L https://raw.githubusercontent.com/zitadel/zitadel/improve-compose-example/docs/docs/self-hosting/deploy/docker-compose.yaml -o docker-compose.yaml
```

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
(cherry picked from commit 473c33754f)
2025-08-25 15:18:12 +02:00
Stefan Benz
8adc205477 docs: add traditional flag to openssl genrsa (#10524)
# Which Problems Are Solved

Zitadel tools expects a PKCS1 key, but OpenSSL provides a PKCS8 key.

# How the Problems Are Solved

Add `-traditional` to the documentation OpenSSL command, to generate a
PKCS1 key.

# Additional Changes

None

# Additional Context

Closes #7268

(cherry picked from commit ef799b9a7e)
2025-08-25 15:18:10 +02:00
Matías Racedo
40d8f1fe00 docs: SCIM provisioning from Okta to ZITADEL (#10437)
Adds a step-by-step guide for configuring SCIM provisioning from Okta
into ZITADEL using a service user with the Org User Manager role,
including authentication options and SCIM endpoint details.

---------

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
(cherry picked from commit 2abcec00e8)
2025-08-25 15:18:07 +02:00
Rajat Singh
2a0441b9b9 docs: remove old keycloak guide (#10483)
̶r̶e̶m̶o̶v̶e̶ ̶o̶l̶d̶ ̶k̶e̶y̶c̶l̶o̶a̶k̶ ̶g̶u̶i̶d̶e̶
̶h̶t̶t̶p̶s̶:̶/̶/̶z̶i̶t̶a̶d̶e̶l̶.̶c̶o̶m̶/̶d̶o̶c̶s̶/̶g̶u̶i̶d̶e̶s̶/̶m̶i̶g̶r̶a̶t̶e̶/̶s̶o̶u̶r̶c̶e̶s̶/̶k̶e̶y̶c̶l̶o̶a̶k̶
̶n̶e̶w̶ ̶o̶n̶e̶ ̶e̶x̶i̶s̶t̶s̶
̶h̶t̶t̶p̶s̶:̶/̶/̶z̶i̶t̶a̶d̶e̶l̶.̶c̶o̶m̶/̶d̶o̶c̶s̶/̶g̶u̶i̶d̶e̶s̶/̶m̶i̶g̶r̶a̶t̶e̶/̶s̶o̶u̶r̶c̶e̶s̶/̶k̶e̶y̶c̶l̶o̶a̶k̶-̶g̶u̶i̶d̶e̶

---------

Signed-off-by: Rajat Singh <rajat@zitadel.com>
Co-authored-by: Rajat Singh <rajat@zitadel.com>
(cherry picked from commit 5e1f0d7e3e)
2025-08-25 15:18:03 +02:00
Federico Coppede
0043db5a8a docs(guides): updated support instructions and screenshots (#10521)
Since the support form is deployed in the customer portal I updated the
instructions and screenshots.

---------

Co-authored-by: Maximilian <mpa@zitadel.com>
(cherry picked from commit 763825cd2c)
2025-08-25 15:18:02 +02:00
Silvan
539a9661c5 docs: benchmarks for v4 (#10360)
Introduce benchmark documentation and results for various endpoints in
the Zitadel v4 release, including performance metrics and test
configurations.

(cherry picked from commit 9a799a7c7b)
2025-08-25 15:17:59 +02:00