Replies: 1 comment
-
We should make both
We should not allow clients to impersonate users without a third-party as that puts too much power into the application; for more advanced use-cases the third-party STS is the way to go as the necessary controls can be added there (for example OPA policies, calling a on-call REST API to make the admin is on-call, etc.) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The new standard token exchange feature in Keycloak does not currently support delegation semantics from the token exchange specification, which also means it's missing the ability to (in the words of Keycloak not the spec) allow and admin to impersonate a different user.
We should extend on the new standard token exchange feature to introduce delegation support.
In a delegation token exchange we would require both the subject_token and the actor_token. We would also need to document some examples of how an application could go about getting both these tokens, some examples include:
admin@domain
(actor_token); and initiate a CIBA flow to requestuser@domain
to authorize impersonation (subject_token)In terms of
act
claim we can make this configurable and have some options like:may_act
must match the subject of the actor_token; which is then added to the issued tokenact
claim. This could be configurable and allow an emptymay_act
in the subject_token for exampleact
can be optionally filled with details of the client doing the token request when there is noactor_token
There may be quite a lot of use-cases as well where it would be difficult to obtain a
subject_token
; we can consider that there is two modes; one that requires user consent to being impersonated, and another where an admin can impersonate select users without user consent. In the latter we could allow subject_token to simply be aJWT
that the client could generate, or perhaps require the client to createJWS
with its own keypair. We could also combine this with Authorization Grants (RFC7521) where if there is a trusted identity provider that can be used to create assertions that can be used to obtain a subject_token.Beta Was this translation helpful? Give feedback.
All reactions