zitadel/internal/api
Tim Möhlmann 120ed0af73
feat(oidc): organization roles scope (#8120)
# Which Problems Are Solved

An admin / application might want to be able to reduce the amount of
roles returned in the token, for example if a user is granted to many
organizations or for specific cases where the application want to narrow
down the access for that token to a specific organization or multiple.
This can now be achieved by providing a scope with the id of the
organization, resp. multiple scopes for every organization, which should
be included.

```
urn:zitadel:iam:org:roles🆔{orgID}
```

**Note:** the new scope does not work when Introspection / Userinfo are
set to legacy mode.

# How the Problems Are Solved

The user info query now has two variants:

1. Variant that returns all organization authorization grants if the new
scope wasn't provided for backward compatibility.
2. Variant that filters the organizations based on the IDs passed in one
or more of the above scopes and returns only those authorization grants.

The query is defined as a `text/template` and both variants are rendered
once in package `init()`.

# Additional Changes

- In the integration tests `assertProjectRoleClaims` now also checks the
org IDs in the roles.

# Additional Context

- Closes #7996
2024-06-14 10:00:43 +02:00
..
assets fix: exclude db connection error details (#7785) 2024-04-23 08:35:25 +00:00
authz chore(deps): update all go deps (#7773) 2024-04-15 09:17:36 +00:00
call fix: reset the call timestamp after a bulk trigger (#6080) 2023-07-07 08:15:05 +00:00
grpc fix(oidc): remove MFA requirement on ZITADEL API based on user auth methods (#8069) 2024-06-12 12:24:17 +00:00
http fix: exclude db connection error details (#7785) 2024-04-23 08:35:25 +00:00
idp feat(saml): allow setting nameid-format and alternative mapping for transient format (#7979) 2024-05-23 05:04:07 +00:00
info fix: correct method and path for session api activity (#6880) 2023-11-22 12:12:23 +02:00
oidc feat(oidc): organization roles scope (#8120) 2024-06-14 10:00:43 +02:00
robots_txt fix: introduce measures to avoid bots crawling and indexing activities (#5728) 2023-05-05 10:25:02 +02:00
saml feat(actions): allow getting metadata of organizations from user grants (#7782) 2024-04-22 11:34:23 +00:00
service fix(eventstore): tests 2020-11-26 09:19:14 +01:00
ui fix(login): ldap login page js file not found (#8101) 2024-06-13 07:05:59 +00:00
api.go feat: improve instance not found error (#7413) 2024-02-28 10:49:57 +00:00