Together with IdentityServer 4, we've successfully implemented impersonation.
Implementation details
- From our MVC application there are ACR values provided as "Impersonate:" while connection the IdentityServer.
- At our IdentityServer there is a component, deriving from
AuthorizeInteractionResponseGenerator
. It filters the ACR-impersonate value and does a sign in with the provided userid. - After the sign in, it returns to the MVC application and a cookie is being set there.
This all works very well so far.
What do we want
For security reasons, we want add an extra claim actor to the token/cookie, which always tells that one is acting as someone else.
Challenge we are facing
At our MVC application, we are using refresh tokens to renew expired access tokens. The IdentityServer is being connected with providing a client id, client secret and the refresh token. The profile service at the IdentityServer isn't aware of the actor claim and provides only the regular claims.
How can we achieve that?