Implementation
There are two main components to impersonation:- A fact that indicates whether a user is impersonating another user.
- A policy that grants permissions to users who are impersonating another user.
- Alice is a customer support rep and is impersonating Bob.
- Bob is an admin of the acme organization.
- And so Alice can see anything Bob can.
Common scenarios
There are several ways to define who has permission to impersonate another user. Common ones include: From a relationship with the user:is_impersonating
fact can be included as an ephemeral context fact or more durably synced to Oso Cloud.
- If included as a context fact, when a user “ends” an impersonation session, the application stops sending the impersonation context fact.
- If stored in Oso Cloud, you need to delete the persisted fact to end the impersonation.