zitadel/internal
Livio Spring f065b42a97
fix(oidc): respect role assertion and idTokenInfo flags and trigger preAccessToken trigger (#8046)
# Which Problems Are Solved

After deployment of 2.53.x, customers noted that the roles claims where
always present in the tokens even if the corresponding option on the
client (accessTokenRoleAssertion, idTokenRoleAsseriton) was disabled.
Only the project flag (assertRolesOnAuthentication) would be considered.

Further it was noted, that the action on the preAccessTokenCreation
trigger would not be executed.

Additionally, while testing those issues we found out, that the user
information (name, givenname, family name, ...) where always present in
the id_token even if the option (idTokenUserInfo) was not enabled.

# How the Problems Are Solved

- The `getUserinfoOnce` which was used for access and id_tokens is
refactored to `getUserInfo` and no longer only queries the info once
from the database, but still provides a mechanism to be reused for
access and id_token where the corresponding `roleAssertion` and action
`triggerType` can be passed.
- `userInfo` on the other hand now directly makes sure the information
is only queried once from the database. Role claims are asserted every
time and action triggers are executed on every call.
- `userInfo` now also checks if the profile information need to be
returned.

# Additional Changes

None.

# Additional Context

- relates to #7822 
- reported by customers
2024-05-31 10:10:18 +00:00
..
actions feat(actions): allow getting metadata of organizations from user grants (#7782) 2024-04-22 11:34:23 +00:00
activity fix: get orgID when missing on trigger logs (#7555) 2024-03-14 08:49:10 +00:00
admin/repository/eventsourcing feat(cmd): mirror (#7004) 2024-05-30 09:35:30 +00:00
api fix(oidc): respect role assertion and idTokenInfo flags and trigger preAccessToken trigger (#8046) 2024-05-31 10:10:18 +00:00
auth/repository feat(session api): respect lockout policy (#8027) 2024-05-30 22:08:48 +00:00
auth_request/repository fix(login): correctly reload policies on auth request (#7839) 2024-04-24 08:44:55 +00:00
authz fix(oidc): IDP and passwordless user auth methods (#7998) 2024-05-28 08:59:49 +00:00
command feat(session api): respect lockout policy (#8027) 2024-05-30 22:08:48 +00:00
config feat(crypto): use passwap for machine and app secrets (#7657) 2024-04-05 09:35:49 +00:00
crypto feat(cmd): mirror (#7004) 2024-05-30 09:35:30 +00:00
database feat(cmd): mirror (#7004) 2024-05-30 09:35:30 +00:00
domain fix(oidc): IDP and passwordless user auth methods (#7998) 2024-05-28 08:59:49 +00:00
eventstore feat(cmd): mirror (#7004) 2024-05-30 09:35:30 +00:00
execution feat: add action v2 execution on requests and responses (#7637) 2024-05-04 11:55:57 +02:00
feature refactor(query): use new packages for org by id query (#7826) 2024-05-24 13:32:57 +02:00
form refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
i18n fix(middleware): init translation messages (#7778) 2024-04-16 12:08:18 +00:00
iam refactor: cleanup unused code (#7130) 2024-01-02 14:26:31 +00:00
id fix: add action v2 execution to features (#7597) 2024-04-09 20:21:21 +03:00
idp feat(saml): allow setting nameid-format and alternative mapping for transient format (#7979) 2024-05-23 05:04:07 +00:00
integration fix(oidc): respect role assertion and idTokenInfo flags and trigger preAccessToken trigger (#8046) 2024-05-31 10:10:18 +00:00
logstore perf: project quotas and usages (#6441) 2023-09-15 16:58:45 +02:00
migration fix(setup): init projections (#7194) 2024-01-25 17:28:20 +01:00
net perf: project quotas and usages (#6441) 2023-09-15 16:58:45 +02:00
notification feat(cmd): mirror (#7004) 2024-05-30 09:35:30 +00:00
org refactor: cleanup unused code (#7130) 2024-01-02 14:26:31 +00:00
project refactor: cleanup unused code (#7130) 2024-01-02 14:26:31 +00:00
protoc merge main into next 2023-10-19 12:34:00 +02:00
qrcode docs(legal): Updated agreements and policies v2 (#3823) 2022-06-15 08:30:58 +02:00
query feat(cmd): mirror (#7004) 2024-05-30 09:35:30 +00:00
renderer fix(login): (re)allow HTML in custom login texts (#7575) 2024-03-15 16:29:10 +01:00
repository refactor(query): use new packages for org by id query (#7826) 2024-05-24 13:32:57 +02:00
static feat(saml): allow setting nameid-format and alternative mapping for transient format (#7979) 2024-05-23 05:04:07 +00:00
statik chore: initial version of a devcontainer (#6352) 2023-08-15 10:49:05 +02:00
telemetry refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
test refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
user fix(login): correctly set preferred login name in the login ui (#8038) 2024-05-29 15:45:46 +00:00
v2 feat(cmd): mirror (#7004) 2024-05-30 09:35:30 +00:00
view/repository refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
webauthn fix: allow other users to set up MFAs (#7914) 2024-05-07 05:38:26 +00:00
zerrors refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00