Commit Graph

6037 Commits

Author SHA1 Message Date
Max Peintner
f117044c53 base path to root for tests 2025-01-29 11:41:57 +01:00
kkrime
5eeff97ffe feat(session/v2): user password lockout error response (#9233)
# Which Problems Are Solved

Adds `failed attempts` field to the grpc response when a user enters
wrong password when logging in

FYI:

this only covers the senario above; other senarios where this is not
applied are:
SetPasswordWithVerifyCode
setPassword
ChangPassword
setPasswordWithPermission

# How the Problems Are Solved 

Created new grpc message `CredentialsCheckError` -
`proto/zitadel/message.proto` to include `failed_attempts` field.

Had to create a new package -
`github.com/zitadel/zitadel/internal/command/errors` to resolve cycle
dependency between `github.com/zitadel/zitadel/internal/command` and
`github.com/zitadel/zitadel/internal/command`.

# Additional Changes

- none

# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/9198

---------

Co-authored-by: Iraq Jaber <IraqJaber@gmail.com>
2025-01-29 10:29:00 +00:00
Max Peintner
44b4746ed6 env 2025-01-29 11:24:49 +01:00
Max Peintner
af5aa2e4ba either system or other token 2025-01-29 11:03:48 +01:00
Max Peintner
68515bda7e escape proxy for multitenant scenario, rename fcn 2025-01-29 10:44:26 +01:00
Max Peintner
04f9b47960 cleanup serviceUrl, host, basepath configurable 2025-01-29 10:34:33 +01:00
Lars
21f00c1e6b fix: scim use first email or phone if no primary is set (#9236)
# Which Problems Are Solved
- scim v2 only maps the primary phone/email to the zitadel user, this
does not work if no primary is set

# How the Problems Are Solved
- the first phone / email is mapped if no primary is available

# Additional Context
Part of #8140

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
2025-01-29 09:18:00 +00:00
Stefan Benz
a59c6b9f84 fix: change usage from filepath to path (#9260)
# Which Problems Are Solved

Paths for setup steps are joined with "\" when binary is started under
Windows, which results in wrongly joined paths.

# How the Problems Are Solved

Replace the usage of "filepath" with "path" package, which does only
join with "/" and nothing OS specific.

# Additional Changes

None

# Additional Context

Closes #9227
2025-01-29 09:53:27 +01:00
Max Peintner
e8900501b9 service url context 2025-01-28 16:56:31 +01:00
Max Peintner
ad0397af7c rm header logs 2025-01-28 15:58:16 +01:00
Max Peintner
5a801d6de4 basepath /new-login 2025-01-28 14:47:48 +01:00
Max Peintner
0fdd4fa911 / 2025-01-28 14:45:38 +01:00
Max Peintner
e97cfa9832 ./ 2025-01-28 14:44:22 +01:00
Max Peintner
1a207a14f1 log headers 2025-01-28 14:34:14 +01:00
Max Peintner
54a373baec headers endpoint 2025-01-28 13:20:45 +01:00
Max Peintner
059bbbca1c revert buf gen to main 2025-01-28 11:30:59 +01:00
Max Peintner
dd58fa8f7b update readme 2025-01-28 11:29:32 +01:00
Max Peintner
de21556f5d concat with protocol 2025-01-28 10:21:53 +01:00
Max Peintner
6234ba18ba fix password server action 2025-01-28 09:56:06 +01:00
Max Peintner
d378c6504e host change everywhere 2025-01-28 09:47:35 +01:00
Max Peintner
44bb8588de use x-zitadel-forward-host header as target api, util 2025-01-28 09:41:03 +01:00
Livio Spring
3fc68e5d60 fix(notifications): cancel on missing channels and Twilio 4xx errors (#9254)
# Which Problems Are Solved

#9185 changed that if a notification channel was not present,
notification workers would no longer retry to send the notification and
would also cancel in case Twilio would return a 4xx error.
However, this would not affect the "legacy" mode.

# How the Problems Are Solved

- Handle `CancelError` in legacy notifier as not failed (event).

# Additional Changes

None

# Additional Context

- relates to #9185 
- requires back port to 2.66.x and 2.67.x
2025-01-28 06:32:09 +00:00
Lars
30a54fc1eb fix: scim user query endpoint don't allow SortBy custom field (#9235)
# Which Problems Are Solved
- scim list users endpoint (`GET /scim/v2/{orgId}/Users`): handle
unsupported `SortBy` columns correctly

# How the Problems Are Solved
- throw an error if sorting by an unsupported column is requested

# Additional Context
Part of #8140
2025-01-27 17:30:27 +00:00
Lars
b19333726c fix: allow scim content type wildcards (#9245)
# Which Problems Are Solved
- requests to the scim interface with content type `*/*` are rejected

# How the Problems Are Solved
- `*/*` is accepted as content type

# Additional Context
Part of #8140
2025-01-27 16:10:30 +00:00
Max Peintner
b9d4ca824f error handler 2025-01-27 16:23:46 +01:00
Lars
741434806a fix: unified scim metadata key casing (#9244)
# Which Problems Are Solved
- SCIM user metadata mapping keys have differing case styles.

# How the Problems Are Solved
- key casing style is unified to strict camelCase

# Additional Context
Part of #8140

Although this is technically a breaking change, it is considered
acceptable because the SCIM feature is still in the preview stage and
not fully implemented yet.

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
2025-01-27 13:51:58 +00:00
Max Peintner
63656e16fb handle password attempts error 2025-01-27 14:15:05 +01:00
Lars
189f9770c6 feat: patch user scim v2 endpoint (#9219)
# Which Problems Are Solved
* Adds support for the patch user SCIM v2 endpoint

# How the Problems Are Solved
* Adds support for the patch user SCIM v2 endpoint under `PATCH
/scim/v2/{orgID}/Users/{id}`

# Additional Context
Part of #8140
2025-01-27 13:36:07 +01:00
Max Peintner
b93035eeb1 check for outdated password 2025-01-27 13:26:20 +01:00
Tim Möhlmann
ec5f18c168 fix(setup): split membership fields migration (#9230)
# Which Problems Are Solved

The membership fields migration timed out in certain cases. It also
tried to migrate instances which were already removed.

# How the Problems Are Solved

Revert the previous fix that combined the repeatable step for multiple
fill triggers. The membeship migration is now single-run as it might
take a lot of time. It is not worth making it repeatable. Instance IDs
of removed instances are skipped.

# Additional Changes

None

# Additional Context

Introduced in https://github.com/zitadel/zitadel/pull/9199
2025-01-24 11:24:35 +01:00
kkrime
73577885bf docs: small update to docs/docs/concepts/architecture/software.md (#9218)
# Which Problems Are Solved
small update to docs/docs/concepts/architecture/software.md
2025-01-23 13:12:49 +00:00
Max Peintner
6f295bce1b fix middleware 2025-01-23 10:43:53 +01:00
Max Peintner
2cafb7ee59 cleanup turbo.json env config 2025-01-23 10:41:17 +01:00
Zach Hirschtritt
e4bbfcccc8 fix: add aggregate type to subquery to utilize indexes (#9226)
# Which Problems Are Solved

The subquery of the notification requested and retry requested is
missing the aggregate_type filter that would allow it to utilize the
`es_projection` or `active_instances_events` on the eventstore.events2
table.

# How the Problems Are Solved

Add additional filter on subquery. Final query: 
```sql
SELECT <all the fields omitted> FROM eventstore.events2
WHERE
    instance_id = $1
    AND aggregate_type = $2
    AND event_type = $3
    AND created_at > $4
    AND aggregate_id NOT IN (
        SELECT aggregate_id
        FROM eventstore.events2
        WHERE
            aggregate_type = $5 <-- NB: previously missing
            AND event_type = ANY ($6)
            AND instance_id = $7
            AND created_at > $8
    )
ORDER BY "position", in_tx_order
LIMIT $9
FOR UPDATE SKIP LOCKED
```

# Additional Changes

# Additional Context

Co-authored-by: Livio Spring <livio.a@gmail.com>
2025-01-22 16:02:37 +00:00
Livio Spring
c9aa5db2a5 fix(oidc apps): correctly remove last additional origin, redirect uri and post logout redirect uri (#9209)
# Which Problems Are Solved

A customer reached out to support, that the (last) `additional origin`
could not be removed. While testing / implementation it was discovered,
that the same applied to `redirect_uris` and `post_logout_redirect_uris`

# How the Problems Are Solved

- Correctly set the corresponding array to empty in the event so it can
be differentiated to `null` / not set in case of no change.

# Additional Changes

Replaced `reflect.DeepEqual` with `slices.Equal`

# Additional Context

- Reported to support
2025-01-22 07:37:37 +00:00
Max Peintner
c9531d79df cleanup token 2025-01-22 08:37:18 +01:00
Lars
1915d35605 feat: list users scim v2 endpoint (#9187)
# Which Problems Are Solved
- Adds support for the list users SCIM v2 endpoint

# How the Problems Are Solved
- Adds support for the list users SCIM v2 endpoints under `GET
/scim/v2/{orgID}/Users` and `POST /scim/v2/{orgID}/Users/.search`

# Additional Changes
- adds a new function `SearchUserMetadataForUsers` to the query layer to
query a metadata keyset for given user ids
- adds a new function `NewUserMetadataExistsQuery` to the query layer to
query a given metadata key value pair exists
- adds a new function `CountUsers` to the query layer to count users
without reading any rows
- handle `ErrorAlreadyExists` as scim errors `uniqueness`
- adds `NumberLessOrEqual` and `NumberGreaterOrEqual` query comparison
methods
- adds `BytesQuery` with `BytesEquals` and `BytesNotEquals` query
comparison methods

# Additional Context
Part of #8140
Supported fields for scim filters:
* `meta.created`
* `meta.lastModified`
* `id`
* `username`
* `name.familyName`
* `name.givenName`
* `emails` and `emails.value`
* `active` only eq and ne
* `externalId` only eq and ne
2025-01-21 13:31:54 +01:00
Max Peintner
4d3cc55e4f set loginname as param 2025-01-21 11:03:55 +01:00
Max Peintner
1633db4ed9 Merge pull request #341 from zitadel/idp-error-handling
fix(login): provide alternative auth methods when IDP failure page is shown
2025-01-21 10:14:45 +01:00
kkrime
926e7169b2 docs: small update to docs/docs/concepts/features/selfservice.md (#9214)
# Which Problems Are Solved
Small update to docs/docs/concepts/features/selfservice.md to fix issue
in grammar

Co-authored-by: Iraq Jaber <IraqJaber@gmail.com>
2025-01-21 09:05:13 +01:00
Max Peintner
28dc956f40 token util 2025-01-20 15:22:14 +01:00
Max Peintner
86679f14a0 listSessions 2025-01-20 11:55:31 +01:00
Max Peintner
f535b6da4c instance domain callback 2025-01-20 11:43:57 +01:00
Max Peintner
e0a6c12231 mock 2025-01-20 11:39:43 +01:00
Max Peintner
bfd57dbb19 show avatar, edit selection 2025-01-17 16:23:51 +01:00
Tim Möhlmann
94cbf97534 fix(permissions_v2): add membership fields migration (#9199)
# Which Problems Are Solved

Memberships did not have a fields table fill migration.

# How the Problems Are Solved

Add filling of membership fields to the repeatable steps.

# Additional Changes

- Use the same repeatable step for multiple fill fields handlers.
- Fix an error for PostgreSQL 15 where a subquery in a `FROM` clause
needs an alias ing the `permitted_orgs` function.

# Additional Context

- Part of https://github.com/zitadel/zitadel/issues/9188
- Introduced in https://github.com/zitadel/zitadel/pull/9152
2025-01-17 16:16:26 +01:00
Silvan
9532c9bea5 fix(eventstore): correct sql push function (#9201)
# Which Problems Are Solved

https://github.com/zitadel/zitadel/pull/9186 introduced the new `push`
sql function for cockroachdb. The function used the wrong database
function to generate the position of the event and would therefore
insert events at a position before events created with an old Zitadel
version.

# How the Problems Are Solved

Instead of `EXTRACT(EPOCH FROM NOW())`, `cluster_logical_timestamp()` is
used to calculate the position of an event.

# Additional Context

- Introduced in https://github.com/zitadel/zitadel/pull/9186
- Affected versions:
https://github.com/zitadel/zitadel/releases/tag/v2.67.3
2025-01-17 15:32:05 +01:00
Max Peintner
669f089d5b choose auth method for login 2025-01-17 13:39:42 +01:00
Max Peintner
9729097811 readd localhost exception 2025-01-17 13:17:18 +01:00
Max Peintner
d9ba427b6a change audience for self service services 2025-01-17 10:21:11 +01:00