zitadel/internal/repository/feature/feature_v2
Tim Möhlmann 5fd2061770
feat(oidc): allow returning of parent errors to client (#8376)
# Which Problems Are Solved

Currently the OIDC API of ZITADEL only prints parent errors to the logs.
Where 4xx status are typically warn level and 5xx error level. This
makes it hard to debug certain errors for client in multi-instance
environments like ZITADEL cloud, where there is no direct access to
logs. In case of support requests we often can't correlate past
log-lines to the error that was reported.

This change adds the possibility to return the parent error in the
response to the OIDC client. For the moment this only applies to JSON
body responses, not error redirects to the RP.

# How the Problems Are Solved

- New instance-level feature flag: `debug_oidc_parent_error`
- Use the new `WithReturnParentToClient()` function from the oidc lib
introduced in https://github.com/zitadel/oidc/pull/629 for all cases
where `WithParent` was already used and the request context is
available.

# Additional Changes

none

# Additional Context

- Depends on: https://github.com/zitadel/oidc/pull/629
- Related to: https://github.com/zitadel/zitadel/issues/8362

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2024-08-20 06:45:24 +00:00
..
aggregate.go feat(api): feature flags (#7356) 2024-02-28 10:55:54 +02:00
eventstore.go feat(oidc): allow returning of parent errors to client (#8376) 2024-08-20 06:45:24 +00:00
feature_test.go feat(api): feature flags (#7356) 2024-02-28 10:55:54 +02:00
feature.go feat(oidc): allow returning of parent errors to client (#8376) 2024-08-20 06:45:24 +00:00