Commit Graph

3749 Commits

Author SHA1 Message Date
Iraq Jaber
5e3951c7f8 fixup! fixup! Merge branch 'main' into org_api 2025-05-21 16:36:44 +02:00
Iraq Jaber
5af4e3b7aa fixup! Merge branch 'main' into org_api 2025-05-21 14:50:00 +02:00
Iraq Jaber
01b263d7cb Merge branch 'main' into org_api 2025-05-21 14:36:09 +02:00
Iraq Jaber
edf2d5325d fixup! fixup! fixup! Merge branch 'org_api_docs' into org_api 2025-05-21 14:34:14 +02:00
Iraq Jaber
390c694b46 fixup! fixup! Merge branch 'org_api_docs' into org_api 2025-05-21 14:28:19 +02:00
Iraq Jaber
b2a1c3d2a5 fixup! Merge branch 'org_api_docs' into org_api 2025-05-21 14:12:09 +02:00
Iraq Jaber
95509d8f45 Merge branch 'org_api_docs' into org_api 2025-05-21 12:52:26 +02:00
Iraq Jaber
cb2c2e77bf fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-21 12:52:12 +02:00
Iraq Jaber
83a5371fe6 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-21 10:34:52 +02:00
Iraq Jaber
733b0852d5 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-20 14:11:40 +02:00
Iraq Jaber
1fde70ff7c fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-20 11:37:11 +02:00
Iraq Jaber
477fb8aba6 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-20 10:35:23 +02:00
Iraq Jaber
5bdc19a6c0 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-19 18:15:18 +02:00
Iraq Jaber
fe74d6b88d fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-19 17:22:50 +02:00
Iraq Jaber
07ffc92481 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-12 09:01:28 +02:00
Iraq Jaber
f9e9f9cdff fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-12 09:00:03 +02:00
Iraq Jaber
5f014d6057 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-08 20:39:49 +02:00
Iraq Jaber
a26ccd5393 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-08 20:33:34 +02:00
Silvan
60ce32ca4f fix(setup): reenable index creation (#9868)
# Which Problems Are Solved

We saw high CPU usage if many events were created on the database. This
was caused by the new actions which query for all event types and
aggregate types.

# How the Problems Are Solved

- the handler of action execution does not filter for aggregate and
event types.
- the index for `instance_id` and `position` is reenabled.

# Additional Changes

none

# Additional Context

none
2025-05-08 15:13:57 +00:00
Iraq Jaber
23b7b3fafe fixup! fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-08 13:10:28 +02:00
Iraq Jaber
92403be9ac fixup! fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-08 12:23:36 +02:00
Iraq Jaber
9fe44bdc99 fixup! fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-08 10:36:27 +02:00
Livio Spring
867e9cb15a fix: correctly use single matching user (by loginname) (#9865)
# Which Problems Are Solved

In rare cases there was a possibility that multiple users were found by
a loginname. This prevented the corresponding user to sign in.

# How the Problems Are Solved

Fixed the corresponding query (to correctly respect the org domain
policy).

# Additional Changes

None

# Additional Context

Found during the investigation of a support request
2025-05-08 07:32:41 +00:00
Livio Spring
d71795c433 fix: remove index es_instance_position (#9862)
# Which Problems Are Solved

#9837 added a new index `es_instance_position` on the events table with
the idea to improve performance for some projections. Unfortunately, it
makes it worse for almost all projections and would only improve the
situation for the events handler of the actions V2 subscriptions.

# How the Problems Are Solved

Remove the index again.

# Additional Changes

None

# Additional Context

relates to #9837
relates to #9863
2025-05-08 08:35:34 +02:00
Maximilian
577bf9c710 docs(legal): Update to DPA and privacy policy documents (May 2025) (#9566)
We are bringing our DPA and privacy policy document in line with our
changes to the corporate structure, changes to subprocessors, and new
cookie technologies.

This PR replaces #3055 which included more changes to terms of service.
The changes to terms of service will follow in a second step.

---------

Co-authored-by: Florian Forster <florian@zitadel.com>
2025-05-07 15:58:21 +00:00
Stefan Benz
21167a4bba fix: add current state for execution handler into setup (#9863)
# Which Problems Are Solved

The execution handler projection handles all events to check if an
execution has to be provided to the worker to execute.
In this logic all events would be processed from the beginning which is
not necessary.

# How the Problems Are Solved

Add the current state to the execution handler projection, to avoid
processing all existing events.

# Additional Changes

Add custom configuration to the default, so that the transactions are
limited to some events.

# Additional Context

None
2025-05-07 14:26:53 +00:00
Stefan Benz
c6aa6385b6 docs: add invalid information to member requests (#9858)
# Which Problems Are Solved

Misleading information on member endpoint requests.

# How the Problems Are Solved

Add comment to member endpoint requests that the request is invalid if
no roles are provided.

# Additional Changes

None

# Additional Context

Closes #9415

Co-authored-by: Fabienne Bühler <fabienne@zitadel.com>
2025-05-07 13:59:02 +00:00
Elio Bischof
898366c537 fix: allow user self deletion (#9828)
# Which Problems Are Solved

Currently, users can't delete themselves using the V2 RemoveUser API
because of the redunant API middleware permission check.

On main, using a machine user PAT to delete the same machine user:

```bash
grpcurl -plaintext -H "Authorization: Bearer ${ZITADEL_ACCESS_TOKEN}" -d '{"userId": "318838604669387137"}' localhost:8080 zitadel.user.v2.UserService.DeleteUser
ERROR:
  Code: NotFound
  Message: membership not found (AUTHZ-cdgFk)
  Details:
  1)	{
    	  "@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
    	  "id": "AUTHZ-cdgFk",
    	  "message": "membership not found"
    	}
```

Same on this PRs branch:

```bash
grpcurl -plaintext -H "Authorization: Bearer ${ZITADEL_ACCESS_TOKEN}" -d '{"userId": "318838604669387137"}' localhost:8080 zitadel.user.v2.UserService.DeleteUser
{
  "details": {
    "sequence": "3",
    "changeDate": "2025-05-06T13:44:54.349048Z",
    "resourceOwner": "318838541083804033"
  }
}
```

Repeated call
```bash
grpcurl -plaintext -H "Authorization: Bearer ${ZITADEL_ACCESS_TOKEN}" -d '{"userId": "318838604669387137"}' localhost:8080 zitadel.user.v2.UserService.DeleteUser
ERROR:
  Code: Unauthenticated
  Message: Errors.Token.Invalid (AUTH-7fs1e)
  Details:
  1)	{
    	  "@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
    	  "id": "AUTH-7fs1e",
    	  "message": "Errors.Token.Invalid"
    	}
```

# How the Problems Are Solved

The middleware permission check is disabled and the
domain.PermissionCheck is used exclusively.

# Additional Changes

A new type command.PermissionCheck allows to optionally accept a
permission check for commands, so APIs with middleware permission checks
can omit redundant permission checks by passing nil while APIs without
middleware permission checks can pass one to the command.

# Additional Context

This is a subtask of #9763

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2025-05-07 15:24:24 +02:00
Iraq Jaber
34892286bf fixup! fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-07 14:04:51 +02:00
Iraq Jaber
06bc789b99 fixup! fixup! fixup! Merge branch 'main' into org_api 2025-05-07 13:57:08 +02:00
Iraq Jaber
73eb43bb87 fixup! fixup! Merge branch 'main' into org_api 2025-05-07 13:46:17 +02:00
Iraq Jaber
25d4f1af78 fixup! Merge branch 'main' into org_api 2025-05-07 13:36:50 +02:00
Stefan Benz
0d7d4e6af0 docs: extend api design with additional information and examples (#9856)
# Which Problems Are Solved

There were some misunderstandings on how different points would be
needed to be applied into existing API definitions.

# How the Problems Are Solved

- Added structure to the API design
- Added points to context information in requests and responses
- Added examples to responses with context information
- Corrected available pagination messages
- Added pagination and filter examples

# Additional Changes

None

# Additional Context

None
2025-05-07 10:14:01 +02:00
Iraq Jaber
7383c24931 Merge branch 'main' into org_api 2025-05-07 09:26:32 +02:00
Iraq Jaber
4eb67cebcc fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! adding more tests for ListOrganization() 2025-05-07 09:02:56 +02:00
Iraq Jaber
d5602e59a1 fixup! fixup! fixup! fixup! fixup! fixup! fixup! adding more tests for ListOrganization() 2025-05-07 06:43:47 +02:00
Iraq Jaber
f0ebb3aa59 fixup! fixup! fixup! fixup! fixup! fixup! adding more tests for ListOrganization() 2025-05-06 18:23:29 +02:00
Iraq Jaber
1a05c41614 fixup! fixup! fixup! fixup! fixup! adding more tests for ListOrganization() 2025-05-06 17:29:26 +02:00
Iraq Jaber
50e0536408 fixup! fixup! fixup! fixup! adding more tests for ListOrganization() 2025-05-06 15:56:20 +02:00
Iraq Jaber
6fa53113c5 fixup! fixup! fixup! adding more tests for ListOrganization() 2025-05-06 14:58:01 +02:00
Iraq Jaber
686079ba66 fixup! fixup! adding more tests for ListOrganization() 2025-05-06 14:04:17 +02:00
Iraq Jaber
5422593910 fixup! fixup! adding more tests for ListOrganization() 2025-05-06 09:57:01 +02:00
Iraq Jaber
1d7c414f87 fixup! adding more tests for ListOrganization() 2025-05-06 09:09:30 +02:00
Zach Hirschtritt
8cb1d24b36 fix: add user id index on sessions8 (#9834)
# Which Problems Are Solved

When a user changes their password, Zitadel needs to terminate all of
that user's active sessions. This query can take many seconds on
deployments with large session and user tables. This happens as part of
session projection handling, so doesn't directly impact user experience,
but potentially bogs down the projection handler which isn't great. In
the future, this index could be used to power a "see all of my current
sessions" feature in Zitadel.

# How the Problems Are Solved

Adds new index on `user_id` column on `projections.sessions8` table.
Alternatively, we can index on `(instance_id, user_id)` instead but
opted for keeping the index smaller as we already index on `instance_id`
separately.

# Additional Changes

None

# Additional Context

None

---------

Co-authored-by: Silvan <27845747+adlerhurst@users.noreply.github.com>
2025-05-06 06:38:19 +00:00
Silvan
a626678004 fix(setup): execute s54 (#9849)
# Which Problems Are Solved

Step 54 was not executed during setup.

# How the Problems Are Solved

Added the step to setup jobs

# Additional Changes

none

# Additional Context

- the step was added in https://github.com/zitadel/zitadel/pull/9837
- thanks to @zhirschtritt for raising this.
2025-05-06 06:15:45 +00:00
Iraq Jaber
4f340dc973 adding more tests for ListOrganization() 2025-05-05 15:23:28 +02:00
Iraq Jaber
932cebcd54 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! refactor(api): moving organization API resourced based 2025-05-05 11:17:54 +02:00
Iraq Jaber
76cc92e5d7 fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! refactor(api): moving organization API resourced based 2025-05-05 11:03:25 +02:00
Iraq Jaber
c7b6a2f4df fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! refactor(api): moving organization API resourced based 2025-05-05 10:46:41 +02:00
Iraq Jaber
2105dd232a fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! refactor(api): moving organization API resourced based 2025-05-05 09:33:40 +02:00