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
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
object
spec
Property | Type | Description |
---|---|---|
|
|
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 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 |
|
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
|
|
|
SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set |
|
|
SubjectAccessReviewStatus |
SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
object
Property | Type | Description |
---|---|---|
|
|
NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface |
|
|
ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface |
NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
object
Property | Type | Description |
---|---|---|
|
|
Path is the URL path of the request |
|
|
Verb is the standard HTTP verb |
ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
object
Property | Type | Description |
---|---|---|
|
|
Group is the api Group of the Resource. "*" means all. |
|
|
Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. |
|
|
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 is one of the existing resource types. "*" means all. |
|
|
Subresource is one of the existing resource types. "" means none. |
|
|
Verb is a kubernetes resource api verb, like: get, list, watch, create, update, delete, proxy. "*" means all. |
|
|
Version is the api Version of the Resource. "*" means all. |
SubjectAccessReviewStatus
object
allowed
Property | Type | Description |
---|---|---|
|
|
Allowed is required. True if the action would be allowed, false otherwise. |
|
|
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 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 is optional. It indicates why a request was allowed or denied. |
The following api endpoints are available:
/apis/authorization.k8s.io/v1/selfsubjectaccessreviews
POST
: create a SelfSubjectAccessReview
Parameter | Type | Description |
---|---|---|
|
|
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 |
|
|
fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
POST
create a SelfSubjectAccessReview
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
202 - Accepted |
|
401 - Unauthorized |
Empty |