Commit Graph

3796 Commits

Author SHA1 Message Date
Stefan Benz
b12341874d Merge branch 'main' into user-v2-api-v4 2025-07-14 16:41:08 +02:00
Livio Spring
79fcc2f2b6 chore(tests): name integration test packages correctly to let them run (#10242)
# Which Problems Are Solved

After changing some internal logic, which should have failed the
integration test, but didn't, I noticed that some integration tests were
never executed. The make command lists all `integration_test` packages,
but some are named `integration`

# How the Problems Are Solved

Correct wrong integration test package names.

# Additional Changes

None

# Additional Context

- noticed internally
- backport to 3.x and 2.x
2025-07-14 08:01:36 +00:00
Iraq
23d6d24bc8 fix(login): changed permission check for sending invite code on log in (#10197)
# Which Problems Are Solved

Fixes issue when users would get an error message when attempting to
resend invitation code when logging in

# How the Problems Are Solved

Changing the permission check for looking for `org.write` to
`ommand.checkPermissionUpdateUser()`

# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/10100
- backport to 3.x
2025-07-14 09:19:50 +02:00
Livio Spring
1b01fc6c40 fix(api): CORS for connectRPC and grpc-web (#10227)
# Which Problems Are Solved

The CORS handler for the new connectRPC handlers was missing, leading to
unhandled preflight requests and a unusable api for browser based calls,
e.g. cross domain gRPC-web requests.

# How the Problems Are Solved

- Added the http CORS middleware to the connectRPC handlers.
- Added `Grpc-Timeout`, `Connect-Protocol-Version`,`Connect-Timeout-Ms`
to the default allowed headers (this improves also the old grpc-web
handling)
- Added `Grpc-Status`, `Grpc-Message`, `Grpc-Status-Details-Bin` to the
default exposed headers (this improves also the old grpc-web handling)

# Additional Changes

None

# Additional Context

noticed internally while testing other issues
2025-07-11 09:55:01 +00:00
Livio Spring
8f61b24532 fix(login v1): correctly auto-link users on organizations with suffixed usernames (#10205) 2025-07-11 05:29:27 -04:00
Livio Spring
fefeaea56a perf: improve org and org domain creation (#10232)
# Which Problems Are Solved

When an organization domain is verified, e.g. also when creating a new
organization (incl. generated domain), existing usernames are checked if
the domain has been claimed.
The query was not optimized for instances with many users and
organizations.

# How the Problems Are Solved

- Replace the query, which was searching over the users projection with
(computed loginnames) with a dedicated query checking the loginnames
projection directly.
-  All occurrences have been updated to use the new query.

# Additional Changes

None

# Additional Context

- reported through support
- requires backport to v3.x
2025-07-10 15:17:49 +00:00
Elio Bischof
0598abe7e6 chore(login): fix close pr action (#10234)
# Which Problems Are Solved

The close PR action fails
https://github.com/zitadel/typescript/actions/runs/16196332400/job/45723668837?pr=511

# How the Problems Are Solved

A backtick is escaped.

# Additional Context

- Completes #10229
2025-07-10 13:39:45 +00:00
Elio Bischof
f9cad0f3e5 chore(typescript): improve close PR action (#10229)
# Which Problems Are Solved

The close PR action currently fails because of unescaped backticks.

# How the Problems Are Solved

Backticks are escaped.

# Additional Changes

- Adding a login remote immediately fetches for better UX.
- Adding a subtree is not necessary, as it is already added in the repo.
- Fix and clarify PR migration steps.
- Add workflow dispatch event
2025-07-10 13:10:44 +02:00
Livio Spring
ffe6d41588 fix(login v1): handle password reset when authenticating with email or phone number (#10228)
# Which Problems Are Solved

When authenticating with email or phone number in the login V1, users
were not able to request a password reset and would be given a "User not
found" error.
This was due to a check of the loginname of the auth request, which in
those cases would not match the user's stored loginname.

# How the Problems Are Solved

Switch to a check of the resolved userID in the auth request. (We still
check the user again, since the ID might be a placeholder for an unknown
user and we do not want to disclose any information by omitting a check
and reduce the response time.)

# Additional Changes

None

# Additional Context

- reported through support
- requires backport to v3.x
2025-07-10 09:29:26 +02:00
Livio Spring
2821f41c3a fix(login v1): ensure the user's organization is always set into the token context (#10221)
# Which Problems Are Solved

Customers reported, that if the session / access token in Console
expired and they re-authenticated, the user list would be empty.
While reproducing the issue, we discovered that the necessary
organization information, would be missing in the access token, since
this would already be missing in the OIDC session creation when using an
id_token_hint.

# How the Problems Are Solved

- Ensure the user's organization is set in the login v1 auth request.
This is used to create the OIDC and token information.
 
# Additional Changes

None

# Additional Context

- reported by customers
- requires backport to v3.x
2025-07-09 16:51:13 +02:00
Silvan
f937f90504 chore: update review comment (#10210)
make review comment more clear what is expected
2025-07-09 11:01:59 +02:00
Gayathri Vijayan
0ceec60637 fix: sorting options of the ListInstanceTrustedDomains() gRPC endpoint (#10172)
<!--
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

1. The sorting columns in the gRPC endpoint
`ListInstanceTrustedDomains()` are incorrect, and return the following
error when invalid sorting options are chosen:
```
Unknown (2)
ERROR: missing FROM-clause entry for table "instance_domains" (SQLSTATE 42P01)
```

The sorting columns that are valid to list `instance_trusted_domains`
are
* `trusted_domain_field_name_unspecified`
* `trusted_domain_field_name_domain` 
* `trusted_domain_field_name_creation_date`

However, the currently configured sorting columns are 
* `domain_field_name_unspecified`
* `domain_field_name_domain`
* `domain_field_name_primary`
* `domain_field_name_generated`
* `domain_field_name_creation_date`

Configuring the actual columns of `instance_trusted_domains` makes this
endpoint **backward incompatible**. Therefore, the fix in this PR is to
no longer return an error when an invalid sorting column (non-existing
column) is chosen and to sort the results by `creation_date` for invalid
sorting columns.

2. This PR also fixes the `sorting_column` included in the responses of
both `ListInstanceTrustedDomains()` and `ListInstanceDomains()`
endpoints, as they now point to the default option irrespective of the
chosen option in the request i.e.,
* `TRUSTED_DOMAIN_FIELD_NAME_UNSPECIFIED` in case of
`ListInstanceTrustedDomains()`, and
* `DOMAIN_FIELD_NAME_UNSPECIFIED` in case of `ListInstanceDomains()`

# How the Problems Are Solved

* Map the sorting columns to valid columns of `instance_trusted_domain`
- If the sorting column is not one of the columns, the mapping defaults
to `creation_date`
* Set the `sorting_column` explicitly (from the request) in the
`ListInstanceDomainsResponse` and `ListInstanceTrustedDomainsResponse`

# Additional Changes

A small fix to return the chosen `sorting_column` in the responses of
the `ListInstanceTrustedDomains()` and `ListInstanceDomains()` endpoints

# Additional Context
- Closes #9839
2025-07-08 16:47:43 +02:00
Florian Forster
4b7443ba78 chore(docs): add llms.txt (#10133)
This pull request enhances the documentation site configuration by
introducing a new plugin and making minor adjustments to existing
settings. The primary focus is on integrating the
`@signalwire/docusaurus-plugin-llms-txt` plugin to improve content
handling and adding relevant dependencies.

### Plugin Integration:

*
[`docs/docusaurus.config.js`](diffhunk://#diff-28742c737e523f302e6de471b7fc27284dc8cf720be639e6afe4c17a550cd654R245-R255):
Added the `@signalwire/docusaurus-plugin-llms-txt` plugin with
configuration options, including a depth of 3, log level of 1, exclusion
of certain routes, and enabling markdown file support.
*
[`docs/package.json`](diffhunk://#diff-adfa337ce44dc2902621da20152a048dac41878cf3716dfc4cc56d03aa212a56R33):
Included the `@signalwire/docusaurus-plugin-llms-txt` dependency
(version `^1.2.0`) to support the new plugin integration.

### Configuration Adjustments:

*
[`docs/docusaurus.config.js`](diffhunk://#diff-28742c737e523f302e6de471b7fc27284dc8cf720be639e6afe4c17a550cd654L221):
Removed the `docItemComponent` property under the `module.exports`
configuration.
2025-07-08 05:54:10 +00:00
Max Peintner
253beb4d39 fix(login): encode formpost data to cookie (#10173)
This PR implements a SAML cookie which is used to save information to
complete the form post. It is primarily used to avoid sending the
information as url search params and therefore reducing its length.
2025-07-07 16:11:14 +02:00
Livio Spring
aa8edee50b chore(docs): prevent readme overwrite (#10170)
# Which Problems Are Solved

To generate the docs, we rely on a protoc plugin to generate an openAPI
definition from connectRPC / proto.
Since the plugin is not available on buf.build, we currently download
the released version. As the tar contains a licence and a readme, this
overwrote existing internal files.

# How the Problems Are Solved

Download and extract the plugin in a separate folder and update
buf.gen.yaml accordingly.

# Additional Changes

None

# Additional Context

relates to #9483
2025-07-07 09:28:38 +02:00
Livio Spring
27cd1d8518 docs(api): add new beta services to api reference (#10018)
# Which Problems Are Solved

The unreleased new resource apis have been removed from the docs:
https://github.com/zitadel/zitadel/pull/10015

# How the Problems Are Solved

Add them to the docs sidenav again, since they're now released.

# Additional Changes

none

# Additional Context

none

---------

Co-authored-by: Fabienne <fabienne.gerschwiler@gmail.com>
Co-authored-by: Marco Ardizzone <marco@zitadel.com>
2025-07-04 19:00:24 +02:00
Stefan Benz
5403be7c4b feat: user profile requests in resource APIs (#10151)
# Which Problems Are Solved

The commands for the resource based v2beta AuthorizationService API are
added.
Authorizations, previously knows as user grants, give a user in a
specific organization and project context roles.
The project can be owned or granted.
The given roles can be used to restrict access within the projects
applications.

The commands for the resource based v2beta InteralPermissionService API
are added.
Administrators, previously knows as memberships, give a user in a
specific organization and project context roles.
The project can be owned or granted.
The give roles give the user permissions to manage different resources
in Zitadel.

API definitions from https://github.com/zitadel/zitadel/issues/9165 are
implemented.

Contains endpoints for user metadata.

# How the Problems Are Solved

### New Methods

- CreateAuthorization
- UpdateAuthorization
- DeleteAuthorization
- ActivateAuthorization
- DeactivateAuthorization
- ListAuthorizations
- CreateAdministrator
- UpdateAdministrator
- DeleteAdministrator
- ListAdministrators
- SetUserMetadata to set metadata on a user
- DeleteUserMetadata to delete metadata on a user
- ListUserMetadata to query for metadata of a user

## Deprecated Methods

### v1.ManagementService
- GetUserGrantByID
- ListUserGrants
- AddUserGrant
- UpdateUserGrant
- DeactivateUserGrant
- ReactivateUserGrant
- RemoveUserGrant
- BulkRemoveUserGrant

### v1.AuthService
- ListMyUserGrants
- ListMyProjectPermissions

# Additional Changes

- Permission checks for metadata functionality on query and command side
- correct existence checks for resources, for example you can only be an
administrator on an existing project
- combined all member tables to singular query for the administrators
- add permission checks for command an query side functionality
- combined functions on command side where necessary for easier
maintainability

# Additional Context

Closes #9165

---------

Co-authored-by: Elio Bischof <elio@zitadel.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Livio Spring <livio.a@gmail.com>
2025-07-04 18:12:59 +02:00
Livio Spring
9ebf2316c6 feat: exchange gRPC server implementation to connectRPC (#10145)
# Which Problems Are Solved

The current maintained gRPC server in combination with a REST (grpc)
gateway is getting harder and harder to maintain. Additionally, there
have been and still are issues with supporting / displaying `oneOf`s
correctly.
We therefore decided to exchange the server implementation to
connectRPC, which apart from supporting connect as protocol, also also
"standard" gRCP clients as well as HTTP/1.1 / rest like clients, e.g.
curl directly call the server without any additional gateway.

# How the Problems Are Solved

- All v2 services are moved to connectRPC implementation. (v1 services
are still served as pure grpc servers)
- All gRPC server interceptors were migrated / copied to a corresponding
connectRPC interceptor.
- API.ListGrpcServices and API. ListGrpcMethods were changed to include
the connect services and endpoints.
- gRPC server reflection was changed to a `StaticReflector` using the
`ListGrpcServices` list.
- The `grpc.Server` interfaces was split into different combinations to
be able to handle the different cases (grpc server and prefixed gateway,
connect server with grpc gateway, connect server only, ...)
- Docs of services serving connectRPC only with no additional gateway
(instance, webkey, project, app, org v2 beta) are changed to expose that
- since the plugin is not yet available on buf, we download it using
`postinstall` hook of the docs

# Additional Changes

- WebKey service is added as v2 service (in addition to the current
v2beta)

# Additional Context

closes #9483

---------

Co-authored-by: Elio Bischof <elio@zitadel.com>
2025-07-04 14:06:20 +00:00
Livio Spring
82cd1cee08 fix(service ping): correct endpoint, validate and randomize default interval (#10166)
# Which Problems Are Solved

The production endpoint of the service ping was wrong.
Additionally we discussed in the sprint review, that we could randomize
the default interval to prevent all systems to report data at the very
same time and also require a minimal interval.

# How the Problems Are Solved

- fixed the endpoint
- If the interval is set to @daily (default), we generate a random time
(minute, hour) as a cron format.
- Check if the interval is more than 30min and return an error if not.
- Fixed yaml indent on `ResourceCount`

# Additional Changes

None

# Additional Context

as discussed internally
2025-07-04 13:45:15 +00:00
Tim Möhlmann
26ec29a513 chore(deps): upgrade oidc and chi for dependabot alert (#10160)
# Which Problems Are Solved

Solve dependabot alerts for Go packages.

# How the Problems Are Solved

- Upgrade to latest github.com/zitadel/oidc, which already pulls the
fixed version of chi.
- Upgrade mapstructure

# Additional Changes

- none

# Additional Context

- https://github.com/zitadel/zitadel/security/dependabot/323
- https://github.com/zitadel/zitadel/security/dependabot/324
2025-07-04 11:14:37 +00:00
Elio Bischof
12656235e2 chore: fix login image with sha release (#10157)
# Which Problems Are Solved

Fixes the releasing of multi-architecture login images.

# How the Problems Are Solved

- The login-container workflow extends the bake definition with a file
docker-bake-release.hcl wich adds the platforms linux/arm and linux/amd
to all relevant build targets. The used technique is similar to how the
docker metadata action allows to extend the bake definitions.
- The local login tag is moved to the metadata bake target, which is
always inherited and overwritten in the pipeline
- Packages write permission is added

# Additional Changes

- The MIT license is noted in container labels and annotations
- The Image is built from root so that the local proto files are used

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-03 13:10:10 +02:00
Max Peintner
47f0486ee8 fix(login): email or phone query, session context from loginname (#10158)
This PR fixes an issue where the orQuery for phone and email was not
correctly set.
2025-07-03 08:07:34 +00:00
dependabot[bot]
8c39779533 chore(deps): bump github.com/go-chi/chi/v5 from 5.2.1 to 5.2.2 in /login/apps/login-test-acceptance/idp/oidc in the go_modules group across 1 directory (#10152)
Bumps the go_modules group with 1 update in the
/login/apps/login-test-acceptance/idp/oidc directory:
[github.com/go-chi/chi/v5](https://github.com/go-chi/chi).

Updates `github.com/go-chi/chi/v5` from 5.2.1 to 5.2.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/go-chi/chi/releases">github.com/go-chi/chi/v5's
releases</a>.</em></p>
<blockquote>
<h2>v5.2.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Use strings.Cut in a few places by <a
href="https://github.com/JRaspass"><code>@​JRaspass</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/971">go-chi/chi#971</a></li>
<li>Fix non-constant format strings in t.Fatalf by <a
href="https://github.com/JRaspass"><code>@​JRaspass</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/972">go-chi/chi#972</a></li>
<li>Apply fieldalignment fixes to optimize struct memory layout by <a
href="https://github.com/pixel365"><code>@​pixel365</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/974">go-chi/chi#974</a></li>
<li>go 1.24 by <a
href="https://github.com/pkieltyka"><code>@​pkieltyka</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/977">go-chi/chi#977</a></li>
<li>chore: delint ioutil usage by <a
href="https://github.com/costela"><code>@​costela</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/962">go-chi/chi#962</a></li>
<li>Fixed typo in Router interface definition by <a
href="https://github.com/mithileshgupta12"><code>@​mithileshgupta12</code></a>
in <a
href="https://redirect.github.com/go-chi/chi/pull/958">go-chi/chi#958</a></li>
<li>Add support for TinyGo by <a
href="https://github.com/efraimbart"><code>@​efraimbart</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/978">go-chi/chi#978</a></li>
<li>Exclude middleware/profiler.go in TinyGo, as there's no
net/http/pprof pkg by <a
href="https://github.com/cxjava"><code>@​cxjava</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/982">go-chi/chi#982</a></li>
<li>Make use of strings.Cut by <a
href="https://github.com/scop"><code>@​scop</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/1005">go-chi/chi#1005</a></li>
<li>Change install command format to code block by <a
href="https://github.com/sglkc"><code>@​sglkc</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/1001">go-chi/chi#1001</a></li>
<li>Correct documentation by <a
href="https://github.com/mrdomino"><code>@​mrdomino</code></a> in <a
href="https://redirect.github.com/go-chi/chi/pull/992">go-chi/chi#992</a></li>
</ul>
<h2>Security fix</h2>
<ul>
<li>Fixes <a
href="https://github.com/go-chi/chi/security/advisories/GHSA-vrw8-fxc6-2r93">GHSA-vrw8-fxc6-2r93</a>
- &quot;Host Header Injection Leads to Open Redirect in
RedirectSlashes&quot; <a
href="1be7ad938c">commit</a>
<ul>
<li>a lower-severity Open Redirect that can't be exploited in browser or
email client, as it requires manipulation of a Host header</li>
<li>reported by Anuraag Baishya, <a
href="https://github.com/anuraagbaishya"><code>@​anuraagbaishya</code></a>.
Thank you!</li>
</ul>
</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/pixel365"><code>@​pixel365</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-chi/chi/pull/974">go-chi/chi#974</a></li>
<li><a
href="https://github.com/mithileshgupta12"><code>@​mithileshgupta12</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-chi/chi/pull/958">go-chi/chi#958</a></li>
<li><a
href="https://github.com/efraimbart"><code>@​efraimbart</code></a> made
their first contribution in <a
href="https://redirect.github.com/go-chi/chi/pull/978">go-chi/chi#978</a></li>
<li><a href="https://github.com/cxjava"><code>@​cxjava</code></a> made
their first contribution in <a
href="https://redirect.github.com/go-chi/chi/pull/982">go-chi/chi#982</a></li>
<li><a href="https://github.com/sglkc"><code>@​sglkc</code></a> made
their first contribution in <a
href="https://redirect.github.com/go-chi/chi/pull/1001">go-chi/chi#1001</a></li>
<li><a href="https://github.com/mrdomino"><code>@​mrdomino</code></a>
made their first contribution in <a
href="https://redirect.github.com/go-chi/chi/pull/992">go-chi/chi#992</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/go-chi/chi/compare/v5.2.1...v5.2.2">https://github.com/go-chi/chi/compare/v5.2.1...v5.2.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="23c395f852"><code>23c395f</code></a>
Correct documentation (<a
href="https://redirect.github.com/go-chi/chi/issues/992">#992</a>)</li>
<li><a
href="5516d147c1"><code>5516d14</code></a>
docs: change install code to code block (<a
href="https://redirect.github.com/go-chi/chi/issues/1001">#1001</a>)</li>
<li><a
href="e235052c10"><code>e235052</code></a>
Make use of strings.Cut (<a
href="https://redirect.github.com/go-chi/chi/issues/1005">#1005</a>)</li>
<li><a
href="1be7ad938c"><code>1be7ad9</code></a>
Merge commit from fork</li>
<li><a
href="d7034fdfda"><code>d7034fd</code></a>
Exclude profiler when use tinygo (<a
href="https://redirect.github.com/go-chi/chi/issues/982">#982</a>)</li>
<li><a
href="d04703412f"><code>d047034</code></a>
support tinygo (<a
href="https://redirect.github.com/go-chi/chi/issues/978">#978</a>)</li>
<li><a
href="fe2c065bc0"><code>fe2c065</code></a>
Fixed the typo (<a
href="https://redirect.github.com/go-chi/chi/issues/958">#958</a>)</li>
<li><a
href="1aae5b2d2d"><code>1aae5b2</code></a>
chore: delint ioutil usage (<a
href="https://redirect.github.com/go-chi/chi/issues/962">#962</a>)</li>
<li><a
href="c6225e35a4"><code>c6225e3</code></a>
go 1.24 (<a
href="https://redirect.github.com/go-chi/chi/issues/977">#977</a>)</li>
<li><a
href="e846b8304c"><code>e846b83</code></a>
Apply fieldalignment fixes to optimize struct memory layout (<a
href="https://redirect.github.com/go-chi/chi/issues/974">#974</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/go-chi/chi/compare/v5.2.1...v5.2.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/go-chi/chi/v5&package-manager=go_modules&previous-version=5.2.1&new-version=5.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-02 12:32:16 +00:00
Livio Spring
f93a35c7a8 feat: implement service ping (#10080)
This PR is still WIP and needs changes to at least the tests.

# Which Problems Are Solved

To be able to report analytical / telemetry data from deployed Zitadel
systems back to a central endpoint, we designed a "service ping"
functionality. See also https://github.com/zitadel/zitadel/issues/9706.
This PR adds the first implementation to allow collection base data as
well as report amount of resources such as organizations, users per
organization and more.

# How the Problems Are Solved

- Added a worker to handle the different `ReportType` variations. 
- Schedule a periodic job to start a `ServicePingReport`
- Configuration added to allow customization of what data will be
reported
- Setup step to generate and store a `systemID`

# Additional Changes

None

# Additional Context

relates to #9869
2025-07-02 13:57:41 +02:00
Livio Spring
71575e8d67 fix(webauthn): allow to use "old" passkeys/u2f credentials on session API (#10150)
# Which Problems Are Solved

To prevent presenting unusable WebAuthN credentials to the user /
browser, we filtered out all credentials, which do not match the
requested RP ID. Since credentials set up through Login V1 and Console
do not have an RP ID stored, they never matched. This was previously
intended, since the Login V2 could be served on a separate domain.
The problem is, that if it is hosted on the same domain, the credentials
would also be filtered out and user would not be able to login.

# How the Problems Are Solved

Change the filtering to return credentials, if no RP ID is stored and
the requested RP ID matches the instance domain.

# Additional Changes

None

# Additional Context

Noted internally when testing the login v2
2025-07-02 11:04:59 +00:00
Max Peintner
325aa1f184 fix(login): ensure correct i18n locale context (#10156)
This PR ensures that the correct locale context is set for the new login
2025-07-02 09:43:19 +00:00
Elio Bischof
a02a534cd2 feat: initial admin PAT has IAM_LOGIN_CLIENT (#10143)
# Which Problems Are Solved

We provide a seamless way to initialize Zitadel and the login together.

# How the Problems Are Solved

Additionally to the `IAM_OWNER` role, a set up admin user also gets the
`IAM_LOGIN_CLIENT` role if it is a machine user with a PAT.

# Additional Changes

- Simplifies the load balancing example, as the intermediate
configuration step is not needed anymore.

# Additional Context

- Depends on #10116 
- Contributes to https://github.com/zitadel/zitadel-charts/issues/332
- Contributes to https://github.com/zitadel/zitadel/issues/10016

---------

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
2025-07-02 09:14:36 +00:00
Elio Bischof
2928c6ac2b chore(login): migrate nextjs login to monorepo (#10134)
# Which Problems Are Solved

We move the login code to the zitadel repo.

# How the Problems Are Solved

The login repo is added to ./login as a git subtree pulled from the
dockerize-ci branch.
Apart from the login code, this PR contains the changes from #10116

# Additional Context

- Closes https://github.com/zitadel/typescript/issues/474
- Also merges #10116  
- Merging is blocked by failing check because of:
- https://github.com/zitadel/zitadel/pull/10134#issuecomment-3012086106

---------

Co-authored-by: Max Peintner <peintnerm@gmail.com>
Co-authored-by: Max Peintner <max@caos.ch>
Co-authored-by: Florian Forster <florian@zitadel.com>
2025-07-02 10:04:19 +02:00
Marco A.
fce9e770ac feat: App Keys API v2 (#10140)
# Which Problems Are Solved

This PR *partially* addresses #9450 . Specifically, it implements the
resource based API for app keys.

This PR, together with https://github.com/zitadel/zitadel/pull/10077
completes #9450 .

# How the Problems Are Solved

- Implementation of the following endpoints: `CreateApplicationKey`,
`DeleteApplicationKey`, `GetApplicationKey`, `ListApplicationKeys`
- `ListApplicationKeys` can filter by project, app or organization ID.
Sorting is also possible according to some criteria.
  - All endpoints use permissions V2

# TODO

 - [x] Deprecate old endpoints

# Additional Context

Closes #9450
2025-07-02 07:34:19 +00:00
Livio Spring
64a03fba28 fix(api): return typed saml form post data in idp intent (#10136)
<!--
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 current user V2 API returns a `[]byte` containing a whole HTML
document including the form on `StartIdentifyProviderIntent` for intents
based on form post (e.g. SAML POST bindings). This is not usable for
most clients as they cannot handle that and render a whole page inside
their app.
For redirect based intents, the url to which the client needs to
redirect is returned.

# How the Problems Are Solved

- Changed the returned type to a new `FormData` message containing the
url and a `fields` map.
- internal changes:
- Session.GetAuth now returns an `Auth` interfacce and error instead of
(content string, redirect bool)
- Auth interface has two implementations: `RedirectAuth` and `FormAuth`
- All use of the GetAuth function now type switch on the returned auth
object
- A template has been added to the login UI to execute the form post
automatically (as is).

# Additional Changes

- Some intent integration test did not check the redirect url and were
wrongly configured.

# Additional Context

- relates to zitadel/typescript#410
2025-06-30 15:07:33 +00:00
Federico Coppede
b7d447e313 docs(legal): Update account-lockout-policy.md (#10124)
Review finished for the account lockout policy.

Main changes:

- Revised wording
- Removed free account from the policy scope
- Fixed broken link to the support form in the customer portal

---------

Co-authored-by: Maximilian <mpa@zitadel.com>
2025-06-30 12:21:08 +00:00
Tim Möhlmann
4cd52f33eb chore(oidc): remove feature flag for introspection triggers (#10132)
# Which Problems Are Solved

Remove the feature flag that allowed triggers in introspection. This
option was a fallback in case introspection would not function properly
without triggers. The API documentation asked for anyone using this flag
to raise an issue. No such issue was received, hence we concluded it is
safe to remove it.

# How the Problems Are Solved

- Remove flags from the system and instance level feature APIs.
- Remove trigger functions that are no longer used
- Adjust tests that used the flag.

# Additional Changes

- none

# Additional Context

- Closes #10026 
- Flag was introduced in #7356

---------

Co-authored-by: Silvan <27845747+adlerhurst@users.noreply.github.com>
2025-06-30 05:48:04 +00:00
Florian Forster
14b45b58eb chore: add inkeep search and ai to docs (#10119) 2025-06-27 16:46:21 -04:00
Marco A.
2691dae2b6 feat: App API v2 (#10077)
# Which Problems Are Solved

This PR *partially* addresses #9450 . Specifically, it implements the
resource based API for the apps. APIs for app keys ARE not part of this
PR.

# How the Problems Are Solved

- `CreateApplication`, `PatchApplication` (update) and
`RegenerateClientSecret` endpoints are now unique for all app types:
API, SAML and OIDC apps.
  - All new endpoints have integration tests
  - All new endpoints are using permission checks V2

# Additional Changes

- The `ListApplications` endpoint allows to do sorting (see protobuf for
details) and filtering by app type (see protobuf).
- SAML and OIDC update endpoint can now receive requests for partial
updates

# Additional Context

Partially addresses #9450
2025-06-27 17:25:44 +02:00
Tim Möhlmann
016676e1dc chore(oidc): graduate webkey to stable (#10122)
# Which Problems Are Solved

Stabilize the usage of webkeys.

# How the Problems Are Solved

- Remove all legacy signing key code from the OIDC API
- Remove the webkey feature flag from proto
- Remove the webkey feature flag from console
- Cleanup documentation

# Additional Changes

- Resolved some canonical header linter errors in OIDC
- Use the constant for `projections.lock` in the saml package.

# Additional Context

- Closes #10029
- After #10105
- After #10061
2025-06-26 19:17:45 +03:00
Tim Möhlmann
1ebbe275b9 chore(oidc): remove legacy storage methods (#10061)
# Which Problems Are Solved

Stabilize the optimized introspection code and cleanup unused code.

# How the Problems Are Solved

- `oidc_legacy_introspection` feature flag is removed and reserved.
- `OPStorage` which are no longer needed have their bodies removed.
- The method definitions need to remain in place so the interface
remains implemented.
  - A panic is thrown in case any such method is still called

# Additional Changes

- A number of `OPStorage` methods related to token creation were already
unused. These are also cleaned up.

# Additional Context

- Closes #10027 
- #7822

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2025-06-26 08:08:37 +00:00
Matías Racedo
27f88a6390 docs(migration): Added step-by-step guide for the Auth0 to Zitadel migration (#10118)
Added a step-by-step guide for the Auth0 to Zitadel migration in
preparation for the upcoming workshop.
2025-06-25 12:44:11 -03:00
Stefan Benz
bd32615916 Revert "fix: correct user v2 api docs for v3 (#10112)"
This reverts commit 5da5ccda5c.
2025-06-25 16:55:45 +02:00
Stefan Benz
739e5877bf Merge remote-tracking branch 'origin/main' into user-v2-api-v4 2025-06-25 16:54:28 +02:00
Stefan Benz
5f609aee8e Merge remote-tracking branch 'origin/main' into user-v2-api-v4 2025-06-25 16:54:06 +02:00
Stefan Benz
5da5ccda5c fix: correct user v2 api docs for v3 (#10112)
# Which Problems Are Solved

As documentation is published from the main branch and the releases get
created from another branch, they are not always correctly equal.

# How the Problems Are Solved

Remove the unnecessary changes in the documentation for now, and create
a second PR which can then be used to update the documentation.

# Additional Changes

Correct integration tests which also use the endpoints.

# Additional Context

Closes #10083

---------

Co-authored-by: Fabienne Bühler <fabienne@zitadel.com>
2025-06-25 16:53:40 +02:00
Florian Forster
1719bbaba5 chore(docs): update docusaurus to 3.8.1 (#10115)
This pull request updates several dependencies in the
`docs/package.json` file to their latest minor versions, ensuring
compatibility and access to the latest features and fixes.

Dependency updates:

* Updated `@docusaurus/core`, `@docusaurus/faster`,
`@docusaurus/preset-classic`, `@docusaurus/theme-mermaid`, and
`@docusaurus/theme-search-algolia` from version `^3.8.0` to `^3.8.1` in
the `dependencies` section.
* Updated `@docusaurus/module-type-aliases` and `@docusaurus/types` from
version `^3.8.0` to `^3.8.1` in the `devDependencies` section.

Co-authored-by: Florian Forster <florian@zitadel>
2025-06-25 08:02:12 +02:00
Tim Möhlmann
fa9de9a0f1 feat: generate webkeys setup step (#10105)
# Which Problems Are Solved

We are preparing to roll-out and stabilize webkeys in the next version
of Zitadel. Before removing legacy signing-key code, we must ensure all
existing instances have their webkeys generated.

# How the Problems Are Solved

Add a setup step which generate 2 webkeys for each existing instance
that didn't have webkeys yet.

# Additional Changes

Return an error from the config type-switch, when the type is unknown.

# Additional Context

- Part 1/2 of https://github.com/zitadel/zitadel/issues/10029
- Should be back-ported to v3
2025-06-24 11:41:41 +02:00
Stefan Benz
5ebbc30837 fix: deprecated api calls for v3
This reverts commit 66309e24a8.
2025-06-23 14:58:25 +02:00
Stefan Benz
37e1e11b1e Merge remote-tracking branch 'origin/user-v2-api-v3' into user-v2-api-v4 2025-06-23 14:57:54 +02:00
Stefan Benz
66309e24a8 fix: deprecated api calls for v3 2025-06-23 14:56:02 +02:00
Stefan Benz
49c931ef31 fix: deprecated api calls for v3 tests
This reverts commit f17953b501.
2025-06-23 14:17:32 +02:00
Stefan Benz
d67cd7e745 fix: deprecated api calls for v3
This reverts commit 1092caaceb.
2025-06-23 14:16:43 +02:00
Stefan Benz
f17953b501 fix: deprecated api calls for v3 tests 2025-06-23 14:12:35 +02:00
Stefan Benz
1092caaceb fix: deprecated api calls for v3 2025-06-23 11:16:40 +02:00