You are viewing documentation for Kubernetes version: v1.26

Kubernetes v1.26 documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date information, see the latest version.

SelfSubjectAccessReview

SelfSubjectAccessReview checks whether or the current user can perform an action.

apiVersion: authorization.k8s.io/v1

import "k8s.io/api/authorization/v1"

SelfSubjectAccessReview

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


SelfSubjectAccessReviewSpec

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


  • nonResourceAttributes (NonResourceAttributes)

    NonResourceAttributes describes information for a non-resource access request

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

    • nonResourceAttributes.path (string)

      Path is the URL path of the request

    • nonResourceAttributes.verb (string)

      Verb is the standard HTTP verb

  • resourceAttributes (ResourceAttributes)

    ResourceAuthorizationAttributes describes information for a resource access request

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

    • resourceAttributes.group (string)

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

    • resourceAttributes.name (string)

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

    • resourceAttributes.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

    • resourceAttributes.resource (string)

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

    • resourceAttributes.subresource (string)

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

    • resourceAttributes.verb (string)

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

    • resourceAttributes.version (string)

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

Operations


create create a SelfSubjectAccessReview

HTTP Request

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

Parameters

Response

200 (SelfSubjectAccessReview): OK

201 (SelfSubjectAccessReview): Created

202 (SelfSubjectAccessReview): Accepted

401: Unauthorized

This page is automatically generated.

If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.

Last modified December 08, 2021 at 9:34 AM PST: Reference docs for kubernetes 1.23 (02445930e5)