This is a cache of https://docs.openshift.com/container-platform/4.7/rest_api/authorization_apis/selfsubjectrulesreview-authorization-k8s-io-v1.html. It is a snapshot of the page at 2024-11-29T22:06:45.098+0000.
SelfSubjectRulesReview [authorization.k8s.io/v1] - Authorization <strong>api</strong>s | <strong>api</strong> reference | OpenShift Container Platform 4.7
×
Description

SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server’s authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the api server.

Type

object

Required
  • spec

Specification

Property Type Description

apiVersion

string

apiVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata

ObjectMeta meta/v1

spec

object

Spec holds information about the request being evaluated.

status

object

SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it’s safe to assume the subject has that permission, even if that list is incomplete.

.spec
Description

Spec holds information about the request being evaluated.

Type

object

Property Type Description

namespace

string

Namespace to evaluate rules for. Required.

.status
Description

SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it’s safe to assume the subject has that permission, even if that list is incomplete.

Type

object

Required
  • resourceRules

  • nonResourceRules

  • incomplete

Property Type Description

evaluationError

string

EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn’t support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.

incomplete

boolean

Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn’t support rules evaluation.

nonResourceRules

array

NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn’t significant, may contain duplicates, and possibly be incomplete.

nonResourceRules[]

object

NonResourceRule holds information that describes a rule for the non-resource

resourceRules

array

ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn’t significant, may contain duplicates, and possibly be incomplete.

resourceRules[]

object

ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn’t significant, may contain duplicates, and possibly be incomplete.

.status.nonResourceRules
Description

NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn’t significant, may contain duplicates, and possibly be incomplete.

Type

array

.status.nonResourceRules[]
Description

NonResourceRule holds information that describes a rule for the non-resource

Type

object

Required
  • verbs

Property Type Description

nonResourceURLs

array (string)

NonResourceURLs is a set of partial urls that a user should have access to. s are allowed, but only as the full, final step in the path. "" means all.

verbs

array (string)

Verb is a list of kubernetes non-resource api verbs, like: get, post, put, delete, patch, head, options. "*" means all.

.status.resourceRules
Description

ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn’t significant, may contain duplicates, and possibly be incomplete.

Type

array

.status.resourceRules[]
Description

ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn’t significant, may contain duplicates, and possibly be incomplete.

Type

object

Required
  • verbs

Property Type Description

apiGroups

array (string)

apiGroups is the name of the apiGroup that contains the resources. If multiple api groups are specified, any action requested against one of the enumerated resources in any api group will be allowed. "*" means all.

resourceNames

array (string)

ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.

resources

array (string)

Resources is a list of resources this rule applies to. "" means all in the specified apiGroups. "/foo" represents the subresource 'foo' for all resources in the specified apiGroups.

verbs

array (string)

Verb is a list of kubernetes resource api verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.

api endpoints

The following api endpoints are available:

  • /apis/authorization.k8s.io/v1/selfsubjectrulesreviews

    • POST: create a SelfSubjectRulesReview

/apis/authorization.k8s.io/v1/selfsubjectrulesreviews

Table 1. Global guery parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldManager

string

fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.

pretty

string

If 'true', then the output is pretty printed.

HTTP method

POST

Description

create a SelfSubjectRulesReview

Table 2. Body parameters
Parameter Type Description

body

SelfSubjectRulesReview authorization.k8s.io/v1

Table 3. HTTP responses
HTTP code Reponse body

200 - OK

SelfSubjectRulesReview authorization.k8s.io/v1

201 - Created

SelfSubjectRulesReview authorization.k8s.io/v1

202 - Accepted

SelfSubjectRulesReview authorization.k8s.io/v1

401 - Unauthorized

Empty