Este contenido no está disponible en el idioma seleccionado.
Chapter 13. Scoping tokens
13.1. About scoping tokens Copiar enlaceEnlace copiado en el portapapeles!
You can create scoped tokens to delegate some of your permissions to another user or service account. For example, a project administrator might want to delegate the power to create pods.
A scoped token is a token that identifies as a given user but is limited to certain actions by its scope. Only a user with the
cluster-admin
Scopes are evaluated by converting the set of scopes for a token into a set of
PolicyRules
13.1.1. User scopes Copiar enlaceEnlace copiado en el portapapeles!
User scopes are focused on getting information about a given user. They are intent-based, so the rules are automatically created for you:
-
- Allows full read/write access to the API with all of the user’s permissions.
user:full -
- Allows read-only access to information about the user, such as name and groups.
user:info -
- Allows access to
user:check-accessandself-localsubjectaccessreviews. These are the variables where you pass an empty user and groups in your request object.self-subjectaccessreviews -
- Allows read-only access to list the projects the user has access to.
user:list-projects
13.1.2. Role scope Copiar enlaceEnlace copiado en el portapapeles!
The role scope allows you to have the same level of access as a given role filtered by namespace.
- - Limits the scope to the rules specified by the cluster-role, but only in the specified namespace .
role:<cluster-role name>:<namespace or * for all>NoteCaveat: This prevents escalating access. Even if the role allows access to resources like secrets, rolebindings, and roles, this scope will deny access to those resources. This helps prevent unexpected escalations. Many people do not think of a role like
as being an escalating role, but with access to a secret it is.edit -
- This is similar to the example above, except that including the bang causes this scope to allow escalating access.
role:<cluster-role name>:<namespace or * for all>:!