W3cubDocs

/Kubernetes

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.

© 2022 The Kubernetes Authors | Documentation Distributed under CC BY 4.0
Copyright © 2022 The Linux Foundation ®. All rights reserved.
https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/self-subject-access-review-v1/