Commit Graph

4356 Commits

Author SHA1 Message Date
Livio Spring
bd995b0b48 feat(api): move application service v2beta to GA (and deprecate v2beta) (#10846)
# Which Problems Are Solved

As part of our efforts to simplify the structure and versions of our
APIs, were moving all existing v2beta endpoints to v2 and deprecate
them. They will be removed in Zitadel V5.

# How the Problems Are Solved

- This PR moves app v2beta service and its endpoints to a corresponding
to application v2 version. The v2beta service and endpoints are
deprecated.
- The comments and have been improved and, where not already done, moved
from swagger annotations to proto.
- All required fields have been marked with (google.api.field_behavior)
= REQUIRED and validation rules have been added where missing.
- Name ID of the application always `application_id`, previously was
also `id` and `app_id`.
- Get rid of all `app` abbreviations and name it `application` including
the service name, `AppState` -> `ApplicationState` and `AppSorting` ->
`ApplicationSorting`
- Updated `CreateApplicationRequest`:
- renamed `creation_request_type` to `application_type` and all its
options to `XY_configuration` instead of `XY_request`
- `RegenerateClientSecret`
  - renamed method to `GenerateClientSecret`
  - removed `app_type` from request
- `ListApplicationRequest`:
  - removed required `project_id` and provided it as a filter
- Type `ApplicationNameQuery` has been renamed to
`ApplicationNameFilter` as its usage in the request
- Renamed all fields and types from `config` to `configuration`
- Updated `DeleteApplicationKeyRequest`
  - removed `organization_id`
- Updated `GetApplicationKeyRequest`:
  - removed `project_id`, `application_id` and `organization_id``
- Updated `ListApplicationKeysRequest`:
  - removed oneOf `resource_id` and moved the options into filters
- Name ID of the application key always `key_id`.
- removed unnecessary package prefixed (`zitadel.application.v2`)
- formatted using `buf`

# Additional Changes

None

# Additional Context

- part of https://github.com/zitadel/zitadel/issues/10772
- requires backport to v4.x

(cherry picked from commit 0281670030)
2025-10-27 08:56:27 +01:00
Maximilian
c318194b66 chore(ux): Change wording for project / application settings (#10775)
<!--
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

Close #10623: The terms, language, and spelling used on the project and
application settings for receiving roles is unnecessarily complicated or
wrong.

# How the Problems Are Solved

Update Settings in English. Translations are currently not considered.

# Additional Changes

Align proto documentation

# Additional Context

(cherry picked from commit 7e11f7a032)
2025-10-27 08:56:21 +01:00
Livio Spring
366fe3fd5b feat(api): move internal permission service to GA (and deprecate v2beta) (#10898)
# Which Problems Are Solved

As part of our efforts to simplify the structure and versions of our
APIs, were moving all existing v2beta endpoints to v2 and deprecate
them. They will be removed in Zitadel V5.

# How the Problems Are Solved

- This PR moves the internal permission v2beta service and its endpoints
to a corresponding v2 version. The v2beta service and endpoints are
deprecated.
- The docs are moved to the new GA service and its endpoints. The v2beta
is not displayed anymore.
- The comments and have been improved and, where not already done, moved
from swagger annotations to proto.
- All required fields have been marked with (google.api.field_behavior)
= REQUIRED and validation rules have been added where missing.
- Listing administrators of a project grant can now be done with the
`ProjectGrant` (`project_id` and `organization_id`) instead of a
`project_id`, which corresponds to creation of the administrator ship of
such grant.
- formatted using `buf`

# Additional Changes

None

# Additional Context

- part of https://github.com/zitadel/zitadel/issues/10772
- requires backport to v4.x

---------

Co-authored-by: Gayathri Vijayan <66356931+grvijayan@users.noreply.github.com>
(cherry picked from commit 0f2a349ec1)
2025-10-27 08:55:55 +01:00
Livio Spring
53f51fc4ab fix(api): deprecate v2beta endpoints of existing v2 services (#10841)
# Which Problems Are Solved

As part of our efforts to simplify the structure and versions of our
APIs, were moving all existing v2beta endpoints to v2 and deprecate
them. They will be removed in Zitadel V5.

# How the Problems Are Solved

- This PR deprecates all v2beta service and their endpoints, which have
already a corresponding v2 version and should not be used anymore.
- The comments and have been improved and, where not already done, moved
from swagger annotations to proto.
- All required fields have been marked with `(google.api.field_behavior)
= REQUIRED` and validation rules have been added where missing.
- Removed the "required flag" comments on the Action and WebKey service
endpoints, since they were removed in Zitadel v4.
- The `SetSession` endpoint already documented that the token does not
have to be provided anymore and will be ignored if still sent, but it
was actually still checked if provided. The corresponding check has been
removed and the field is now properly deprecated in the proto as well.

# Additional Changes

None

# Additional Context

- part of #10772
- requires backport to v4.x

(cherry picked from commit e25b21a6a4)
2025-10-27 08:55:28 +01:00
Oskar
e19579de36 chore: change prepareUserAuthMethodTypesQuery log level (#10813)
# Which Problems Are Solved

During normal operations, when listing authentication method types,
activated IDPs are added to the `userAuthMethodTypes` slice but there's
an error in the logs, causing false alarms in our alerting system which
has been configured to trigger on error-level logs:
```
{
    "logDate": "2025-09-29T07:47:49.524794306Z",
    "protocol": 0,
    "requestUrl": "/zitadel.user.v2.UserService/ListAuthenticationMethodTypes",
    "responseStatus": 0,
    "requestHeaders": {
        "authorization": [
            "[REDACTED]"
        ],
        "content-type": [
            "application/grpc+proto"
        ],
        "grpc-accept-encoding": [
            "gzip,br"
        ],
        "host": [
            "zitadel.example.com"
        ],
        "te": [
            "trailers"
        ],
        "user-agent": [
            "connect-es/2.0.4"
        ]
    },
    "responseHeaders": {},
    "instanceId": "329151080840616127",
    "projectId": "329851980840157809",
    "requestedDomain": "zitadel.example.com",
    "requestedHost": "zitadel.example.com"
}

{
    "caller": "/home/runner/work/zitadel/zitadel/internal/query/user_auth_method.go:478",
    "level": "error",
    "msg": "IDP1",
    "time": "2025-09-29T07:47:49Z"
}
```

# How the Problems Are Solved

The log was changed to debug level and the log text was updated to
better describe what is happening.

Another possible solution would be to remove the log line completely.
Reviewers can decide if this is a better solution.

# Additional Changes

None.

# Additional Context

None.

Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit 812641ee9c)
2025-10-27 08:46:34 +01:00
Surya
70800c5a44 fix(auth): allow LDAP sign-in with special characters (#10798) (#10857)
# Which Problems Are Solved
- Users were unable to sign in via LDAP when their password contained
special characters (%, #, &), because URI validation rejected valid
credentials #10798
- This occurs specifically when using a custom login implementation for
LDAP authentication during the LDAP user intent flow.

# How the Problems Are Solved
Removed the URI validation from LDAP password handling, allowing all
special characters.

# Additional Changes
- Applied changes in v2 and v2beta LDAP flows.
- Verified other authentication flows remain unaffected.

# Additional Context
- Closes #10798

(cherry picked from commit 785512ea8b)
2025-10-27 08:46:22 +01:00
Elio Bischof
06f9270605 chore: cleanup .releaserc.js (#10957)
# Which Problems Are Solved

For testing purposes, we modified the .reseaserc.js. The test relevant
changes are reverted.

# How the Problems Are Solved

- The test branch is removed from the branches array.
- The default releaseBodyTemplate value is used again.

# Additional Context

- Cleanup for #10956

(cherry picked from commit 8693de8170)
2025-10-27 08:45:55 +01:00
Elio Bischof
ec91be8725 chore: release tarballs (#10956)
# Which Problems Are Solved

This PR makes sure that the tarballs containing the API binary and the
standalone login are separately downloadable from the release pages
again.

# How the Problems Are Solved

Because the `Pack` workflow uploads a single GitHub artifact containing
all tarballs since #10571, we download this artifact so that it
correctly unpacks into the correct folder structure configured in
`.releaserc.js`

The changes are tested [with this action
run](https://github.com/eliobischof/zitadel/actions/runs/18745783976),
which [created this
release](https://github.com/eliobischof/zitadel/releases/tag/v1.0.0-release-archives.5).

# Additional Changes

- The term `standalone` is removed from the login tarball, as it should
be clear that it is a standalone build.
- The go builds and the login archiving are less verbose
- The pipelines go versions are pinned to *v1.25*, a minor above the
minimally required go version *v1.24.0* described in the go.mod file.
This makes sure that we build using newer patches for security and
performance.

# Additional Context

- The archives weren't published anymore since #10571
- Closes #10896

---------

Co-authored-by: Silvan <27845747+adlerhurst@users.noreply.github.com>
(cherry picked from commit b080ed8884)
2025-10-27 08:45:38 +01:00
Silvan
4c82d728f4 fix(assets-api): Add error handling for missing file paths (#10938)
(cherry picked from commit e7b841a874)
2025-10-27 08:45:13 +01:00
Max Peintner
d4fec7ebaf fix(login): send invite codes only for users with unverified email (#10943)
# Which Problems Are Solved

When a user with no authentication methods attempted to log in, the
system always set `invite=true` in the verification flow, regardless of
whether their email was already verified. This could cause errors when
trying to send invite codes to already initialized users.

# How the Problems Are Solved

Added conditional logic to determine whether to send an invite code
based on the user's email verification status:

This prevents errors when attempting to send invite codes to users who
have already verified their email and been initialized, while still
properly handling new users who need invitation flows.

(cherry picked from commit d10be4c09a)
2025-10-27 08:44:39 +01:00
Yann Soubeyrand
aa8c02b189 fix(oidc): accept localhost redirect URIs without path nor port (#10836)
# Which Problems Are Solved

Some native OIDC applications use localhost without a path as redirect
URI. Currently, setting `http://localhost` as a redirect URI leads to a
compliance warning (`Redirect URIs must begin with your own protocol,
http://127.0.0.1, http://[::1] or http://localhost.`), while
`http://localhost/some/path` and `http://localhost:some-port` are
accepted).

# How the Problems Are Solved

This PR adds additional checks to accept `http://localhost`,
`http://127.0.0.1`, `http://[::1]` and `http://[0:0:0:0:0:0:0:1]` (their
counterpart with port and with path were already accepted).

---------

Co-authored-by: Marco Ardizzone <marco@zitadel.com>
(cherry picked from commit 88213d785a)
2025-10-27 08:44:25 +01:00
Max Peintner
11a35f4ef4 fix(login): fallback for idp login (#10876)
Closes #10671

# Which Problems Are Solved

Users with password authentication disabled in their organization were
seeing "Username Password not allowed!" error instead of being
redirected to their organization's configured Identity Provider. This
affected domain discovery and multi-tenancy use cases in Login V2.

# How the Problems Are Solved

- Updated `redirectUserToIDP` to accept optional `userId` and
`organization` parameters
- Added fallback logic to check organization-level IDPs via
`getActiveIdentityProviders`
- Updated all call sites to pass appropriate organization context
- Added test coverage for the fallback behavior

# Additional Changes

- Consolidated duplicate logic by removing
`redirectUserToSingleIDPIfAvailable` function, which is now handled by
the unified `redirectUserToIDP` function
- improved error handling on verification page

---------

Co-authored-by: Ramon <mail@conblem.me>
(cherry picked from commit ff869482b1)
2025-10-27 08:44:11 +01:00
Max Peintner
b94c7845a1 fix(login): Add Organization Scoping to IDP Auto-Linking (#10931)
This PR fixes an issue in the IDP auto-linking feature where user
searches were performed globally instead of being scoped to the current
organization context. This could result in IDP links being created for
users in unintended organizations.

# Which Problems Are Solved

When IDP auto-linking was enabled (by email or username), the system
would search for existing users across all organizations instead of
restricting the search to the current organization context.

# How the Problems Are Solved

Added organization scoping to all three auto-linking code paths

(cherry picked from commit 2ad5cf141f)
2025-10-27 08:44:00 +01:00
Livio Spring
8b1aa8cbec chore: update dependencies (#10923)
Updates all direct dependencies to latests versions (apart from the one
where there are already issues to solve their updates)

(cherry picked from commit 61964f92be)

# Conflicts:
#	go.mod
#	go.sum
2025-10-27 08:43:13 +01:00
Livio Spring
2272a60a58 fix(login v1): handle old sessions in logout (#10926)
# Which Problems Are Solved

Sessions created through login UI (v1) automatically get assigned an ID
after creation. This change was introduced with the OIDC back-channel
logout implementation. Sessions created before that don't have an ID and
are updated on the next (re-)authentication.
A customer now reached out, that a logout from Console was resulting in
an error. This is due to at least one session not having an ID (<null>
in sql) in the same user agent.

# How the Problems Are Solved

Since the sessionID is not used in the specific situation, we just
assign the userID as sessionID. This way all sessions are properly
terminated.

# Additional Changes

None

# Additional Context

- relates to support request
- requires backport to v4.x

(cherry picked from commit fda19dc85b)
2025-10-27 08:35:20 +01:00
kenta yamamoto
76a18d414f feat(login): add Japanese localization for login frontend app (#10811)
<!--
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

- Japanese users cannot use the Login UI in their native language, as
only other locales (English, German, Italian, Spanish, Polish, Chinese,
Russian, Turkish) are currently supported
- The Login UI language selection does not include Japanese as an option

# How the Problems Are Solved

- Updated the `LANGS` array in `apps/login/src/lib/i18n.ts` to include
Japanese (`{ name: "日本語", code: "ja" }`)
- Enables Japanese language selection in the Login UI through browser
language detection or manual locale setting

# Additional Changes

- No additional changes were necessary as other components (Console,
email notifications, common messages, Go templates) already have
Japanese locale support (`ja.json`/`ja.yaml` files exist)

# Additional Context

- This contribution enhances ZITADEL's internationalization support for
Japanese-speaking users
- The translation follows the same structure and key naming conventions
as existing locale files
- Testing can be performed by setting browser language to Japanese or
using `NEXT_LOCALE=ja` cookie

Co-authored-by: Max Peintner <max@caos.ch>
(cherry picked from commit 27c248fa11)
2025-10-27 08:34:47 +01:00
Stefan Benz
43b4fc1019 fix: add CommonName to SAML SP certificate (#10700)
# Which Problems Are Solved

There is no CN (CommonName) defined in the certificates to use an
external SAML IDP.

# How the Problems Are Solved

Add Issuer and CommonName to the certificate information.

# Additional Changes

None

# Additional Context

Closes #9048

Co-authored-by: Gayathri Vijayan <66356931+grvijayan@users.noreply.github.com>
(cherry picked from commit 4c078c1474)
2025-10-27 08:33:07 +01:00
Mahdi JafariRaviz
db643547b1 fix(console): create login policy before adding a factor (#10202)
<!--
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 api call for adding a mfa/2fa factor was running before creating a
login policy.

# How the Problems Are Solved

A new event emitter `beforeTypeAdd` is responsible for taking in a
callback, and then the parent component (login-policy) checks if a login
policy should be created, and then it is successfully created, calls the
callback.
The callback then adds the mfa/2fa factor as before.

# Additional Context

- Closes #9047

Co-authored-by: David Skewis <david@zitadel.com>
Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
(cherry picked from commit 381727e919)
2025-10-27 08:29:26 +01:00
Max Peintner
266d53307b fix(login): provide a postError redirect url for idp flows (#10883)
# Which Problems Are Solved

Improves the user experience when IDP authentication succeeds but user
creation/linking fails by introducing a `postErrorRedirectUrl` parameter
and dedicated error pages instead of generic error screens.

<img width="580" height="636" alt="Screenshot 2025-10-16 at 09 21 07"
src="https://github.com/user-attachments/assets/db653c8f-b648-4cfe-922a-2f237f3b70b3"
/>

# How the Problems Are Solved

## New Pages
- **`/idp/[provider]/account-not-found`**: Displayed when no user
account exists and creation/linking is not allowed
- **`/idp/[provider]/registration-failed`**: Displayed when user
registration fails due to organization resolution issues

## Flow Improvements
- Added `postErrorRedirectUrl` parameter to track where the IDP flow was
initiated
- Each entry point (loginname, register, idp, authenticator/set)
specifies its own redirect URL
- Users are now redirected to appropriate error pages with clear
messaging instead of generic error screens
- All context (`requestId`, `organization`, `postErrorRedirectUrl`) is
preserved throughout the flow

## Updated Components
- `SignInWithIdp`: Now accepts and passes `postErrorRedirectUrl`
parameter
- `redirectToIdp` server action: Extracts and forwards
`postErrorRedirectUrl` through the IDP flow
- IDP success page: Routes to appropriate error pages based on failure
reason

## i18n
Added new translation keys:
- `idp.accountNotFound.*` - For missing account scenarios
- `idp.registrationFailed.*` - For organization resolution failures

(cherry picked from commit 00beaf6ddc)
2025-10-27 08:29:15 +01:00
Livio Spring
fd22d99f5b fix merge v4.4.0 2025-10-16 09:06:22 +02:00
Elio Bischof
42979053da chore: fix lint test build on main (#10866)
# Which Problems Are Solved

In order for golangci-lint to be able to compare what changed against
main, we have to check out main on branches.
If the pipeline runs on main, the branch can't be checked out twice and
the pipeline fails.

# How the Problems Are Solved

The step `Fetch main branch` in `lint_test_build` is only executed if
the workflow doesn't run on main, because in this case, the branch is
already checked out by the `Checkout Repository` step.

# Additional Changes

PRs can only be merged if `lint_test_buld` succeeds on an up-to-date
branch. When a PR is merged, it triggers a push event which runs
`lint_test_build` again on main with the same conditions. This is
obsolete. Pushes to main don't trigger the `lint_test_build` workflow
anymore.

# Additional Context

- Resolves
https://github.com/zitadel/zitadel/actions/runs/18339015014/job/52229685065

(cherry picked from commit 593ae09fa9)
2025-10-16 08:06:22 +02:00
Elio Bischof
66ed1da33f chore: fix vercel build (#10887)
# Which Problems Are Solved

By default, the login redirects in all cases from its
`NEXT_PUBLIC_BASE_PATH` to `NEXT_PUBLIC_BASE_PATH/loginname` now. This
is the expected behavior.

# How the Problems Are Solved

Deployments to Vercel use the `apps/login/.env` file for their defaults.
As the .env file had DEBUG=true, redirects from root to ./loginname were
disabled.
DEBUG=true is not needed anywhere, so it's deleted from the .env file.

(cherry picked from commit 5aa2ca58ca)
2025-10-16 08:06:14 +02:00
Dmitry Popovich
6b007ad0eb fix(zitadel): LDAP binding error with non-ASCII characters in DN (#10578)
<!--
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

LDAP binding with non-ASCII characters in DN

# How the Problems Are Solved

The root of the problem is that ParseDN() function messes DN with
non-ASCII character. Instead of using DN object, returned from ParseDN
we use user.DN in binding request. ParseDN stays only for verifying
correctness of DN.

# Additional Context
- Closes #9970

---------

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
(cherry picked from commit 3a91b409c4)
2025-10-16 08:05:48 +02:00
Stefan Benz
99d3d955b9 chore: fix some eventual consistent integration testing (#10752)
# Which Problems Are Solved

Flakiness in integration tests because of eventual consistentcy.

# How the Problems Are Solved

Split tests related to feature flags and other eventual consistent
resources.

# Additional Changes

None

# Additional Context

None

Co-authored-by: Marco A. <marco@zitadel.com>
(cherry picked from commit a8bbac37d9)
2025-10-16 08:05:43 +02:00
Stefan Benz
f506fedcfe chore: fix usage of baseURI from environment variables (#10757)
# Which Problems Are Solved

`ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_BASEURI` env variable had no
impact on configuration.

# How the Problems Are Solved

Attribute in the configuration file has to be set as empty so that you
can change it through an env variable.

# Additional Changes

None

# Additional Context

Closes #10405

(cherry picked from commit 15bcd46709)
2025-10-16 08:05:30 +02:00
Tim Möhlmann
cd059dc0cb fix(query): distinct count in user list (#10840)
# Which Problems Are Solved

When listing / searching users, each user got multiplied by the amount
of metadata entries they have, towards the `total_results` count. In
PostgreSQL the `COUNT(*) OVER()` window function does not support
`DISTINCT`. Even tho the query did a distinct select, the count would
still include duplicates.

# How the Problems Are Solved

Wrap the original query in a sub-select, so that the `DISTINCT` gets
handled before the count window function is executed in the outer
function. Filters, permission and solting is applied to the inner query.
Offset, limit and count are applied to the outer query.

# Additional Changes

- none

# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/10825
- Backport to 4v

(cherry picked from commit f27ca69749)
2025-10-16 08:05:18 +02:00
Stefan Benz
45c7354234 fix: correct mapping of custom texts (#10725)
# Which Problems Are Solved

Some custom texts are overwritten by incorrect mapped values.

# How the Problems Are Solved

Correct the mapping in the mapping.

# Additional Changes

None

# Additional Context

Closes #10155

(cherry picked from commit 013620baab)
2025-10-16 08:04:47 +02:00
Elio Bischof
4f313093f9 feat: await initial database connection (#10869)
# Which Problems Are Solved

When Postgres was not ready when the API was started, the API failed
immediately.
This made task orchestration hard, especially in a platform agnostic
way:

- The current health check in the Nx target `@zitadel/api:prod` uses the
timeout command, which is not installed on all platforms and behaves
unpredictably
- The current health check in the Nx target `@zitadel/api:prod` requires
the DB to have been started using `@zitadel/zitadel:db`

# How the Problems Are Solved

- Additional configuration option `Database.Postgres.AwaitInitialConn`
is added and defaults to *0m* for backwards compatibility.
- If a duration is configured, the API retries to ping the database
until it succeeds
- The API sleeps for a second between each ping.
- It emits an info-level log with the error on each try.
- When the configured duration times out before the ping is successful,
the error is returned and the command exits with a failure code.
- When the ping succeeds within the configured duration, the API goes on
with the init, setup or start phase.

# Additional Context

- Relates to internally reported problems with the current DB health
check command
[here](https://zitadel.slack.com/archives/C07EUL5H83A/p1759915009839269?thread_ts=1759912259.410789&cid=C07EUL5H83A)
and
[here](https://zitadel.slack.com/archives/C07EUL5H83A/p1759918324246249?thread_ts=1759912259.410789&cid=C07EUL5H83A).

(cherry picked from commit 7ba6870baf)
2025-10-16 08:04:30 +02:00
Yann Soubeyrand
d45d19f575 fix(login): serve UI on both IPv4 and IPv6 (#10554)
# Which Problems Are Solved

Currently, the HTTP server is listening on IPv4 only.

# How the Problems Are Solved

This PR makes it listen on IPv4 and IPv6.

Co-authored-by: Elio Bischof <elio@zitadel.com>
(cherry picked from commit 3b0ad1e9b6)
2025-10-16 08:04:13 +02:00
Stefan Benz
8ab6b08d2d chore: update crewjam/saml to v0.5.1 (#10652)
# Which Problems Are Solved

No usage of the current version of crewjam/saml.

# How the Problems Are Solved

Update dependency to v0.5.1.

# Additional Changes

None

# Additional Context

Closes #9783

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit d5cfbc7b00)
2025-10-16 08:04:00 +02:00
Max Peintner
84da6f9f43 fix(login): use default titles for password pages (#10904)
# Which Problems Are Solved

This change shows the default titles for password pages instead of
dynamically showing the user name.

# How the Problems Are Solved

Both pages now show only the translated title text (verify.title and
change.title respectively) instead of falling back to showing the user's
display name.

Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit 19b744ca67)
2025-10-16 08:00:47 +02:00
Max Peintner
a4e8ede52e feat(login): comprehensive theme system (#10848)
# Which Problems Are Solved

This PR introduces a comprehensive theme customization system for the
login application with responsive behavior and enhanced visual options.

<img width="1122" height="578" alt="Screenshot 2025-08-19 at 09 55 24"
src="https://github.com/user-attachments/assets/cdcc8948-533d-4e13-bf45-fdcc24acfb2b"
/>

# How the Problems Are Solved

##  Features Added

- **🔄 Responsive Layout System**: Automatic switching between
side-by-side and top-to-bottom layouts based on screen size
- **🖼️ Background Image Support**: Custom background images configurable
via environment variables
- **⚙️ Theme Configuration**: Complete theme system with roundness,
spacing, appearance, and layout options
- **📱 Mobile-First Design**: Intelligent layout adaptation for different
screen sizes
- **🎯 Enhanced Typography**: Improved visual hierarchy with larger
titles in side-by-side mode

## 🏗️ Architecture

- **Server-Safe Theme Functions**: Theme configuration accessible on
both server and client
- **SSR-Safe Hooks**: Proper hydration handling for responsive layouts
- **Component Separation**: Clear boundaries between server and client
components
- **Two-Section Layout**: Consistent content structure across all login
pages

## 🔧 Configuration Options

All theme options are configurable via environment variables:

- `NEXT_PUBLIC_THEME_ROUNDNESS`: `edgy` | `mid` | `full`
- `NEXT_PUBLIC_THEME_LAYOUT`: `side-by-side` | `top-to-bottom`
- `NEXT_PUBLIC_THEME_APPEARANCE`: `flat` | `material`
- `NEXT_PUBLIC_THEME_SPACING`: `regular` | `compact`
- `NEXT_PUBLIC_THEME_BACKGROUND_IMAGE`: Custom background image URL

## 📄 Pages Updated

Updated all major login pages to use the new two-section responsive
layout:
- Login name entry
- Password verification
- MFA verification
- User registration
- Account selection
- Device authorization
- Logout confirmation

## 📚 Documentation

- **THEME_ARCHITECTURE.md**: Complete technical documentation of the
theme system
- **THEME_CUSTOMIZATION.md**: User-friendly guide with examples and
troubleshooting

## 🚀 Benefits

- **Better UX**: Responsive design that works seamlessly across all
devices
- **Brand Flexibility**: Easy customization to match any brand identity
- **Maintainable Code**: Clean separation of concerns and
well-documented architecture
- **Future-Proof**: Extensible system for additional theme options

<img width="580" height="680" alt="Screenshot 2025-08-19 at 09 22 23"
src="https://github.com/user-attachments/assets/9de8da37-6d56-4fe9-b337-5d8ad2a3ba59"
/>
<img width="599" height="689" alt="Screenshot 2025-08-19 at 09 23 45"
src="https://github.com/user-attachments/assets/26a30cc7-4017-4f4b-8b87-a49466c42b94"
/>
<img width="595" height="681" alt="Screenshot 2025-08-19 at 09 23 17"
src="https://github.com/user-attachments/assets/a3d31088-4545-4f36-aafe-1aae1253d677"
/>

(cherry picked from commit 434aeb275a)
2025-10-16 08:00:40 +02:00
Max Peintner
85f56b022e feat(login): translations (#10849)
# Which Problems Are Solved

Replace this example text with a concise list of problems that this PR
solves.
For example:
- password complexity requirements have hardcoded English text
- password, loginname, register and verify components have hardcoded
Engilsh error messages/alerts

# How the Problems Are Solved

Replace this example text with a concise list of changes that this PR
introduces.
For example:
- adds i18n for password complexity requirements
- adds i18n for password, loginname, register and verify components
error messages/alerts

# Additional Changes

- small change in code/styles for icons in PasswordComplexity to make
sure that icons keep size

# Additional Context

N.A

---------

Co-authored-by: Adam Kida <122802098+jmblab-adam@users.noreply.github.com>
(cherry picked from commit 64e14de091)
2025-10-16 07:59:11 +02:00
Livio Spring
60785178a9 chore(ci): fix release (#10886)
# Which Problems Are Solved

The new pipeline did not correctly build the release. Console was not
built into the binary. Also there were some pipeline permission errors.

# How the Problems Are Solved

- add `build-console` as dependency to pack binaries
- streamline permissions and only pass necessary into steps

# Additional Changes

none

# Additional Context

- relates to #10571

(cherry picked from commit e742d649c8)
v4.3.3
2025-10-13 09:02:19 +02:00
Livio Spring
83e6c9ce3b fix(login): ensure css is served (#10894)
# Which Problems Are Solved

The newest release (v4.3.2) was not serving the `zitadel.css` for the
login anymore. The previous file was served from cache, making it not
directly visible.
The problem was caused due to the CI change (#10571) where the generate
was moved from a makefile to Nx commands, which run in parallel.
Depending on timing, the generated css file might be embedded into the
login or not.

# How the Problems Are Solved

- Configure the commands to run sequentially.

# Additional Changes

none

# Additional Context

- relates to #10571
- requires backport to v4.x

(cherry picked from commit 53dcd0eb0a)
2025-10-13 09:02:07 +02:00
Livio Spring
bead546af3 chore(CI): build console before packing v4.3.2 2025-10-10 10:25:35 +02:00
Livio Spring
4a8f84068e chore(CI): remove permission overwrite from pack.yaml 2025-10-10 07:22:51 +02:00
Livio Spring
59b57dce55 chore(CI): remove permission overwrite from pack.yaml 2025-10-10 07:11:23 +02:00
Elio Bischof
6c6ea247e6 chore: rehaul DevX (#10571)
# Which Problems Are Solved

Replaces Turbo by Nx and lays the foundation for the next CI
improvements. It enables using Nx Cloud to speed the up the pipelines
that affect any node package.
It streamlines the dev experience for frontend and backend developers by
providing the following commands:

| Task | Command | Notes |
|------|---------|--------|
| **Production** | `nx run PROJECT:prod` | Production server |
| **Develop** | `nx run PROJECT:dev` | Hot reloading development server
|
| **Test** | `nx run PROJECT:test` | Run all tests |
| **Lint** | `nx run PROJECT:lint` | Check code style |
| **Lint Fix** | `nx run PROJECT:lint-fix` | Auto-fix style issues |

The following values can be used for PROJECT:

- @zitadel/zitadel (root commands)
- @zitadel/api,
- @zitadel/login,
- @zitadel/console,
- @zitadel/docs,
- @zitadel/client
- @zitadel/proto

The project names and folders are streamlined:

| Old Folder | New Folder |
| --- | --- |
| ./e2e | ./tests/functional-ui |
| ./load-test | ./benchmark |
| ./build/zitadel | ./apps/api |
| ./console | ./apps/console (postponed so the PR is reviewable) |

Also, all references to the TypeScript repo are removed so we can
archive it.

# How the Problems Are Solved

- Ran `npx nx@latest init`
- Replaced all turbo.json by project.json and fixed the target configs
- Removed Turbo dependency
- All JavaScript related code affected by a PRs changes is
quality-checked using the `nx affected` command
- We move PR checks that are runnable using Nx into the `check`
workflow. For workflows where we don't use Nx, yet, we restore
previously built dependency artifacts from Nx.
- We only use a single and easy to understand dev container
- The CONTRIBUTING.md is streamlined
- The setup with a generated client pat is orchestrated with Nx
- Everything related to the TypeScript repo is updated or removed. A
**Deploy with Vercel** button is added to the docs and the
CONTRIBUTING.md.

# Additional Changes

- NPM package names have a consistent pattern.
- Docker bake is removed. The login container is built and released like
the core container.
- The integration tests build the login container before running, so
they don't rely on the login container action anymore. This fixes
consistently failing checks on PRs from forks.
- The docs build in GitHub actions is removed, as we already build on
Vercel.

# Additional Context

- Internal discussion:
https://zitadel.slack.com/archives/C087ADF8LRX/p1756277884928169
- Workflow dispatch test:
https://github.com/zitadel/zitadel/actions/runs/17760122959

---------

Co-authored-by: Florian Forster <florian@zitadel.com>
Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit f69a6ed4f3)

# Conflicts:
#	.github/workflows/build.yml
#	.github/workflows/console.yml
#	.github/workflows/core.yml
#	CONTRIBUTING.md
#	Makefile
#	backend/v3/storage/database/events_testing/events_test.go
#	backend/v3/storage/database/events_testing/id_provider_instance_test.go
#	backend/v3/storage/database/events_testing/instance_test.go
#	console/README.md
#	console/package.json
#	internal/api/grpc/group/v2/integration_test/query_test.go
#	pnpm-lock.yaml
2025-10-10 06:59:12 +02:00
Elio Bischof
37acd2a9d9 chore: rehaul DevX (#10571)
# Which Problems Are Solved

Replaces Turbo by Nx and lays the foundation for the next CI
improvements. It enables using Nx Cloud to speed the up the pipelines
that affect any node package.
It streamlines the dev experience for frontend and backend developers by
providing the following commands:

| Task | Command | Notes |
|------|---------|--------|
| **Production** | `nx run PROJECT:prod` | Production server |
| **Develop** | `nx run PROJECT:dev` | Hot reloading development server
|
| **Test** | `nx run PROJECT:test` | Run all tests |
| **Lint** | `nx run PROJECT:lint` | Check code style |
| **Lint Fix** | `nx run PROJECT:lint-fix` | Auto-fix style issues |

The following values can be used for PROJECT:

- @zitadel/zitadel (root commands)
- @zitadel/api,
- @zitadel/login,
- @zitadel/console,
- @zitadel/docs,
- @zitadel/client
- @zitadel/proto

The project names and folders are streamlined:

| Old Folder | New Folder |
| --- | --- |
| ./e2e | ./tests/functional-ui |
| ./load-test | ./benchmark |
| ./build/zitadel | ./apps/api |
| ./console | ./apps/console (postponed so the PR is reviewable) |

Also, all references to the TypeScript repo are removed so we can
archive it.

# How the Problems Are Solved

- Ran `npx nx@latest init`
- Replaced all turbo.json by project.json and fixed the target configs
- Removed Turbo dependency
- All JavaScript related code affected by a PRs changes is
quality-checked using the `nx affected` command
- We move PR checks that are runnable using Nx into the `check`
workflow. For workflows where we don't use Nx, yet, we restore
previously built dependency artifacts from Nx.
- We only use a single and easy to understand dev container
- The CONTRIBUTING.md is streamlined
- The setup with a generated client pat is orchestrated with Nx
- Everything related to the TypeScript repo is updated or removed. A
**Deploy with Vercel** button is added to the docs and the
CONTRIBUTING.md.

# Additional Changes

- NPM package names have a consistent pattern.
- Docker bake is removed. The login container is built and released like
the core container.
- The integration tests build the login container before running, so
they don't rely on the login container action anymore. This fixes
consistently failing checks on PRs from forks.
- The docs build in GitHub actions is removed, as we already build on
Vercel.

# Additional Context

- Internal discussion:
https://zitadel.slack.com/archives/C087ADF8LRX/p1756277884928169
- Workflow dispatch test:
https://github.com/zitadel/zitadel/actions/runs/17760122959

---------

Co-authored-by: Florian Forster <florian@zitadel.com>
Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit f69a6ed4f3)

# Conflicts:
#	.github/workflows/build.yml
#	.github/workflows/console.yml
#	.github/workflows/core.yml
#	CONTRIBUTING.md
#	Makefile
#	backend/v3/storage/database/events_testing/events_test.go
#	backend/v3/storage/database/events_testing/id_provider_instance_test.go
#	backend/v3/storage/database/events_testing/instance_test.go
#	console/README.md
#	console/package.json
#	internal/api/grpc/group/v2/integration_test/query_test.go
#	pnpm-lock.yaml
2025-10-09 16:53:19 +02:00
Livio Spring
8a3b5848dc fix: Revert "feat(oidc): Added new claim in userinfo response to return all requested audience roles (#9861)" (#10874)
# Which Problems Are Solved

#9861 added a `urn:zitadel:iam:org:projects:roles` claims to include all
roles from all requested roles. The intention was to return them on the
userinfo endpoint. But since the claims might also be returned in the id
and access tokens, they can grow big quite fast and break the size
limits for headers.

# How the Problems Are Solved

This PR revert the feature. The information for roles of other projects
is already available as a dedicated claim (for each project):
```json
  "urn:zitadel:iam:org:project:328813096124547391:roles": {
    "r2": {
      "306639557921669515": "zitadel.localhost"
    },
    "r3": {
      "306639557921669515": "zitadel.localhost"
    },
    "role": {
      "306639557921669515": "zitadel.localhost"
    }
  },
  "urn:zitadel:iam:org:project:341406882914631999:roles": {
    "role": {
      "306639557921669515": "zitadel.localhost",
      "328237605990695334": "aa.localhost"
    },
    "test": {
      "306639557921669515": "zitadel.localhost",
      "328237605990695334": "aa.localhost"
    }
  },
  "urn:zitadel:iam:org:project:roles": {
    "r2": {
      "306639557921669515": "zitadel.localhost"
    },
    "r3": {
      "306639557921669515": "zitadel.localhost"
    },
    "role": {
      "306639557921669515": "zitadel.localhost"
    }
  }
 ```

# Additional Changes

None

# Additional Context

- relates to #9861
- noted issues in production
- requires backport to v4.x

(cherry picked from commit b8bff3cdea)
2025-10-09 15:37:37 +02:00
mofelee
c110ddda87 fix(console): fix typo (#10753)
# Which Problems Are Solved

There's a typo on chinese translation under MEMBERSHIPS -> TITLE translation key

# How the Problems Are Solved

Fix typo

Co-authored-by: Marco A. <marco@zitadel.com>
(cherry picked from commit 21edbc9afe)
2025-10-09 15:37:34 +02:00
Wojciech Piekutowski
c226621ad0 fix(login): fix translation key typo for logout.verifiedAt (#10504)
# Which Problems Are Solved

- login UI was complaining about a missing translation key:
```
Error: MISSING_MESSAGE: logout.verfiedAt (en)
zitadel-login-1               |     at t (.next/server/chunks/1119.js:3:8993)
zitadel-login-1               |     at u (.next/server/chunks/1119.js:3:9149)
zitadel-login-1               |     at v (.next/server/chunks/1119.js:3:10482)
zitadel-login-1               |     at f (.next/server/chunks/2293.js:1:10127) {
zitadel-login-1               |   code: 'MISSING_MESSAGE',
zitadel-login-1               |   originalMessage: 'logout.verfiedAt (en)'
zitadel-login-1               | }
```

# How the Problems Are Solved

- fixes a typo in the translation key name

# Additional Changes

None.

# Additional Context

None.

Co-authored-by: Max Peintner <max@caos.ch>
Co-authored-by: Ramon <mail@conblem.me>
(cherry picked from commit 794054c075)
2025-10-09 15:37:19 +02:00
Livio Spring
4012c2e2fb chore(ci): prevent using the wrong cache v4.3.1 2025-10-07 14:07:53 +02:00
Stefan Benz
d562cf5b45 fix: add email query to github idp if email empty (#10705)
# Which Problems Are Solved

In the integration with Github, private emails are not returned with the
userinfo.

# How the Problems Are Solved

If the scope `user:email` is set in the Github IDP and the email is not
included in the userinfo, a request to Github's API is executed to query
the email of the user.

# Additional Changes

Additional tests.

# Additional Context

Closes #10098

---------

Co-authored-by: Marco A. <marco@zitadel.com>
Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit a7e1bfb4a3)
2025-10-07 10:04:53 +02:00
Max Peintner
1014c6d93f fix(login): Redirect to IDP flow when password auth is disabled (#10839)
Closes #10671

# Which Problems Are Solved

Users with only password authentication method were immediately shown an
error "Username Password not allowed" when
`loginSettings.allowUsernamePassword` was set to false. However, the IDP
flow could potentially allow the user to register a new account or link
an existing account, providing a better user experience than a dead-end
error.

# How the Problems Are Solved

- Modified single password method case to attempt IDP redirect before
showing error
- This allows users to potentially register or link accounts through the
IDP flow instead of hitting an immediate error
- Only show error as last resort when no IDP alternative is available

(cherry picked from commit 695db96745)
2025-10-07 07:54:49 +02:00
Stefan Benz
826935577c fix: add InUserIDs query to query of user grants (#10741)
# Which Problems Are Solved

Currently there is only the option to either filter for all usergrants
of an organization or the usergrants of a singluar user.

# How the Problems Are Solved

Add the option to provide a list of userIDs to query user grants.

# Additional Changes

Fixed internal typo for function.

# Additional Context

Closes #9675

(cherry picked from commit 6da380628d)
2025-10-07 07:54:31 +02:00
pquan
b3d9a7108d fix: Translation on italian email 2FA templates fix. {{:code}} erroneuously translated as well. (#10805)
# Which Problems Are Solved

There's an error in the italian translation. All templates in the
it.yaml file contain a wrong {{.Code}} anchor which was probably
translated with search/replace without cheking. The resulting
{{.Codice}} will send mails with a missing code.

I opened a bugreport here:
https://github.com/zitadel/zitadel/issues/10806

# How the Problems Are Solved

Fixed the template to include the correct anchor.

# Additional Context

Closes https://github.com/zitadel/zitadel/issues/10806

Co-authored-by: pp <ppcontrib@gmail.com>
(cherry picked from commit ee3654fe6f)
2025-10-07 06:25:27 +02:00
Max Peintner
e114c3d670 fix(login): Organization domain scope, Support for External Passkey Registration (#10729)
Closes #10727
Closes #10577

# Which Problems Are Solved

This PR fixes the organization domain scope when provided and introduces
a deep-link feature for external applications, that sends users directly
into passkey registration flow using either session-based or sessionless
flows. Previously, the `/passkey/set` page only supported session-based
registration, limiting external application integration scenarios.

The `/passkey/set` page now supports:
- `code` search parameter for automatic passkey registration
- `userId` parameter for sessionless flows (similar to `/verify` and
`/password/set` pages)
- Auto-submit functionality when verification codes are provided

# How the Problems Are Solved

The organization scope is fixed by the backend handler for OIDC flows,
now correctly submitting a `suffix` queryparam to the /loginname url
which is used to show in the input field.

The passkey code support is implemented by support multiple integration
patterns:
- **Session-based**: `/passkey/set?sessionId=123&code=abc123` (existing
flow)
- **Sessionless**: `/passkey/set?userId=123456&code=abc123` (new flow)

External Application Integration Flow
1. External app triggers passkey register and obtains code
2. User verification link containing `userId`, `code` and `id`
parameters
3. User clicks link → `/passkey/set?userId=123&code=abc&id=123`
4. Page loads user information using `userId` parameter
5. Auto-submit triggers passkey registration when `code` and `id` is
present
6. User completes WebAuthn request
7. Passkey is registered and user continues authentication flow

This enables external applications to seamlessly integrate passkey
registration into their user onboarding

(cherry picked from commit 28db24fa67)
2025-10-07 06:25:19 +02:00
Livio Spring
d9a4ae114e fix(idp): SAML signature algorithm (#10795)
# Which Problems Are Solved

https://github.com/zitadel/zitadel/pull/10520 added the possibility to
specify the signature algorithm for SAML auth requests. After releasing,
customer noticed that the Console UI would not correctly display the
selected algorithm and that it was not used in the login V1.

# How the Problems Are Solved

- Correctly map the algorithm in the UI
- Provide the option to the idp when creating a SAML request in login V1

# Additional Changes

None

# Additional Context

- closes https://github.com/zitadel/zitadel/issues/10780
- closes https://github.com/zitadel/zitadel/issues/10792
- requires backport to v4.x

(cherry picked from commit 1a0588fef1)
v4.3.0
2025-09-30 07:13:22 +02:00