×
Description

SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action

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/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/api-conventions.md#types-kinds

.metadata

ObjectMeta meta/v1

.spec

object

SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set

.status

object

SubjectAccessReviewStatus

.spec
Description

SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set

Type

object

Property Type Description

nonResourceAttributes

object

NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface

resourceAttributes

object

ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface

.spec.nonResourceAttributes
Description

NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface

Type

object

Property Type Description

path

string

Path is the URL path of the request

verb

string

Verb is the standard HTTP verb

.spec.resourceAttributes
Description

ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface

Type

object

Property Type Description

group

string

Group is the API Group of the Resource. "*" means all.

name

string

Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.

namespace

string

Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview

resource

string

Resource is one of the existing resource types. "*" means all.

subresource

string

Subresource is one of the existing resource types. "" means none.

verb

string

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

version

string

Version is the API Version of the Resource. "*" means all.

.status
Description

SubjectAccessReviewStatus

Type

object

Required
  • allowed

Property Type Description

allowed

boolean

Allowed is required. True if the action would be allowed, false otherwise.

denied

boolean

Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.

evaluationError

string

EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.

reason

string

Reason is optional. It indicates why a request was allowed or denied.

API endpoints

The following API endpoints are available:

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

    • POST: create a SelfSubjectAccessReview

/apis/authorization.k8s.io/v1/selfsubjectaccessreviews

Table 1. Global guery parameters
Parameter Type Description

pretty

string

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

HTTP method

POST

Description

create a SelfSubjectAccessReview

Table 2. Body parameters
Parameter Type Description

body

SelfSubjectAccessReview authorization.k8s.io/v1

Table 3. HTTP responses
HTTP code Reponse body

200 - OK

SelfSubjectAccessReview authorization.k8s.io/v1

201 - Created

SelfSubjectAccessReview authorization.k8s.io/v1

202 - Accepted

SelfSubjectAccessReview authorization.k8s.io/v1

401 - Unauthorized

Empty