Skip to content

explain impersonation #2020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
explain impersonation
  • Loading branch information
deads2k committed May 23, 2016
commit 7ed759bf89d40b846cc0f15ce1081ba75e1a3d67
17 changes: 17 additions & 0 deletions architecture/additional_concepts/authentication.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ the `system:anonymous` virtual user and the `system:unauthenticated` virtual
group to the request. This allows the authorization layer to determine which
requests, if any, an anonymous user is allowed to make.

=== Impersonation
A request the OpenShift API may include an `"Impersonate-User"` header, which indicates that requester wants
to have request handled as though it came from the specified user. This can be done on the command line
by passing the `--as=username` flag.

Before UserA is allowed to impersonate UserB, UserA is first authenticated and then an authorization
check is made to be sure UserA is allowed to "impersonate" the "user" named "UserB". If UserA is requesting to
impersonate a service account (`system:serviceaccount:namespace:name`), we check to make sure that UserA can
"impersonate" the "serviceaccount" named "name" in "namespace". If he is disallowed, a 403 will be returned.

By default, project admins and editors are allowed impersonate service accounts in their namespace. There is
also a new group called `sudoers`. That role allows a user to impersonate `system:admin`, which in turn has
cluster-admin permissions. This grants some protection against typos (but *not* security) for someone administering
the cluster. For example, `oc delete nodes --all` would be forbidden, but `oc delete nodes --all --as=system:admin`
would be allowed. You still have the power, but you have to mean it. You can add a user to that group using
`oadm policy add-cluster-role-to-user sudoer <username>`.

[[oauth]]

== OAuth
Expand Down