Commit Graph

6037 Commits

Author SHA1 Message Date
Max Peintner
27e29a6010 rm logs 2025-02-05 11:33:49 +01:00
Max Peintner
7a83345428 saml req 2025-02-05 11:33:21 +01:00
Max Peintner
db23e182dc cleanup api route 2025-02-05 10:15:11 +01:00
Max Peintner
d252ce84a7 Merge branch 'main' into qa 2025-02-05 10:10:22 +01:00
Max Peintner
9516a3a59a serializing / deserializing authrequest 2025-02-05 10:01:29 +01:00
Max Peintner
c7c054da48 request id param 2025-02-05 09:13:43 +01:00
Emilien GUILMINEAU
857812bb9e fix(setup): Fix query alias on 46-06 (#9298)
# Which Problems Are Solved

After updating to version 2.69.0, my zitadel instance refuse to start
with this error log :
```
time="2025-02-03T19:46:47Z" level=info msg="starting migration" caller="/home/runner/work/zitadel/zitadel/internal/migration/migration.go:66" name=46_init_permission_functions
time="2025-02-03T19:46:47Z" level=info msg="execute statement" caller="/home/runner/work/zitadel/zitadel/cmd/setup/46.go:29" file=01-role_permissions_view.sql migration=46_init_permission_functions
time="2025-02-03T19:46:47Z" level=info msg="execute statement" caller="/home/runner/work/zitadel/zitadel/cmd/setup/46.go:29" file=02-instance_orgs_view.sql migration=46_init_permission_functions
time="2025-02-03T19:46:47Z" level=info msg="execute statement" caller="/home/runner/work/zitadel/zitadel/cmd/setup/46.go:29" file=03-instance_members_view.sql migration=46_init_permission_functions
time="2025-02-03T19:46:47Z" level=info msg="execute statement" caller="/home/runner/work/zitadel/zitadel/cmd/setup/46.go:29" file=04-org_members_view.sql migration=46_init_permission_functions
time="2025-02-03T19:46:47Z" level=info msg="execute statement" caller="/home/runner/work/zitadel/zitadel/cmd/setup/46.go:29" file=05-project_members_view.sql migration=46_init_permission_functions
time="2025-02-03T19:46:47Z" level=info msg="execute statement" caller="/home/runner/work/zitadel/zitadel/cmd/setup/46.go:29" file=06-permitted_orgs_function.sql migration=46_init_permission_functions
time="2025-02-03T19:46:47Z" level=error msg="migration failed" caller="/home/runner/work/zitadel/zitadel/internal/migration/migration.go:68" error="46_init_permission_functions 06-permitted_orgs_function.sql: ERROR: subquery in FROM must have an alias (SQLSTATE 42601)" name=46_init_permission_functions
time="2025-02-03T19:46:47Z" level=fatal msg="migration failed" caller="/home/runner/work/zitadel/zitadel/cmd/setup/setup.go:274" error="46_init_permission_functions 06-permitted_orgs_function.sql: ERROR: subquery in FROM must have an alias (SQLSTATE 42601)" name=46_init_permission_functions
```

# How the Problems Are Solved

I used the original sql script on my database which gave me the same
error.
So i added an alias for the subquery and the error cas gone

# Additional Context

I was migrating from version 2.58.3

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

Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
2025-02-04 10:47:22 +00:00
Livio Spring
990e1982c7 fix(OTEL): reduce high cardinality in traces and metrics (#9286)
# Which Problems Are Solved

There were multiple issues in the OpenTelemetry (OTEL) implementation
and usage for tracing and metrics, which lead to high cardinality and
potential memory leaks:
- wrongly initiated tracing interceptors
- high cardinality in traces:
  - HTTP/1.1 endpoints containing host names
- HTTP/1.1 endpoints containing object IDs like userID (e.g.
`/management/v1/users/2352839823/`)
- high amount of traces from internal processes (spooler)
- high cardinality in metrics endpoint:
  - GRPC entries containing host names
  - notification metrics containing instanceIDs and error messages

# How the Problems Are Solved

- Properly initialize the interceptors once and update them to use the
grpc stats handler (unary interceptors were deprecated).
- Remove host names from HTTP/1.1 span names and use path as default.
- Set / overwrite the uri for spans on the grpc-gateway with the uri
pattern (`/management/v1/users/{user_id}`). This is used for spans in
traces and metric entries.
- Created a new sampler which will only sample spans in the following
cases:
  - remote was already sampled
- remote was not sampled, root span is of kind `Server` and based on
fraction set in the runtime configuration
- This will prevent having a lot of spans from the spooler back ground
jobs if they were not started by a client call querying an object (e.g.
UserByID).
- Filter out host names and alike from OTEL generated metrics (using a
`view`).
- Removed instance and error messages from notification metrics.

# Additional Changes

Fixed the middleware handling for serving Console. Telemetry and
instance selection are only used for the environment.json, but not on
statically served files.

# Additional Context

- closes #8096 
- relates to #9074
- back ports to at least 2.66.x, 2.67.x and 2.68.x
2025-02-04 09:55:26 +01:00
Max Peintner
6fad38ec93 helpers 2025-02-04 09:38:33 +01:00
Max Peintner
0bc2c1d876 Merge pull request #339 from zitadel/dependabot/github_actions/actions/setup-node-4
Bump actions/setup-node from 3 to 4
2025-02-03 09:58:18 +01:00
Max Peintner
10395048d0 Merge branch 'main' into dependabot/github_actions/actions/setup-node-4 2025-02-03 09:44:16 +01:00
Max Peintner
568b8d200e Merge pull request #351 from zitadel/password-attempts
fix: password lockout, redirect to set new password when outdated
2025-02-03 09:43:55 +01:00
Max Peintner
c66ee3363e Merge branch 'main' into password-attempts 2025-02-03 09:37:06 +01:00
Max Peintner
5cd7a32660 Merge pull request #355 from zitadel/deps
chore(deps): update next canary
2025-02-03 09:36:33 +01:00
Max Peintner
152d24f076 doc 2025-02-03 09:34:09 +01:00
Max Peintner
c683613633 get host right 2025-02-03 09:12:02 +01:00
Max Peintner
e2c74bb910 log service config 2025-02-03 09:10:12 +01:00
Max Peintner
d469e92859 log request url 2025-02-03 08:50:05 +01:00
Livio Spring
04b9e9b144 fix(console): add posthog to CSP if configured (#9284)
# Which Problems Are Solved

PostHog scripts are currently blocked by content security policy (CSP).

# How the Problems Are Solved

Add `https://*.i.posthog.com` to the CSP according to
https://posthog.com/docs/advanced/content-security-policy#enabling-the-toolbar
(they suggest  `https://*.posthog.com`)

# Additional Changes

None

# Additional Context

relates to https://github.com/zitadel/zitadel/issues/9076
2025-02-03 08:08:01 +01:00
Max Peintner
cc724889f0 headers endpoint 2025-01-31 21:07:05 +01:00
Max Peintner
3021332ba1 fix build 2025-01-31 15:26:03 +01:00
Lars
f65db52247 fix: scim create users dont send init emails (#9283)
# Which Problems Are Solved
- when a scim user is provisioned, a init email could be sent

# How the Problems Are Solved
- no init email should be sent => hard code false for the email init
param

# Additional Context

Related to https://github.com/zitadel/zitadel/issues/8140

Co-authored-by: Fabienne Bühler <fabienne@zitadel.com>
2025-01-31 09:36:18 +00:00
Lars
20cff9c70a fix: scim 2.0 patch ignore op casing (#9282)
# Which Problems Are Solved
- Some SCIM clients send "op" of a patch operation in PascalCase

# How the Problems Are Solved
- Well known "op" values of patch operations are matched
case-insensitive.

# Additional Context
Related to #8140
2025-01-31 09:15:39 +00:00
Max Peintner
7c9c0e9e69 chore: update next canary 2025-01-31 09:21:44 +01:00
Lars
563f74640e fix: scim v2 endpoints enforce user resource owner (#9273)
# Which Problems Are Solved
- If a SCIM endpoint is called with an orgID in the URL that is not the
resource owner, no error is returned, and the action is executed.

# How the Problems Are Solved
- The orgID provided in the SCIM URL path must match the resource owner
of the target user. Otherwise, an error will be returned.

# Additional Context

Part of https://github.com/zitadel/zitadel/issues/8140
2025-01-30 16:43:13 +01:00
Max Peintner
79dcef3785 fix build 2025-01-30 11:48:17 +01:00
Max Peintner
4613f82411 Merge branch 'main' into password-attempts 2025-01-30 11:45:33 +01:00
Max Peintner
fe256f49ef Merge branch 'main' into qa 2025-01-30 11:38:40 +01:00
Max Peintner
c75fdb00f6 Merge pull request #354 from zitadel/changeset-release/main
Version Packages
2025-01-30 11:33:56 +01:00
Max Peintner
2ef9c238ac trigger 2025-01-30 11:24:09 +01:00
github-actions[bot]
905fe300e0 Version Packages 2025-01-30 10:15:05 +00:00
Max Peintner
c2e3f897d7 Merge pull request #340 from zitadel/multiple-tenants
feat: multitenancy
2025-01-30 11:14:27 +01:00
Max Peintner
ac13173019 Merge pull request #353 from zitadel/multiple-regions
feat(multitenancy): allow multiple regions
2025-01-30 10:26:15 +01:00
Max Peintner
d5c3bf2d4d fix build 2025-01-30 09:47:25 +01:00
Max Peintner
3fe1cef651 add fallback to turbo.json 2025-01-30 09:15:32 +01:00
Lars
60cfa6cb76 docs: scim v2 interface (#9246)
# Which Problems Are Solved
- Lack of documentation for the SCIM v2 interface

# How the Problems Are Solved
- Introduced a new documentation page detailing the SCIM v2 interface

# Additional Context
Part of #8140

---------

Co-authored-by: Fabienne Bühler <fabienne@zitadel.com>
2025-01-30 08:07:28 +00:00
Max Peintner
90a222b12a dynamic vars 2025-01-30 08:35:45 +01:00
Max Peintner
dbeb1f7936 dynamic env for region 2025-01-30 08:27:52 +01:00
David Skewis
4498f9c8f3 feat: Posthog integration (#9077)
# Which Problems Are Solved

- Adds a service in the console to enable Posthog integration based on
upon user environment variables

# How the Problems Are Solved

- A new service has been created in console for posthog
- This is only initiated based upon provided environment variables

# Additional Changes

N/A

# Additional Context

- Closes #[9076](https://github.com/zitadel/zitadel/issues/9076)
- Cannot be merged until this is completed
#[9070](https://github.com/zitadel/zitadel/issues/9070)
2025-01-30 07:57:51 +01:00
Lars
e15094cdea feat: add scim v2 service provider configuration endpoints (#9258)
# Which Problems Are Solved
* Adds support for the service provider configuration SCIM v2 endpoints

# How the Problems Are Solved
* Adds support for the service provider configuration SCIM v2 endpoints
  * `GET /scim/v2/{orgId}/ServiceProviderConfig`
  * `GET /scim/v2/{orgId}/ResourceTypes`
  * `GET /scim/v2/{orgId}/ResourceTypes/{name}`
  * `GET /scim/v2/{orgId}/Schemas`
  * `GET /scim/v2/{orgId}/Schemas/{id}`

# Additional Context
Part of #8140

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
2025-01-29 18:11:12 +00:00
Tim Möhlmann
b6841251b1 feat(users/v2): return prompt information (#9255)
# Which Problems Are Solved

Add the ability to update the timestamp when MFA initialization was last
skipped.
Get User By ID now also returns the timestamps when MFA setup was last
skipped.

# How the Problems Are Solved

- Add a `HumanMFAInitSkipped` method to the `users/v2` API.
- MFA skipped was already projected in the `auth.users3` table. In this
PR the same column is added to the users projection. Event handling is
kept the same as in the `UserView`:

<details>


62804ca45f/internal/user/repository/view/model/user.go (L243-L377)

</details>

# Additional Changes

- none

# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/9197
2025-01-29 15:12:31 +00:00
Max Peintner
323a223706 service Region context everywhere 2025-01-29 16:00:21 +01:00
Max Peintner
41bafc0d41 zitadel.ts adaptations 2025-01-29 15:47:31 +01:00
Lars
df8bac8a28 feat: bulk scim v2 endpoint (#9256)
# Which Problems Are Solved
* Adds support for the bulk SCIM v2 endpoint

# How the Problems Are Solved
* Adds support for the bulk SCIM v2 endpoint under `POST
/scim/v2/{orgID}/Bulk`

# Additional Context
Part of #8140

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
2025-01-29 14:23:56 +00:00
Lars
accfb7525a fix: scim 2 filter: the username should be treated case-insensitive (#9257)
# Which Problems Are Solved
- when listing users via scim v2.0 filters applied to the username are
applied case-sensitive

# How the Problems Are Solved
- when a query filter is appleid on the username it is applied
case-insensitive

# Additional Context
Part of https://github.com/zitadel/zitadel/issues/8140
2025-01-29 15:22:22 +02:00
Max Peintner
dedbed014a passkey cleanup 2025-01-29 13:54:27 +01:00
Max Peintner
5af6056881 yolo 2025-01-29 13:51:24 +01:00
Max Peintner
4687db084f fix fcn request 2025-01-29 13:25:45 +01:00
Silvan
b10428fb56 test(session): load tests for session api (#9212)
# Which Problems Are Solved

We currently are not able to benchmark the performance of the session
api

# How the Problems Are Solved

Load tests were added to
- use sessions in oidc tokens analog
https://zitadel.com/docs/guides/integrate/login-ui/oidc-standard

# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/7847
2025-01-29 12:08:20 +00:00
Stefan Benz
679ab58fa1 docs: support docs for SAML session in Custom Login UI (#9144)
# Which Problems Are Solved

SAML session implemented, but no how-to comparable to the OIDC sessions
for custom login available.

# How the Problems Are Solved

Added documentation, which should be also comparable with the OIDC
session for ease-of-use.

# Additional Changes

Added generated SAML API docs.

# Additional Context

Closes #9088 
Follow-up issue #9267

---------

Co-authored-by: Fabienne Bühler <fabienne@zitadel.com>
Co-authored-by: Livio Spring <livio.a@gmail.com>
2025-01-29 11:29:48 +00:00