Commit Graph

6037 Commits

Author SHA1 Message Date
Elio Bischof
d79d5e7b96 fix(projection): remove users with factors (#9877)
# Which Problems Are Solved

When users are removed, their auth factors stay in the projection. This
data inconsistency is visible if a removed user is recreated with the
same ID. In such a case, the login UI and the query API methods show the
removed users auth methods. This is unexpected behavior.

The old users auth methods are not usable to log in and they are not
found by the command side. This is expected behavior.

# How the Problems Are Solved

The auth factors projection reduces the user removed event by deleting
all factors.

# Additional Context

- Reported by support request
- requires backport to 2.x and 3.x
2025-05-12 12:05:12 +02:00
subaru
28856015d6 feat(console): Add organization ID filter to organization list (#9823)
<!--
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

Replace this example text with a concise list of problems that this PR
solves.
- Organization list lacked the ability to filter by organization ID
- No efficient method was provided for users to search organizations by
ID


# How the Problems Are Solved

Replace this example text with a concise list of changes that this PR
introduces.
- Added organization ID filtering functionality to
`filter-org.component.ts`
  - Added `ID` to the `SubQuery` enum
- Added `ID` case handling to `changeCheckbox`, `setValue`, and
`getSubFilter` methods
- Added ID filter UI to `filter-org.component.html`
  - Added checkbox and text input field
  - Used translation key to display "Organization ID" label
- Added new translation key to translation file (`en.json`)
  - Added `FILTER.ORGID` key with "Organization ID" value


# Additional Changes

Replace this example text with a concise list of additional changes that
this PR introduces, that are not directly solving the initial problem
but are related.
- Maintained consistency with existing filtering functionality
- Ensured intuitive user interface usability
- Added new key while maintaining translation file structure


# Additional Context

Replace this example with links to related issues, discussions, discord
threads, or other sources with more context.
Use the Closing #issue syntax for issues that are resolved with this PR.
- Closes #8792
- Discussion #xxx
- Follow-up for PR #xxx
- https://discord.com/channels/xxx/xxx

---------

Co-authored-by: Marco A. <kwbmm1990@gmail.com>
2025-05-12 10:04:32 +02:00
Elio Bischof
a4d703362f Merge pull request #456 from zitadel/qa
promote qa to prod
2025-05-09 20:43:18 +02:00
Max Peintner
aaf52dbf35 Merge branch 'main' into qa 2025-05-09 15:50:53 +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
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
Max Peintner
9df31eb9d6 fallback to openid scope 2025-05-07 14:03:18 +02:00
Max Peintner
602b8ad2f1 autocomplete user code 2025-05-07 14:00:17 +02:00
Max Peintner
ba4e8529f9 render appname 2025-05-07 13:54:21 +02:00
Max Peintner
1852017a11 i18n ns 2025-05-07 13:40:30 +02:00
Max Peintner
d5695a0919 Merge pull request #445 from zitadel/qa
Promote qa to prod: iframe options, fix middleware for edge runtime
2025-05-07 10:40:57 +02:00
Max Peintner
41fb472a4b imports 2025-05-07 10:20:39 +02:00
Max Peintner
5c53069ed8 fix imports 2025-05-07 10:17:55 +02:00
Max Peintner
8467a64404 Merge branch 'main' into qa 2025-05-07 10:15:18 +02:00
Max Peintner
8205b4d4a8 Merge pull request #438 from zitadel/device-code
Device Authorization Flow
2025-05-07 10:14:02 +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
Max Peintner
15937f5150 driver opts 2025-05-07 09:40:05 +02:00
Max Peintner
b1ba38f841 Merge pull request #451 from zitadel/fix-turbo-dep
fix: turbo dep
2025-05-07 09:31:39 +02:00
Max Peintner
4b8b3b4a2e fix: turbo dep 2025-05-07 09:30:52 +02:00
Max Peintner
2a01f0f2e7 turbo 2025-05-07 09:12:58 +02:00
Max Peintner
3f3b3d95bb disclaimer, description 2025-05-06 20:06:37 +02:00
Max Peintner
018e478cd6 de 2025-05-06 16:14:19 +02:00
Max Peintner
5a97af410f cleanup consent screen 2025-05-06 16:08:45 +02:00
Max Peintner
f6d560ded2 Update apps/login/src/components/consent.tsx
Co-authored-by: David Skewis <david@zitadel.com>
2025-05-06 16:06:54 +02:00
Max Peintner
6da4e7e25d Update apps/login/locales/en.json
Co-authored-by: David Skewis <david@zitadel.com>
2025-05-06 16:06:45 +02:00
Max Peintner
e1e9459495 Update apps/login/locales/en.json
Co-authored-by: David Skewis <david@zitadel.com>
2025-05-06 16:05:12 +02:00
Max Peintner
606248521b Update apps/login/src/components/consent.tsx
Co-authored-by: David Skewis <david@zitadel.com>
2025-05-06 16:04:57 +02:00
Max Peintner
3c28e71c0e filter for undefined scope values 2025-05-06 15:48:37 +02:00
Max Peintner
1f94e40af7 readme doc 2025-05-06 15:38:24 +02:00
Max Peintner
c8a6cd66a5 cleanup 2025-05-06 15:25:17 +02:00
Max Peintner
4588c48fda move flow completion to signedin page 2025-05-06 15:24:25 +02:00
Max Peintner
2f7c628dcd cleanup 2025-05-06 14:55:20 +02:00
Max Peintner
4f8aca1434 i18n improvement 2025-05-06 14:49:14 +02:00
Max Peintner
1b6aaa79e6 Merge branch 'main' into device-code 2025-05-06 14:47:46 +02:00
Max Peintner
a4e08b5419 i18n 2025-05-06 14:41:44 +02:00
Max Peintner
6e20bd3beb i18n, deny consent, handle error 2025-05-06 09:37:32 +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
Max Peintner
12f8c14ff2 trigger 2025-05-05 11:12:56 +02:00
Max Peintner
bcf1e3aa71 show hint on success page 2025-05-05 10:12:48 +02:00
Max Peintner
781462d9f1 fix signedin session 2025-05-05 09:39:50 +02:00
Max Peintner
54fd748b12 dc 2025-05-02 17:20:28 +02:00
Max Peintner
6270cf9522 device code flow 2025-05-02 15:08:41 +02:00
Max Peintner
5274c2bd7d device code request 2025-05-02 13:52:58 +02:00
Livio Spring
b1e60e7398 Merge commit from fork
* fix: prevent intent token reuse and add expiry

* fix duplicate

* fix expiration
2025-05-02 13:44:24 +02:00