Skip to content

Ory Hydra & Impersonation #3700

Answered by aeneasr
dm17 asked this question in Q&A
Jan 17, 2024 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

In my view, impersonation is easy to pull of with Ory, because you have full control over the user ID and token payloads in the consent flow:

  1. Initiate OAuth2 normal, add an additional parameter like impersonate=userID to the URL
  2. In the login/consent app, check for that parameter. Let the user log in with their admin account, and then grant/deny the impersonation request based on some permission or dialogue or whatever.
  3. Either set the subject payload to the impersonated ID, or
  4. If you want to be more secure, set subject to the admin user id and add another claim like "impersonated_user":"the-user".
  5. Handle impersonation in your app securely.

The problem Zitadel and others have is that you.…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fforootd
Comment options

Answer selected by vinckr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants