generated

This commit is contained in:
Chen Rong 2017-08-31 08:52:11 +08:00 committed by xilabao
parent f14c138438
commit ed8adf6e51
56 changed files with 5289 additions and 157 deletions

View File

@ -28347,6 +28347,62 @@
} }
] ]
}, },
"/apis/authorization.k8s.io/v1/selfsubjectrulesreviews": {
"post": {
"description": "create a SelfSubjectRulesReview",
"consumes": [
"*/*"
],
"produces": [
"application/json",
"application/yaml",
"application/vnd.kubernetes.protobuf"
],
"schemes": [
"https"
],
"tags": [
"authorization_v1"
],
"operationId": "createAuthorizationV1SelfSubjectRulesReview",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview"
}
},
"401": {
"description": "Unauthorized"
}
},
"x-kubernetes-action": "post",
"x-kubernetes-group-version-kind": {
"group": "authorization.k8s.io",
"kind": "SelfSubjectRulesReview",
"version": "v1"
}
},
"parameters": [
{
"uniqueItems": true,
"type": "string",
"description": "If 'true', then the output is pretty printed.",
"name": "pretty",
"in": "query"
}
]
},
"/apis/authorization.k8s.io/v1/subjectaccessreviews": { "/apis/authorization.k8s.io/v1/subjectaccessreviews": {
"post": { "post": {
"description": "create a SubjectAccessReview", "description": "create a SubjectAccessReview",
@ -28556,6 +28612,62 @@
} }
] ]
}, },
"/apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews": {
"post": {
"description": "create a SelfSubjectRulesReview",
"consumes": [
"*/*"
],
"produces": [
"application/json",
"application/yaml",
"application/vnd.kubernetes.protobuf"
],
"schemes": [
"https"
],
"tags": [
"authorization_v1beta1"
],
"operationId": "createAuthorizationV1beta1SelfSubjectRulesReview",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview"
}
},
"401": {
"description": "Unauthorized"
}
},
"x-kubernetes-action": "post",
"x-kubernetes-group-version-kind": {
"group": "authorization.k8s.io",
"kind": "SelfSubjectRulesReview",
"version": "v1beta1"
}
},
"parameters": [
{
"uniqueItems": true,
"type": "string",
"description": "If 'true', then the output is pretty printed.",
"name": "pretty",
"in": "query"
}
]
},
"/apis/authorization.k8s.io/v1beta1/subjectaccessreviews": { "/apis/authorization.k8s.io/v1beta1/subjectaccessreviews": {
"post": { "post": {
"description": "create a SubjectAccessReview", "description": "create a SubjectAccessReview",
@ -56494,6 +56606,28 @@
} }
} }
}, },
"io.k8s.api.authorization.v1.NonResourceRule": {
"description": "NonResourceRule holds information that describes a rule for the non-resource",
"required": [
"verbs"
],
"properties": {
"nonResourceURLs": {
"description": "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.",
"type": "array",
"items": {
"type": "string"
}
},
"verbs": {
"description": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"io.k8s.api.authorization.v1.ResourceAttributes": { "io.k8s.api.authorization.v1.ResourceAttributes": {
"description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
"properties": { "properties": {
@ -56527,6 +56661,42 @@
} }
} }
}, },
"io.k8s.api.authorization.v1.ResourceRule": {
"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.",
"required": [
"verbs"
],
"properties": {
"apiGroups": {
"description": "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.",
"type": "array",
"items": {
"type": "string"
}
},
"resourceNames": {
"description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.",
"type": "array",
"items": {
"type": "string"
}
},
"resources": {
"description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources. \"*\" means all.",
"type": "array",
"items": {
"type": "string"
}
},
"verbs": {
"description": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"io.k8s.api.authorization.v1.SelfSubjectAccessReview": { "io.k8s.api.authorization.v1.SelfSubjectAccessReview": {
"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", "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",
"required": [ "required": [
@ -56574,6 +56744,48 @@
} }
} }
}, },
"io.k8s.api.authorization.v1.SelfSubjectRulesReview": {
"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.",
"required": [
"spec"
],
"properties": {
"apiVersion": {
"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/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "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",
"type": "string"
},
"metadata": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
},
"spec": {
"description": "Spec holds information about the request being evaluated.",
"$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReviewSpec"
},
"status": {
"description": "Status is filled in by the server and indicates the set of actions a user can perform.",
"$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectRulesReviewStatus"
}
},
"x-kubernetes-group-version-kind": [
{
"group": "authorization.k8s.io",
"kind": "SelfSubjectRulesReview",
"version": "v1"
}
]
},
"io.k8s.api.authorization.v1.SelfSubjectRulesReviewSpec": {
"properties": {
"namespace": {
"description": "Namespace to evaluate rules for. Required.",
"type": "string"
}
}
},
"io.k8s.api.authorization.v1.SubjectAccessReview": { "io.k8s.api.authorization.v1.SubjectAccessReview": {
"description": "SubjectAccessReview checks whether or not a user or group can perform an action.", "description": "SubjectAccessReview checks whether or not a user or group can perform an action.",
"required": [ "required": [
@ -56666,6 +56878,38 @@
} }
} }
}, },
"io.k8s.api.authorization.v1.SubjectRulesReviewStatus": {
"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.",
"required": [
"resourceRules",
"nonResourceRules",
"incomplete"
],
"properties": {
"evaluationError": {
"description": "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.",
"type": "string"
},
"incomplete": {
"description": "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.",
"type": "boolean"
},
"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",
"items": {
"$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceRule"
}
},
"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",
"items": {
"$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceRule"
}
}
}
},
"io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview": { "io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview": {
"description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", "description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.",
"required": [ "required": [
@ -56713,6 +56957,28 @@
} }
} }
}, },
"io.k8s.api.authorization.v1beta1.NonResourceRule": {
"description": "NonResourceRule holds information that describes a rule for the non-resource",
"required": [
"verbs"
],
"properties": {
"nonResourceURLs": {
"description": "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.",
"type": "array",
"items": {
"type": "string"
}
},
"verbs": {
"description": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"io.k8s.api.authorization.v1beta1.ResourceAttributes": { "io.k8s.api.authorization.v1beta1.ResourceAttributes": {
"description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
"properties": { "properties": {
@ -56746,6 +57012,42 @@
} }
} }
}, },
"io.k8s.api.authorization.v1beta1.ResourceRule": {
"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.",
"required": [
"verbs"
],
"properties": {
"apiGroups": {
"description": "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.",
"type": "array",
"items": {
"type": "string"
}
},
"resourceNames": {
"description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.",
"type": "array",
"items": {
"type": "string"
}
},
"resources": {
"description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources. \"*\" means all.",
"type": "array",
"items": {
"type": "string"
}
},
"verbs": {
"description": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview": { "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview": {
"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", "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",
"required": [ "required": [
@ -56793,6 +57095,48 @@
} }
} }
}, },
"io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview": {
"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.",
"required": [
"spec"
],
"properties": {
"apiVersion": {
"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/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "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",
"type": "string"
},
"metadata": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
},
"spec": {
"description": "Spec holds information about the request being evaluated.",
"$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectRulesReviewSpec"
},
"status": {
"description": "Status is filled in by the server and indicates the set of actions a user can perform.",
"$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectRulesReviewStatus"
}
},
"x-kubernetes-group-version-kind": [
{
"group": "authorization.k8s.io",
"kind": "SelfSubjectRulesReview",
"version": "v1beta1"
}
]
},
"io.k8s.api.authorization.v1beta1.SelfSubjectRulesReviewSpec": {
"properties": {
"namespace": {
"description": "Namespace to evaluate rules for. Required.",
"type": "string"
}
}
},
"io.k8s.api.authorization.v1beta1.SubjectAccessReview": { "io.k8s.api.authorization.v1beta1.SubjectAccessReview": {
"description": "SubjectAccessReview checks whether or not a user or group can perform an action.", "description": "SubjectAccessReview checks whether or not a user or group can perform an action.",
"required": [ "required": [
@ -56885,6 +57229,38 @@
} }
} }
}, },
"io.k8s.api.authorization.v1beta1.SubjectRulesReviewStatus": {
"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.",
"required": [
"resourceRules",
"nonResourceRules",
"incomplete"
],
"properties": {
"evaluationError": {
"description": "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.",
"type": "string"
},
"incomplete": {
"description": "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.",
"type": "boolean"
},
"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",
"items": {
"$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceRule"
}
},
"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",
"items": {
"$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceRule"
}
}
}
},
"io.k8s.api.autoscaling.v1.CrossVersionObjectReference": { "io.k8s.api.autoscaling.v1.CrossVersionObjectReference": {
"description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
"required": [ "required": [

View File

@ -106,6 +106,51 @@
} }
] ]
}, },
{
"path": "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews",
"description": "API at /apis/authorization.k8s.io/v1",
"operations": [
{
"type": "v1.SelfSubjectRulesReview",
"method": "POST",
"summary": "create a SelfSubjectRulesReview",
"nickname": "createSelfSubjectRulesReview",
"parameters": [
{
"type": "string",
"paramType": "query",
"name": "pretty",
"description": "If 'true', then the output is pretty printed.",
"required": false,
"allowMultiple": false
},
{
"type": "v1.SelfSubjectRulesReview",
"paramType": "body",
"name": "body",
"description": "",
"required": true,
"allowMultiple": false
}
],
"responseMessages": [
{
"code": 200,
"message": "OK",
"responseModel": "v1.SelfSubjectRulesReview"
}
],
"produces": [
"application/json",
"application/yaml",
"application/vnd.kubernetes.protobuf"
],
"consumes": [
"*/*"
]
}
]
},
{ {
"path": "/apis/authorization.k8s.io/v1/subjectaccessreviews", "path": "/apis/authorization.k8s.io/v1/subjectaccessreviews",
"description": "API at /apis/authorization.k8s.io/v1", "description": "API at /apis/authorization.k8s.io/v1",
@ -600,6 +645,136 @@
} }
} }
}, },
"v1.SelfSubjectRulesReview": {
"id": "v1.SelfSubjectRulesReview",
"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.",
"required": [
"spec"
],
"properties": {
"kind": {
"type": "string",
"description": "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"
},
"apiVersion": {
"type": "string",
"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/api-conventions.md#resources"
},
"metadata": {
"$ref": "v1.ObjectMeta"
},
"spec": {
"$ref": "v1.SelfSubjectRulesReviewSpec",
"description": "Spec holds information about the request being evaluated."
},
"status": {
"$ref": "v1.SubjectRulesReviewStatus",
"description": "Status is filled in by the server and indicates the set of actions a user can perform."
}
}
},
"v1.SelfSubjectRulesReviewSpec": {
"id": "v1.SelfSubjectRulesReviewSpec",
"properties": {
"namespace": {
"type": "string",
"description": "Namespace to evaluate rules for. Required."
}
}
},
"v1.SubjectRulesReviewStatus": {
"id": "v1.SubjectRulesReviewStatus",
"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.",
"required": [
"resourceRules",
"nonResourceRules",
"incomplete"
],
"properties": {
"resourceRules": {
"type": "array",
"items": {
"$ref": "v1.ResourceRule"
},
"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."
},
"nonResourceRules": {
"type": "array",
"items": {
"$ref": "v1.NonResourceRule"
},
"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."
},
"incomplete": {
"type": "boolean",
"description": "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."
},
"evaluationError": {
"type": "string",
"description": "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."
}
}
},
"v1.ResourceRule": {
"id": "v1.ResourceRule",
"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.",
"required": [
"verbs"
],
"properties": {
"verbs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all."
},
"apiGroups": {
"type": "array",
"items": {
"type": "string"
},
"description": "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."
},
"resources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources. \"*\" means all."
},
"resourceNames": {
"type": "array",
"items": {
"type": "string"
},
"description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all."
}
}
},
"v1.NonResourceRule": {
"id": "v1.NonResourceRule",
"description": "NonResourceRule holds information that describes a rule for the non-resource",
"required": [
"verbs"
],
"properties": {
"verbs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all."
},
"nonResourceURLs": {
"type": "array",
"items": {
"type": "string"
},
"description": "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."
}
}
},
"v1.SubjectAccessReview": { "v1.SubjectAccessReview": {
"id": "v1.SubjectAccessReview", "id": "v1.SubjectAccessReview",
"description": "SubjectAccessReview checks whether or not a user or group can perform an action.", "description": "SubjectAccessReview checks whether or not a user or group can perform an action.",

View File

@ -106,6 +106,51 @@
} }
] ]
}, },
{
"path": "/apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews",
"description": "API at /apis/authorization.k8s.io/v1beta1",
"operations": [
{
"type": "v1beta1.SelfSubjectRulesReview",
"method": "POST",
"summary": "create a SelfSubjectRulesReview",
"nickname": "createSelfSubjectRulesReview",
"parameters": [
{
"type": "string",
"paramType": "query",
"name": "pretty",
"description": "If 'true', then the output is pretty printed.",
"required": false,
"allowMultiple": false
},
{
"type": "v1beta1.SelfSubjectRulesReview",
"paramType": "body",
"name": "body",
"description": "",
"required": true,
"allowMultiple": false
}
],
"responseMessages": [
{
"code": 200,
"message": "OK",
"responseModel": "v1beta1.SelfSubjectRulesReview"
}
],
"produces": [
"application/json",
"application/yaml",
"application/vnd.kubernetes.protobuf"
],
"consumes": [
"*/*"
]
}
]
},
{ {
"path": "/apis/authorization.k8s.io/v1beta1/subjectaccessreviews", "path": "/apis/authorization.k8s.io/v1beta1/subjectaccessreviews",
"description": "API at /apis/authorization.k8s.io/v1beta1", "description": "API at /apis/authorization.k8s.io/v1beta1",
@ -600,6 +645,136 @@
} }
} }
}, },
"v1beta1.SelfSubjectRulesReview": {
"id": "v1beta1.SelfSubjectRulesReview",
"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.",
"required": [
"spec"
],
"properties": {
"kind": {
"type": "string",
"description": "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"
},
"apiVersion": {
"type": "string",
"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/api-conventions.md#resources"
},
"metadata": {
"$ref": "v1.ObjectMeta"
},
"spec": {
"$ref": "v1beta1.SelfSubjectRulesReviewSpec",
"description": "Spec holds information about the request being evaluated."
},
"status": {
"$ref": "v1beta1.SubjectRulesReviewStatus",
"description": "Status is filled in by the server and indicates the set of actions a user can perform."
}
}
},
"v1beta1.SelfSubjectRulesReviewSpec": {
"id": "v1beta1.SelfSubjectRulesReviewSpec",
"properties": {
"namespace": {
"type": "string",
"description": "Namespace to evaluate rules for. Required."
}
}
},
"v1beta1.SubjectRulesReviewStatus": {
"id": "v1beta1.SubjectRulesReviewStatus",
"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.",
"required": [
"resourceRules",
"nonResourceRules",
"incomplete"
],
"properties": {
"resourceRules": {
"type": "array",
"items": {
"$ref": "v1beta1.ResourceRule"
},
"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."
},
"nonResourceRules": {
"type": "array",
"items": {
"$ref": "v1beta1.NonResourceRule"
},
"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."
},
"incomplete": {
"type": "boolean",
"description": "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."
},
"evaluationError": {
"type": "string",
"description": "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."
}
}
},
"v1beta1.ResourceRule": {
"id": "v1beta1.ResourceRule",
"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.",
"required": [
"verbs"
],
"properties": {
"verbs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all."
},
"apiGroups": {
"type": "array",
"items": {
"type": "string"
},
"description": "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."
},
"resources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources. \"*\" means all."
},
"resourceNames": {
"type": "array",
"items": {
"type": "string"
},
"description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all."
}
}
},
"v1beta1.NonResourceRule": {
"id": "v1beta1.NonResourceRule",
"description": "NonResourceRule holds information that describes a rule for the non-resource",
"required": [
"verbs"
],
"properties": {
"verbs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all."
},
"nonResourceURLs": {
"type": "array",
"items": {
"type": "string"
},
"description": "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."
}
}
},
"v1beta1.SubjectAccessReview": { "v1beta1.SubjectAccessReview": {
"id": "v1beta1.SubjectAccessReview", "id": "v1beta1.SubjectAccessReview",
"description": "SubjectAccessReview checks whether or not a user or group can perform an action.", "description": "SubjectAccessReview checks whether or not a user or group can perform an action.",

View File

@ -370,6 +370,9 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><a href="#_v1_selfsubjectrulesreview">v1.SelfSubjectRulesReview</a></p>
</li>
<li>
<p><a href="#_v1_selfsubjectaccessreview">v1.SelfSubjectAccessReview</a></p> <p><a href="#_v1_selfsubjectaccessreview">v1.SelfSubjectAccessReview</a></p>
</li> </li>
<li> <li>
@ -700,6 +703,37 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_selfsubjectrulesreviewspec">v1.SelfSubjectRulesReviewSpec</h3>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">namespace</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Namespace to evaluate rules for. Required.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_status">v1.Status</h3> <h3 id="_v1_status">v1.Status</h3>
@ -1165,6 +1199,61 @@ When an object is created, the system will populate this list with the current s
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_subjectrulesreviewstatus">v1.SubjectRulesReviewStatus</h3>
<div class="paragraph">
<p>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&#8217;s safe to assume the subject has that permission, even if that list is incomplete.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resourceRules</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn&#8217;t significant, may contain duplicates, and possibly be incomplete.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_resourcerule">v1.ResourceRule</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">nonResourceRules</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn&#8217;t significant, may contain duplicates, and possibly be incomplete.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_nonresourcerule">v1.NonResourceRule</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">incomplete</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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&#8217;t support rules evaluation.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">evaluationError</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn&#8217;t support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_apiresource">v1.APIResource</h3> <h3 id="_v1_apiresource">v1.APIResource</h3>
@ -1296,6 +1385,61 @@ When an object is created, the system will populate this list with the current s
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_resourcerule">v1.ResourceRule</h3>
<div class="paragraph">
<p>ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn&#8217;t significant, may contain duplicates, and possibly be incomplete.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">verbs</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">apiGroups</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resources</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resourceNames</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_statuscause">v1.StatusCause</h3> <h3 id="_v1_statuscause">v1.StatusCause</h3>
@ -1410,6 +1554,47 @@ Examples:<br>
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_nonresourcerule">v1.NonResourceRule</h3>
<div class="paragraph">
<p>NonResourceRule holds information that describes a rule for the non-resource</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">verbs</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">nonResourceURLs</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">NonResourceURLs is a set of partial urls that a user should have access to. <strong>s are allowed, but only as the full, final step in the path. "</strong>" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_selfsubjectaccessreview">v1.SelfSubjectAccessReview</h3> <h3 id="_v1_selfsubjectaccessreview">v1.SelfSubjectAccessReview</h3>
@ -1534,6 +1719,68 @@ Examples:<br>
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1_selfsubjectrulesreview">v1.SelfSubjectRulesReview</h3>
<div class="paragraph">
<p>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&#8217;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.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">kind</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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: <a href="https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds">https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">apiVersion</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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: <a href="https://git.k8s.io/community/contributors/devel/api-conventions.md#resources">https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">metadata</p></td>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_objectmeta">v1.ObjectMeta</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spec</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Spec holds information about the request being evaluated.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_selfsubjectrulesreviewspec">v1.SelfSubjectRulesReviewSpec</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">status</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Status is filled in by the server and indicates the set of actions a user can perform.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_subjectrulesreviewstatus">v1.SubjectRulesReviewStatus</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_any">any</h3> <h3 id="_any">any</h3>

View File

@ -673,10 +673,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_create_a_subjectaccessreview">create a SubjectAccessReview</h3> <h3 id="_create_a_selfsubjectrulesreview">create a SelfSubjectRulesReview</h3>
<div class="listingblock"> <div class="listingblock">
<div class="content"> <div class="content">
<pre>POST /apis/authorization.k8s.io/v1/subjectaccessreviews</pre> <pre>POST /apis/authorization.k8s.io/v1/selfsubjectrulesreviews</pre>
</div> </div>
</div> </div>
<div class="sect3"> <div class="sect3">
@ -714,7 +714,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">body</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">body</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1_subjectaccessreview">v1.SubjectAccessReview</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1_selfsubjectrulesreview">v1.SelfSubjectRulesReview</a></p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
</tbody> </tbody>
@ -740,7 +740,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">200</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">200</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">success</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">success</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1_subjectaccessreview">v1.SubjectAccessReview</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1_selfsubjectrulesreview">v1.SelfSubjectRulesReview</a></p></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -783,6 +783,117 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</div> </div>
</div> </div>
</div> </div>
<div class="sect2">
<h3 id="_create_a_subjectaccessreview">create a SubjectAccessReview</h3>
<div class="listingblock">
<div class="content">
<pre>POST /apis/authorization.k8s.io/v1/subjectaccessreviews</pre>
</div>
</div>
<div class="sect3">
<h4 id="_parameters_4">Parameters</h4>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:16%;">
<col style="width:16%;">
<col style="width:16%;">
<col style="width:16%;">
<col style="width:16%;">
<col style="width:16%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Type</th>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">QueryParameter</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">pretty</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>true</em>, then the output is pretty printed.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">BodyParameter</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">body</p></td>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1_subjectaccessreview">v1.SubjectAccessReview</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_responses_5">Responses</h4>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:33%;">
<col style="width:33%;">
<col style="width:33%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">HTTP Code</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Schema</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">200</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">success</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1_subjectaccessreview">v1.SubjectAccessReview</a></p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_consumes_5">Consumes</h4>
<div class="ulist">
<ul>
<li>
<p><strong>/</strong></p>
</li>
</ul>
</div>
</div>
<div class="sect3">
<h4 id="_produces_5">Produces</h4>
<div class="ulist">
<ul>
<li>
<p>application/json</p>
</li>
<li>
<p>application/yaml</p>
</li>
<li>
<p>application/vnd.kubernetes.protobuf</p>
</li>
</ul>
</div>
</div>
<div class="sect3">
<h4 id="_tags_5">Tags</h4>
<div class="ulist">
<ul>
<li>
<p>apisauthorization.k8s.iov1</p>
</li>
</ul>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -370,6 +370,9 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><a href="#_v1beta1_selfsubjectrulesreview">v1beta1.SelfSubjectRulesReview</a></p>
</li>
<li>
<p><a href="#_v1beta1_selfsubjectaccessreview">v1beta1.SelfSubjectAccessReview</a></p> <p><a href="#_v1beta1_selfsubjectaccessreview">v1beta1.SelfSubjectAccessReview</a></p>
</li> </li>
<li> <li>
@ -611,6 +614,61 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1beta1_subjectrulesreviewstatus">v1beta1.SubjectRulesReviewStatus</h3>
<div class="paragraph">
<p>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&#8217;s safe to assume the subject has that permission, even if that list is incomplete.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resourceRules</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn&#8217;t significant, may contain duplicates, and possibly be incomplete.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_resourcerule">v1beta1.ResourceRule</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">nonResourceRules</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn&#8217;t significant, may contain duplicates, and possibly be incomplete.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_nonresourcerule">v1beta1.NonResourceRule</a> array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">incomplete</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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&#8217;t support rules evaluation.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">evaluationError</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn&#8217;t support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1_initializers">v1.Initializers</h3> <h3 id="_v1_initializers">v1.Initializers</h3>
@ -941,6 +999,68 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1beta1_selfsubjectrulesreview">v1beta1.SelfSubjectRulesReview</h3>
<div class="paragraph">
<p>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&#8217;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.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">kind</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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: <a href="https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds">https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">apiVersion</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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: <a href="https://git.k8s.io/community/contributors/devel/api-conventions.md#resources">https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">metadata</p></td>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_objectmeta">v1.ObjectMeta</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spec</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Spec holds information about the request being evaluated.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_selfsubjectrulesreviewspec">v1beta1.SelfSubjectRulesReviewSpec</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">status</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Status is filled in by the server and indicates the set of actions a user can perform.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1beta1_subjectrulesreviewstatus">v1beta1.SubjectRulesReviewStatus</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1beta1_subjectaccessreviewstatus">v1beta1.SubjectAccessReviewStatus</h3> <h3 id="_v1beta1_subjectaccessreviewstatus">v1beta1.SubjectAccessReviewStatus</h3>
@ -1213,6 +1333,133 @@ When an object is created, the system will populate this list with the current s
</tbody> </tbody>
</table> </table>
</div>
<div class="sect2">
<h3 id="_v1beta1_selfsubjectrulesreviewspec">v1beta1.SelfSubjectRulesReviewSpec</h3>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">namespace</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Namespace to evaluate rules for. Required.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1beta1_nonresourcerule">v1beta1.NonResourceRule</h3>
<div class="paragraph">
<p>NonResourceRule holds information that describes a rule for the non-resource</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">verbs</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">nonResourceURLs</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">NonResourceURLs is a set of partial urls that a user should have access to. <strong>s are allowed, but only as the full, final step in the path. "</strong>" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_v1beta1_resourcerule">v1beta1.ResourceRule</h3>
<div class="paragraph">
<p>ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn&#8217;t significant, may contain duplicates, and possibly be incomplete.</p>
</div>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
<col style="width:20%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">verbs</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">apiGroups</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resources</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">resourceNames</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_v1beta1_selfsubjectaccessreview">v1beta1.SelfSubjectAccessReview</h3> <h3 id="_v1beta1_selfsubjectaccessreview">v1beta1.SelfSubjectAccessReview</h3>

View File

@ -673,10 +673,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</div> </div>
</div> </div>
<div class="sect2"> <div class="sect2">
<h3 id="_create_a_subjectaccessreview">create a SubjectAccessReview</h3> <h3 id="_create_a_selfsubjectrulesreview">create a SelfSubjectRulesReview</h3>
<div class="listingblock"> <div class="listingblock">
<div class="content"> <div class="content">
<pre>POST /apis/authorization.k8s.io/v1beta1/subjectaccessreviews</pre> <pre>POST /apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews</pre>
</div> </div>
</div> </div>
<div class="sect3"> <div class="sect3">
@ -714,7 +714,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<td class="tableblock halign-left valign-top"><p class="tableblock">body</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">body</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1beta1_subjectaccessreview">v1beta1.SubjectAccessReview</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1beta1_selfsubjectrulesreview">v1beta1.SelfSubjectRulesReview</a></p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
</tr> </tr>
</tbody> </tbody>
@ -740,7 +740,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">200</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">200</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">success</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">success</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1beta1_subjectaccessreview">v1beta1.SubjectAccessReview</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1beta1_selfsubjectrulesreview">v1beta1.SelfSubjectRulesReview</a></p></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -783,6 +783,117 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</div> </div>
</div> </div>
</div> </div>
<div class="sect2">
<h3 id="_create_a_subjectaccessreview">create a SubjectAccessReview</h3>
<div class="listingblock">
<div class="content">
<pre>POST /apis/authorization.k8s.io/v1beta1/subjectaccessreviews</pre>
</div>
</div>
<div class="sect3">
<h4 id="_parameters_4">Parameters</h4>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:16%;">
<col style="width:16%;">
<col style="width:16%;">
<col style="width:16%;">
<col style="width:16%;">
<col style="width:16%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Type</th>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Required</th>
<th class="tableblock halign-left valign-top">Schema</th>
<th class="tableblock halign-left valign-top">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">QueryParameter</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">pretty</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">If <em>true</em>, then the output is pretty printed.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">BodyParameter</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">body</p></td>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1beta1_subjectaccessreview">v1beta1.SubjectAccessReview</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_responses_5">Responses</h4>
<table class="tableblock frame-all grid-all" style="width:100%; ">
<colgroup>
<col style="width:33%;">
<col style="width:33%;">
<col style="width:33%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">HTTP Code</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Schema</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">200</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">success</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="../definitions#_v1beta1_subjectaccessreview">v1beta1.SubjectAccessReview</a></p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_consumes_5">Consumes</h4>
<div class="ulist">
<ul>
<li>
<p><strong>/</strong></p>
</li>
</ul>
</div>
</div>
<div class="sect3">
<h4 id="_produces_5">Produces</h4>
<div class="ulist">
<ul>
<li>
<p>application/json</p>
</li>
<li>
<p>application/yaml</p>
</li>
<li>
<p>application/vnd.kubernetes.protobuf</p>
</li>
</ul>
</div>
</div>
<div class="sect3">
<h4 id="_tags_5">Tags</h4>
<div class="ulist">
<ul>
<li>
<p>apisauthorization.k8s.iov1beta1</p>
</li>
</ul>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -40,18 +40,28 @@ func RegisterConversions(scheme *runtime.Scheme) error {
Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview, Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview,
Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes, Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes,
Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes, Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes,
Convert_v1_NonResourceRule_To_authorization_NonResourceRule,
Convert_authorization_NonResourceRule_To_v1_NonResourceRule,
Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes, Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes,
Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes, Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes,
Convert_v1_ResourceRule_To_authorization_ResourceRule,
Convert_authorization_ResourceRule_To_v1_ResourceRule,
Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview, Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview,
Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview, Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview,
Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec, Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec,
Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec, Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec,
Convert_v1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview,
Convert_authorization_SelfSubjectRulesReview_To_v1_SelfSubjectRulesReview,
Convert_v1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec,
Convert_authorization_SelfSubjectRulesReviewSpec_To_v1_SelfSubjectRulesReviewSpec,
Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview, Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview,
Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview, Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview,
Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec, Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec,
Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec, Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec,
Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus, Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus,
Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus, Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus,
Convert_v1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus,
Convert_authorization_SubjectRulesReviewStatus_To_v1_SubjectRulesReviewStatus,
) )
} }
@ -109,6 +119,28 @@ func Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in
return autoConvert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in, out, s) return autoConvert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in, out, s)
} }
func autoConvert_v1_NonResourceRule_To_authorization_NonResourceRule(in *v1.NonResourceRule, out *authorization.NonResourceRule, s conversion.Scope) error {
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
return nil
}
// Convert_v1_NonResourceRule_To_authorization_NonResourceRule is an autogenerated conversion function.
func Convert_v1_NonResourceRule_To_authorization_NonResourceRule(in *v1.NonResourceRule, out *authorization.NonResourceRule, s conversion.Scope) error {
return autoConvert_v1_NonResourceRule_To_authorization_NonResourceRule(in, out, s)
}
func autoConvert_authorization_NonResourceRule_To_v1_NonResourceRule(in *authorization.NonResourceRule, out *v1.NonResourceRule, s conversion.Scope) error {
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
return nil
}
// Convert_authorization_NonResourceRule_To_v1_NonResourceRule is an autogenerated conversion function.
func Convert_authorization_NonResourceRule_To_v1_NonResourceRule(in *authorization.NonResourceRule, out *v1.NonResourceRule, s conversion.Scope) error {
return autoConvert_authorization_NonResourceRule_To_v1_NonResourceRule(in, out, s)
}
func autoConvert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in *v1.ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error { func autoConvert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in *v1.ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
out.Namespace = in.Namespace out.Namespace = in.Namespace
out.Verb = in.Verb out.Verb = in.Verb
@ -141,6 +173,32 @@ func Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in *autho
return autoConvert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in, out, s) return autoConvert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in, out, s)
} }
func autoConvert_v1_ResourceRule_To_authorization_ResourceRule(in *v1.ResourceRule, out *authorization.ResourceRule, s conversion.Scope) error {
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
return nil
}
// Convert_v1_ResourceRule_To_authorization_ResourceRule is an autogenerated conversion function.
func Convert_v1_ResourceRule_To_authorization_ResourceRule(in *v1.ResourceRule, out *authorization.ResourceRule, s conversion.Scope) error {
return autoConvert_v1_ResourceRule_To_authorization_ResourceRule(in, out, s)
}
func autoConvert_authorization_ResourceRule_To_v1_ResourceRule(in *authorization.ResourceRule, out *v1.ResourceRule, s conversion.Scope) error {
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
return nil
}
// Convert_authorization_ResourceRule_To_v1_ResourceRule is an autogenerated conversion function.
func Convert_authorization_ResourceRule_To_v1_ResourceRule(in *authorization.ResourceRule, out *v1.ResourceRule, s conversion.Scope) error {
return autoConvert_authorization_ResourceRule_To_v1_ResourceRule(in, out, s)
}
func autoConvert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *v1.SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error { func autoConvert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *v1.SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta out.ObjectMeta = in.ObjectMeta
if err := Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { if err := Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
@ -195,6 +253,58 @@ func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessRe
return autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in, out, s) return autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in, out, s)
} }
func autoConvert_v1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview(in *v1.SelfSubjectRulesReview, out *authorization.SelfSubjectRulesReview, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_v1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview is an autogenerated conversion function.
func Convert_v1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview(in *v1.SelfSubjectRulesReview, out *authorization.SelfSubjectRulesReview, s conversion.Scope) error {
return autoConvert_v1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview(in, out, s)
}
func autoConvert_authorization_SelfSubjectRulesReview_To_v1_SelfSubjectRulesReview(in *authorization.SelfSubjectRulesReview, out *v1.SelfSubjectRulesReview, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_authorization_SelfSubjectRulesReviewSpec_To_v1_SelfSubjectRulesReviewSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_authorization_SubjectRulesReviewStatus_To_v1_SubjectRulesReviewStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_authorization_SelfSubjectRulesReview_To_v1_SelfSubjectRulesReview is an autogenerated conversion function.
func Convert_authorization_SelfSubjectRulesReview_To_v1_SelfSubjectRulesReview(in *authorization.SelfSubjectRulesReview, out *v1.SelfSubjectRulesReview, s conversion.Scope) error {
return autoConvert_authorization_SelfSubjectRulesReview_To_v1_SelfSubjectRulesReview(in, out, s)
}
func autoConvert_v1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec(in *v1.SelfSubjectRulesReviewSpec, out *authorization.SelfSubjectRulesReviewSpec, s conversion.Scope) error {
out.Namespace = in.Namespace
return nil
}
// Convert_v1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec is an autogenerated conversion function.
func Convert_v1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec(in *v1.SelfSubjectRulesReviewSpec, out *authorization.SelfSubjectRulesReviewSpec, s conversion.Scope) error {
return autoConvert_v1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec(in, out, s)
}
func autoConvert_authorization_SelfSubjectRulesReviewSpec_To_v1_SelfSubjectRulesReviewSpec(in *authorization.SelfSubjectRulesReviewSpec, out *v1.SelfSubjectRulesReviewSpec, s conversion.Scope) error {
out.Namespace = in.Namespace
return nil
}
// Convert_authorization_SelfSubjectRulesReviewSpec_To_v1_SelfSubjectRulesReviewSpec is an autogenerated conversion function.
func Convert_authorization_SelfSubjectRulesReviewSpec_To_v1_SelfSubjectRulesReviewSpec(in *authorization.SelfSubjectRulesReviewSpec, out *v1.SelfSubjectRulesReviewSpec, s conversion.Scope) error {
return autoConvert_authorization_SelfSubjectRulesReviewSpec_To_v1_SelfSubjectRulesReviewSpec(in, out, s)
}
func autoConvert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *v1.SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error { func autoConvert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *v1.SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta out.ObjectMeta = in.ObjectMeta
if err := Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { if err := Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
@ -280,3 +390,29 @@ func autoConvert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessRevi
func Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *v1.SubjectAccessReviewStatus, s conversion.Scope) error { func Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *v1.SubjectAccessReviewStatus, s conversion.Scope) error {
return autoConvert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in, out, s) return autoConvert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in, out, s)
} }
func autoConvert_v1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus(in *v1.SubjectRulesReviewStatus, out *authorization.SubjectRulesReviewStatus, s conversion.Scope) error {
out.ResourceRules = *(*[]authorization.ResourceRule)(unsafe.Pointer(&in.ResourceRules))
out.NonResourceRules = *(*[]authorization.NonResourceRule)(unsafe.Pointer(&in.NonResourceRules))
out.Incomplete = in.Incomplete
out.EvaluationError = in.EvaluationError
return nil
}
// Convert_v1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus is an autogenerated conversion function.
func Convert_v1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus(in *v1.SubjectRulesReviewStatus, out *authorization.SubjectRulesReviewStatus, s conversion.Scope) error {
return autoConvert_v1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus(in, out, s)
}
func autoConvert_authorization_SubjectRulesReviewStatus_To_v1_SubjectRulesReviewStatus(in *authorization.SubjectRulesReviewStatus, out *v1.SubjectRulesReviewStatus, s conversion.Scope) error {
out.ResourceRules = *(*[]v1.ResourceRule)(unsafe.Pointer(&in.ResourceRules))
out.NonResourceRules = *(*[]v1.NonResourceRule)(unsafe.Pointer(&in.NonResourceRules))
out.Incomplete = in.Incomplete
out.EvaluationError = in.EvaluationError
return nil
}
// Convert_authorization_SubjectRulesReviewStatus_To_v1_SubjectRulesReviewStatus is an autogenerated conversion function.
func Convert_authorization_SubjectRulesReviewStatus_To_v1_SubjectRulesReviewStatus(in *authorization.SubjectRulesReviewStatus, out *v1.SubjectRulesReviewStatus, s conversion.Scope) error {
return autoConvert_authorization_SubjectRulesReviewStatus_To_v1_SubjectRulesReviewStatus(in, out, s)
}

View File

@ -40,18 +40,28 @@ func RegisterConversions(scheme *runtime.Scheme) error {
Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview, Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview,
Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes, Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes,
Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes, Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes,
Convert_v1beta1_NonResourceRule_To_authorization_NonResourceRule,
Convert_authorization_NonResourceRule_To_v1beta1_NonResourceRule,
Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes, Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes,
Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes, Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes,
Convert_v1beta1_ResourceRule_To_authorization_ResourceRule,
Convert_authorization_ResourceRule_To_v1beta1_ResourceRule,
Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview, Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview,
Convert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview, Convert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview,
Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec, Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec,
Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec, Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec,
Convert_v1beta1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview,
Convert_authorization_SelfSubjectRulesReview_To_v1beta1_SelfSubjectRulesReview,
Convert_v1beta1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec,
Convert_authorization_SelfSubjectRulesReviewSpec_To_v1beta1_SelfSubjectRulesReviewSpec,
Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview, Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview,
Convert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview, Convert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview,
Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec, Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec,
Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec, Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec,
Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus, Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus,
Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus, Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus,
Convert_v1beta1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus,
Convert_authorization_SubjectRulesReviewStatus_To_v1beta1_SubjectRulesReviewStatus,
) )
} }
@ -109,6 +119,28 @@ func Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttribute
return autoConvert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(in, out, s) return autoConvert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(in, out, s)
} }
func autoConvert_v1beta1_NonResourceRule_To_authorization_NonResourceRule(in *v1beta1.NonResourceRule, out *authorization.NonResourceRule, s conversion.Scope) error {
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
return nil
}
// Convert_v1beta1_NonResourceRule_To_authorization_NonResourceRule is an autogenerated conversion function.
func Convert_v1beta1_NonResourceRule_To_authorization_NonResourceRule(in *v1beta1.NonResourceRule, out *authorization.NonResourceRule, s conversion.Scope) error {
return autoConvert_v1beta1_NonResourceRule_To_authorization_NonResourceRule(in, out, s)
}
func autoConvert_authorization_NonResourceRule_To_v1beta1_NonResourceRule(in *authorization.NonResourceRule, out *v1beta1.NonResourceRule, s conversion.Scope) error {
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
return nil
}
// Convert_authorization_NonResourceRule_To_v1beta1_NonResourceRule is an autogenerated conversion function.
func Convert_authorization_NonResourceRule_To_v1beta1_NonResourceRule(in *authorization.NonResourceRule, out *v1beta1.NonResourceRule, s conversion.Scope) error {
return autoConvert_authorization_NonResourceRule_To_v1beta1_NonResourceRule(in, out, s)
}
func autoConvert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(in *v1beta1.ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error { func autoConvert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(in *v1beta1.ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
out.Namespace = in.Namespace out.Namespace = in.Namespace
out.Verb = in.Verb out.Verb = in.Verb
@ -141,6 +173,32 @@ func Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in *
return autoConvert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in, out, s) return autoConvert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in, out, s)
} }
func autoConvert_v1beta1_ResourceRule_To_authorization_ResourceRule(in *v1beta1.ResourceRule, out *authorization.ResourceRule, s conversion.Scope) error {
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
return nil
}
// Convert_v1beta1_ResourceRule_To_authorization_ResourceRule is an autogenerated conversion function.
func Convert_v1beta1_ResourceRule_To_authorization_ResourceRule(in *v1beta1.ResourceRule, out *authorization.ResourceRule, s conversion.Scope) error {
return autoConvert_v1beta1_ResourceRule_To_authorization_ResourceRule(in, out, s)
}
func autoConvert_authorization_ResourceRule_To_v1beta1_ResourceRule(in *authorization.ResourceRule, out *v1beta1.ResourceRule, s conversion.Scope) error {
out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
return nil
}
// Convert_authorization_ResourceRule_To_v1beta1_ResourceRule is an autogenerated conversion function.
func Convert_authorization_ResourceRule_To_v1beta1_ResourceRule(in *authorization.ResourceRule, out *v1beta1.ResourceRule, s conversion.Scope) error {
return autoConvert_authorization_ResourceRule_To_v1beta1_ResourceRule(in, out, s)
}
func autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *v1beta1.SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error { func autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *v1beta1.SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta out.ObjectMeta = in.ObjectMeta
if err := Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { if err := Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
@ -195,6 +253,58 @@ func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAcc
return autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(in, out, s) return autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(in, out, s)
} }
func autoConvert_v1beta1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview(in *v1beta1.SelfSubjectRulesReview, out *authorization.SelfSubjectRulesReview, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1beta1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1beta1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_v1beta1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview is an autogenerated conversion function.
func Convert_v1beta1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview(in *v1beta1.SelfSubjectRulesReview, out *authorization.SelfSubjectRulesReview, s conversion.Scope) error {
return autoConvert_v1beta1_SelfSubjectRulesReview_To_authorization_SelfSubjectRulesReview(in, out, s)
}
func autoConvert_authorization_SelfSubjectRulesReview_To_v1beta1_SelfSubjectRulesReview(in *authorization.SelfSubjectRulesReview, out *v1beta1.SelfSubjectRulesReview, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_authorization_SelfSubjectRulesReviewSpec_To_v1beta1_SelfSubjectRulesReviewSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_authorization_SubjectRulesReviewStatus_To_v1beta1_SubjectRulesReviewStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_authorization_SelfSubjectRulesReview_To_v1beta1_SelfSubjectRulesReview is an autogenerated conversion function.
func Convert_authorization_SelfSubjectRulesReview_To_v1beta1_SelfSubjectRulesReview(in *authorization.SelfSubjectRulesReview, out *v1beta1.SelfSubjectRulesReview, s conversion.Scope) error {
return autoConvert_authorization_SelfSubjectRulesReview_To_v1beta1_SelfSubjectRulesReview(in, out, s)
}
func autoConvert_v1beta1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec(in *v1beta1.SelfSubjectRulesReviewSpec, out *authorization.SelfSubjectRulesReviewSpec, s conversion.Scope) error {
out.Namespace = in.Namespace
return nil
}
// Convert_v1beta1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec is an autogenerated conversion function.
func Convert_v1beta1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec(in *v1beta1.SelfSubjectRulesReviewSpec, out *authorization.SelfSubjectRulesReviewSpec, s conversion.Scope) error {
return autoConvert_v1beta1_SelfSubjectRulesReviewSpec_To_authorization_SelfSubjectRulesReviewSpec(in, out, s)
}
func autoConvert_authorization_SelfSubjectRulesReviewSpec_To_v1beta1_SelfSubjectRulesReviewSpec(in *authorization.SelfSubjectRulesReviewSpec, out *v1beta1.SelfSubjectRulesReviewSpec, s conversion.Scope) error {
out.Namespace = in.Namespace
return nil
}
// Convert_authorization_SelfSubjectRulesReviewSpec_To_v1beta1_SelfSubjectRulesReviewSpec is an autogenerated conversion function.
func Convert_authorization_SelfSubjectRulesReviewSpec_To_v1beta1_SelfSubjectRulesReviewSpec(in *authorization.SelfSubjectRulesReviewSpec, out *v1beta1.SelfSubjectRulesReviewSpec, s conversion.Scope) error {
return autoConvert_authorization_SelfSubjectRulesReviewSpec_To_v1beta1_SelfSubjectRulesReviewSpec(in, out, s)
}
func autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *v1beta1.SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error { func autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *v1beta1.SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta out.ObjectMeta = in.ObjectMeta
if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
@ -280,3 +390,29 @@ func autoConvert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAcces
func Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *v1beta1.SubjectAccessReviewStatus, s conversion.Scope) error { func Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *v1beta1.SubjectAccessReviewStatus, s conversion.Scope) error {
return autoConvert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in, out, s) return autoConvert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in, out, s)
} }
func autoConvert_v1beta1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus(in *v1beta1.SubjectRulesReviewStatus, out *authorization.SubjectRulesReviewStatus, s conversion.Scope) error {
out.ResourceRules = *(*[]authorization.ResourceRule)(unsafe.Pointer(&in.ResourceRules))
out.NonResourceRules = *(*[]authorization.NonResourceRule)(unsafe.Pointer(&in.NonResourceRules))
out.Incomplete = in.Incomplete
out.EvaluationError = in.EvaluationError
return nil
}
// Convert_v1beta1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus is an autogenerated conversion function.
func Convert_v1beta1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus(in *v1beta1.SubjectRulesReviewStatus, out *authorization.SubjectRulesReviewStatus, s conversion.Scope) error {
return autoConvert_v1beta1_SubjectRulesReviewStatus_To_authorization_SubjectRulesReviewStatus(in, out, s)
}
func autoConvert_authorization_SubjectRulesReviewStatus_To_v1beta1_SubjectRulesReviewStatus(in *authorization.SubjectRulesReviewStatus, out *v1beta1.SubjectRulesReviewStatus, s conversion.Scope) error {
out.ResourceRules = *(*[]v1beta1.ResourceRule)(unsafe.Pointer(&in.ResourceRules))
out.NonResourceRules = *(*[]v1beta1.NonResourceRule)(unsafe.Pointer(&in.NonResourceRules))
out.Incomplete = in.Incomplete
out.EvaluationError = in.EvaluationError
return nil
}
// Convert_authorization_SubjectRulesReviewStatus_To_v1beta1_SubjectRulesReviewStatus is an autogenerated conversion function.
func Convert_authorization_SubjectRulesReviewStatus_To_v1beta1_SubjectRulesReviewStatus(in *authorization.SubjectRulesReviewStatus, out *v1beta1.SubjectRulesReviewStatus, s conversion.Scope) error {
return autoConvert_authorization_SubjectRulesReviewStatus_To_v1beta1_SubjectRulesReviewStatus(in, out, s)
}

View File

@ -44,10 +44,18 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*NonResourceAttributes).DeepCopyInto(out.(*NonResourceAttributes)) in.(*NonResourceAttributes).DeepCopyInto(out.(*NonResourceAttributes))
return nil return nil
}, InType: reflect.TypeOf(&NonResourceAttributes{})}, }, InType: reflect.TypeOf(&NonResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*NonResourceRule).DeepCopyInto(out.(*NonResourceRule))
return nil
}, InType: reflect.TypeOf(&NonResourceRule{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ResourceAttributes).DeepCopyInto(out.(*ResourceAttributes)) in.(*ResourceAttributes).DeepCopyInto(out.(*ResourceAttributes))
return nil return nil
}, InType: reflect.TypeOf(&ResourceAttributes{})}, }, InType: reflect.TypeOf(&ResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ResourceRule).DeepCopyInto(out.(*ResourceRule))
return nil
}, InType: reflect.TypeOf(&ResourceRule{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SelfSubjectAccessReview).DeepCopyInto(out.(*SelfSubjectAccessReview)) in.(*SelfSubjectAccessReview).DeepCopyInto(out.(*SelfSubjectAccessReview))
return nil return nil
@ -56,6 +64,14 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*SelfSubjectAccessReviewSpec).DeepCopyInto(out.(*SelfSubjectAccessReviewSpec)) in.(*SelfSubjectAccessReviewSpec).DeepCopyInto(out.(*SelfSubjectAccessReviewSpec))
return nil return nil
}, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})}, }, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SelfSubjectRulesReview).DeepCopyInto(out.(*SelfSubjectRulesReview))
return nil
}, InType: reflect.TypeOf(&SelfSubjectRulesReview{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SelfSubjectRulesReviewSpec).DeepCopyInto(out.(*SelfSubjectRulesReviewSpec))
return nil
}, InType: reflect.TypeOf(&SelfSubjectRulesReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SubjectAccessReview).DeepCopyInto(out.(*SubjectAccessReview)) in.(*SubjectAccessReview).DeepCopyInto(out.(*SubjectAccessReview))
return nil return nil
@ -68,6 +84,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*SubjectAccessReviewStatus).DeepCopyInto(out.(*SubjectAccessReviewStatus)) in.(*SubjectAccessReviewStatus).DeepCopyInto(out.(*SubjectAccessReviewStatus))
return nil return nil
}, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})}, }, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SubjectRulesReviewStatus).DeepCopyInto(out.(*SubjectRulesReviewStatus))
return nil
}, InType: reflect.TypeOf(&SubjectRulesReviewStatus{})},
) )
} }
@ -116,6 +136,32 @@ func (in *NonResourceAttributes) DeepCopy() *NonResourceAttributes {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NonResourceRule) DeepCopyInto(out *NonResourceRule) {
*out = *in
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.NonResourceURLs != nil {
in, out := &in.NonResourceURLs, &out.NonResourceURLs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonResourceRule.
func (in *NonResourceRule) DeepCopy() *NonResourceRule {
if in == nil {
return nil
}
out := new(NonResourceRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceAttributes) DeepCopyInto(out *ResourceAttributes) { func (in *ResourceAttributes) DeepCopyInto(out *ResourceAttributes) {
*out = *in *out = *in
@ -132,6 +178,42 @@ func (in *ResourceAttributes) DeepCopy() *ResourceAttributes {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceRule) DeepCopyInto(out *ResourceRule) {
*out = *in
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.APIGroups != nil {
in, out := &in.APIGroups, &out.APIGroups
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Resources != nil {
in, out := &in.Resources, &out.Resources
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ResourceNames != nil {
in, out := &in.ResourceNames, &out.ResourceNames
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRule.
func (in *ResourceRule) DeepCopy() *ResourceRule {
if in == nil {
return nil
}
out := new(ResourceRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) { func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) {
*out = *in *out = *in
@ -195,6 +277,51 @@ func (in *SelfSubjectAccessReviewSpec) DeepCopy() *SelfSubjectAccessReviewSpec {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelfSubjectRulesReview) DeepCopyInto(out *SelfSubjectRulesReview) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
in.Status.DeepCopyInto(&out.Status)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReview.
func (in *SelfSubjectRulesReview) DeepCopy() *SelfSubjectRulesReview {
if in == nil {
return nil
}
out := new(SelfSubjectRulesReview)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *SelfSubjectRulesReview) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelfSubjectRulesReviewSpec) DeepCopyInto(out *SelfSubjectRulesReviewSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReviewSpec.
func (in *SelfSubjectRulesReviewSpec) DeepCopy() *SelfSubjectRulesReviewSpec {
if in == nil {
return nil
}
out := new(SelfSubjectRulesReviewSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) { func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) {
*out = *in *out = *in
@ -286,3 +413,33 @@ func (in *SubjectAccessReviewStatus) DeepCopy() *SubjectAccessReviewStatus {
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubjectRulesReviewStatus) DeepCopyInto(out *SubjectRulesReviewStatus) {
*out = *in
if in.ResourceRules != nil {
in, out := &in.ResourceRules, &out.ResourceRules
*out = make([]ResourceRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.NonResourceRules != nil {
in, out := &in.NonResourceRules, &out.NonResourceRules
*out = make([]NonResourceRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectRulesReviewStatus.
func (in *SubjectRulesReviewStatus) DeepCopy() *SubjectRulesReviewStatus {
if in == nil {
return nil
}
out := new(SubjectRulesReviewStatus)
in.DeepCopyInto(out)
return out
}

View File

@ -15,6 +15,7 @@ go_library(
"//pkg/apis/abac/v0:go_default_library", "//pkg/apis/abac/v0:go_default_library",
"//vendor/github.com/golang/glog:go_default_library", "//vendor/github.com/golang/glog:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library",
"//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library",
], ],
) )

View File

@ -15,6 +15,7 @@ go_library(
"localsubjectaccessreview_expansion.go", "localsubjectaccessreview_expansion.go",
"selfsubjectaccessreview.go", "selfsubjectaccessreview.go",
"selfsubjectaccessreview_expansion.go", "selfsubjectaccessreview_expansion.go",
"selfsubjectrulesreview.go",
"subjectaccessreview.go", "subjectaccessreview.go",
"subjectaccessreview_expansion.go", "subjectaccessreview_expansion.go",
], ],

View File

@ -25,6 +25,7 @@ type AuthorizationInterface interface {
RESTClient() rest.Interface RESTClient() rest.Interface
LocalSubjectAccessReviewsGetter LocalSubjectAccessReviewsGetter
SelfSubjectAccessReviewsGetter SelfSubjectAccessReviewsGetter
SelfSubjectRulesReviewsGetter
SubjectAccessReviewsGetter SubjectAccessReviewsGetter
} }
@ -41,6 +42,10 @@ func (c *AuthorizationClient) SelfSubjectAccessReviews() SelfSubjectAccessReview
return newSelfSubjectAccessReviews(c) return newSelfSubjectAccessReviews(c)
} }
func (c *AuthorizationClient) SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface {
return newSelfSubjectRulesReviews(c)
}
func (c *AuthorizationClient) SubjectAccessReviews() SubjectAccessReviewInterface { func (c *AuthorizationClient) SubjectAccessReviews() SubjectAccessReviewInterface {
return newSubjectAccessReviews(c) return newSubjectAccessReviews(c)
} }

View File

@ -15,6 +15,7 @@ go_library(
"fake_localsubjectaccessreview_expansion.go", "fake_localsubjectaccessreview_expansion.go",
"fake_selfsubjectaccessreview.go", "fake_selfsubjectaccessreview.go",
"fake_selfsubjectaccessreview_expansion.go", "fake_selfsubjectaccessreview_expansion.go",
"fake_selfsubjectrulesreview.go",
"fake_subjectaccessreview.go", "fake_subjectaccessreview.go",
"fake_subjectaccessreview_expansion.go", "fake_subjectaccessreview_expansion.go",
], ],

View File

@ -34,6 +34,10 @@ func (c *FakeAuthorization) SelfSubjectAccessReviews() internalversion.SelfSubje
return &FakeSelfSubjectAccessReviews{c} return &FakeSelfSubjectAccessReviews{c}
} }
func (c *FakeAuthorization) SelfSubjectRulesReviews() internalversion.SelfSubjectRulesReviewInterface {
return &FakeSelfSubjectRulesReviews{c}
}
func (c *FakeAuthorization) SubjectAccessReviews() internalversion.SubjectAccessReviewInterface { func (c *FakeAuthorization) SubjectAccessReviews() internalversion.SubjectAccessReviewInterface {
return &FakeSubjectAccessReviews{c} return &FakeSubjectAccessReviews{c}
} }

View File

@ -0,0 +1,22 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
type FakeSelfSubjectRulesReviews struct {
Fake *FakeAuthorization
}

View File

@ -15,3 +15,5 @@ limitations under the License.
*/ */
package internalversion package internalversion
type SelfSubjectRulesReviewExpansion interface{}

View File

@ -0,0 +1,44 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package internalversion
import (
rest "k8s.io/client-go/rest"
)
// SelfSubjectRulesReviewsGetter has a method to return a SelfSubjectRulesReviewInterface.
// A group's client should implement this interface.
type SelfSubjectRulesReviewsGetter interface {
SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface
}
// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
type SelfSubjectRulesReviewInterface interface {
SelfSubjectRulesReviewExpansion
}
// selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
type selfSubjectRulesReviews struct {
client rest.Interface
}
// newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews
func newSelfSubjectRulesReviews(c *AuthorizationClient) *selfSubjectRulesReviews {
return &selfSubjectRulesReviews{
client: c.RESTClient(),
}
}

View File

@ -11,6 +11,7 @@ go_library(
"expansion_generated.go", "expansion_generated.go",
"localsubjectaccessreview.go", "localsubjectaccessreview.go",
"selfsubjectaccessreview.go", "selfsubjectaccessreview.go",
"selfsubjectrulesreview.go",
"subjectaccessreview.go", "subjectaccessreview.go",
], ],
deps = [ deps = [

View File

@ -30,6 +30,10 @@ type LocalSubjectAccessReviewNamespaceListerExpansion interface{}
// SelfSubjectAccessReviewLister. // SelfSubjectAccessReviewLister.
type SelfSubjectAccessReviewListerExpansion interface{} type SelfSubjectAccessReviewListerExpansion interface{}
// SelfSubjectRulesReviewListerExpansion allows custom methods to be added to
// SelfSubjectRulesReviewLister.
type SelfSubjectRulesReviewListerExpansion interface{}
// SubjectAccessReviewListerExpansion allows custom methods to be added to // SubjectAccessReviewListerExpansion allows custom methods to be added to
// SubjectAccessReviewLister. // SubjectAccessReviewLister.
type SubjectAccessReviewListerExpansion interface{} type SubjectAccessReviewListerExpansion interface{}

View File

@ -0,0 +1,67 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by lister-gen
package internalversion
import (
"k8s.io/apimachinery/pkg/api/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
authorization "k8s.io/kubernetes/pkg/apis/authorization"
)
// SelfSubjectRulesReviewLister helps list SelfSubjectRulesReviews.
type SelfSubjectRulesReviewLister interface {
// List lists all SelfSubjectRulesReviews in the indexer.
List(selector labels.Selector) (ret []*authorization.SelfSubjectRulesReview, err error)
// Get retrieves the SelfSubjectRulesReview from the index for a given name.
Get(name string) (*authorization.SelfSubjectRulesReview, error)
SelfSubjectRulesReviewListerExpansion
}
// selfSubjectRulesReviewLister implements the SelfSubjectRulesReviewLister interface.
type selfSubjectRulesReviewLister struct {
indexer cache.Indexer
}
// NewSelfSubjectRulesReviewLister returns a new SelfSubjectRulesReviewLister.
func NewSelfSubjectRulesReviewLister(indexer cache.Indexer) SelfSubjectRulesReviewLister {
return &selfSubjectRulesReviewLister{indexer: indexer}
}
// List lists all SelfSubjectRulesReviews in the indexer.
func (s *selfSubjectRulesReviewLister) List(selector labels.Selector) (ret []*authorization.SelfSubjectRulesReview, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*authorization.SelfSubjectRulesReview))
})
return ret, err
}
// Get retrieves the SelfSubjectRulesReview from the index for a given name.
func (s *selfSubjectRulesReviewLister) Get(name string) (*authorization.SelfSubjectRulesReview, error) {
key := &authorization.SelfSubjectRulesReview{ObjectMeta: v1.ObjectMeta{Name: name}}
obj, exists, err := s.indexer.Get(key)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(authorization.Resource("selfsubjectrulesreview"), name)
}
return obj.(*authorization.SelfSubjectRulesReview), nil
}

View File

@ -32,6 +32,7 @@ filegroup(
"//pkg/registry/authorization/localsubjectaccessreview:all-srcs", "//pkg/registry/authorization/localsubjectaccessreview:all-srcs",
"//pkg/registry/authorization/rest:all-srcs", "//pkg/registry/authorization/rest:all-srcs",
"//pkg/registry/authorization/selfsubjectaccessreview:all-srcs", "//pkg/registry/authorization/selfsubjectaccessreview:all-srcs",
"//pkg/registry/authorization/selfsubjectrulesreview:all-srcs",
"//pkg/registry/authorization/subjectaccessreview:all-srcs", "//pkg/registry/authorization/subjectaccessreview:all-srcs",
"//pkg/registry/authorization/util:all-srcs", "//pkg/registry/authorization/util:all-srcs",
"//pkg/registry/autoscaling/horizontalpodautoscaler:all-srcs", "//pkg/registry/autoscaling/horizontalpodautoscaler:all-srcs",

View File

@ -13,6 +13,7 @@ go_library(
"//pkg/apis/authorization:go_default_library", "//pkg/apis/authorization:go_default_library",
"//pkg/registry/authorization/localsubjectaccessreview:go_default_library", "//pkg/registry/authorization/localsubjectaccessreview:go_default_library",
"//pkg/registry/authorization/selfsubjectaccessreview:go_default_library", "//pkg/registry/authorization/selfsubjectaccessreview:go_default_library",
"//pkg/registry/authorization/selfsubjectrulesreview:go_default_library",
"//pkg/registry/authorization/subjectaccessreview:go_default_library", "//pkg/registry/authorization/subjectaccessreview:go_default_library",
"//vendor/k8s.io/api/authorization/v1:go_default_library", "//vendor/k8s.io/api/authorization/v1:go_default_library",
"//vendor/k8s.io/api/authorization/v1beta1:go_default_library", "//vendor/k8s.io/api/authorization/v1beta1:go_default_library",

View File

@ -0,0 +1,28 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["rest.go"],
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/authorization:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library",
"//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

File diff suppressed because it is too large Load Diff

View File

@ -65,6 +65,17 @@ message NonResourceAttributes {
optional string verb = 2; optional string verb = 2;
} }
// NonResourceRule holds information that describes a rule for the non-resource
message NonResourceRule {
// Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.
repeated string verbs = 1;
// 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.
// +optional
repeated string nonResourceURLs = 2;
}
// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
message ResourceAttributes { message ResourceAttributes {
// Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
@ -99,6 +110,26 @@ message ResourceAttributes {
optional string name = 7; optional string name = 7;
} }
// 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.
message ResourceRule {
// Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.
repeated string verbs = 1;
// 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.
// +optional
repeated string apiGroups = 2;
// Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all.
// +optional
repeated string resources = 3;
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.
// +optional
repeated string resourceNames = 4;
}
// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a // 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 // 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 // to check whether they can perform an action
@ -126,6 +157,29 @@ message SelfSubjectAccessReviewSpec {
optional NonResourceAttributes nonResourceAttributes = 2; optional NonResourceAttributes nonResourceAttributes = 2;
} }
// 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.
message SelfSubjectRulesReview {
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec holds information about the request being evaluated.
optional SelfSubjectRulesReviewSpec spec = 2;
// Status is filled in by the server and indicates the set of actions a user can perform.
// +optional
optional SubjectRulesReviewStatus status = 3;
}
message SelfSubjectRulesReviewSpec {
// Namespace to evaluate rules for. Required.
optional string namespace = 1;
}
// SubjectAccessReview checks whether or not a user or group can perform an action. // SubjectAccessReview checks whether or not a user or group can perform an action.
message SubjectAccessReview { message SubjectAccessReview {
// +optional // +optional
@ -185,3 +239,27 @@ message SubjectAccessReviewStatus {
optional string evaluationError = 3; optional string evaluationError = 3;
} }
// 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.
message SubjectRulesReviewStatus {
// 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.
repeated ResourceRule resourceRules = 1;
// 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.
repeated NonResourceRule nonResourceRules = 2;
// 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.
optional bool incomplete = 3;
// 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.
// +optional
optional string evaluationError = 4;
}

View File

@ -47,6 +47,16 @@ func (NonResourceAttributes) SwaggerDoc() map[string]string {
return map_NonResourceAttributes return map_NonResourceAttributes
} }
var map_NonResourceRule = map[string]string{
"": "NonResourceRule holds information that describes a rule for the non-resource",
"verbs": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.",
"nonResourceURLs": "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.",
}
func (NonResourceRule) SwaggerDoc() map[string]string {
return map_NonResourceRule
}
var map_ResourceAttributes = map[string]string{ var map_ResourceAttributes = map[string]string{
"": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
"namespace": "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", "namespace": "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",
@ -62,6 +72,18 @@ func (ResourceAttributes) SwaggerDoc() map[string]string {
return map_ResourceAttributes return map_ResourceAttributes
} }
var map_ResourceRule = map[string]string{
"": "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.",
"verbs": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
"apiGroups": "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.",
"resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources. \"*\" means all.",
"resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.",
}
func (ResourceRule) SwaggerDoc() map[string]string {
return map_ResourceRule
}
var map_SelfSubjectAccessReview = map[string]string{ var map_SelfSubjectAccessReview = map[string]string{
"": "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",
"spec": "Spec holds information about the request being evaluated. user and groups must be empty", "spec": "Spec holds information about the request being evaluated. user and groups must be empty",
@ -82,6 +104,24 @@ func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string {
return map_SelfSubjectAccessReviewSpec return map_SelfSubjectAccessReviewSpec
} }
var map_SelfSubjectRulesReview = map[string]string{
"": "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.",
"spec": "Spec holds information about the request being evaluated.",
"status": "Status is filled in by the server and indicates the set of actions a user can perform.",
}
func (SelfSubjectRulesReview) SwaggerDoc() map[string]string {
return map_SelfSubjectRulesReview
}
var map_SelfSubjectRulesReviewSpec = map[string]string{
"namespace": "Namespace to evaluate rules for. Required.",
}
func (SelfSubjectRulesReviewSpec) SwaggerDoc() map[string]string {
return map_SelfSubjectRulesReviewSpec
}
var map_SubjectAccessReview = map[string]string{ var map_SubjectAccessReview = map[string]string{
"": "SubjectAccessReview checks whether or not a user or group can perform an action.", "": "SubjectAccessReview checks whether or not a user or group can perform an action.",
"spec": "Spec holds information about the request being evaluated", "spec": "Spec holds information about the request being evaluated",
@ -117,4 +157,16 @@ func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
return map_SubjectAccessReviewStatus return map_SubjectAccessReviewStatus
} }
var map_SubjectRulesReviewStatus = map[string]string{
"": "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.",
"resourceRules": "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.",
"nonResourceRules": "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.",
"incomplete": "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.",
"evaluationError": "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.",
}
func (SubjectRulesReviewStatus) SwaggerDoc() map[string]string {
return map_SubjectRulesReviewStatus
}
// AUTO-GENERATED FUNCTIONS END HERE // AUTO-GENERATED FUNCTIONS END HERE

View File

@ -44,10 +44,18 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*NonResourceAttributes).DeepCopyInto(out.(*NonResourceAttributes)) in.(*NonResourceAttributes).DeepCopyInto(out.(*NonResourceAttributes))
return nil return nil
}, InType: reflect.TypeOf(&NonResourceAttributes{})}, }, InType: reflect.TypeOf(&NonResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*NonResourceRule).DeepCopyInto(out.(*NonResourceRule))
return nil
}, InType: reflect.TypeOf(&NonResourceRule{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ResourceAttributes).DeepCopyInto(out.(*ResourceAttributes)) in.(*ResourceAttributes).DeepCopyInto(out.(*ResourceAttributes))
return nil return nil
}, InType: reflect.TypeOf(&ResourceAttributes{})}, }, InType: reflect.TypeOf(&ResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ResourceRule).DeepCopyInto(out.(*ResourceRule))
return nil
}, InType: reflect.TypeOf(&ResourceRule{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SelfSubjectAccessReview).DeepCopyInto(out.(*SelfSubjectAccessReview)) in.(*SelfSubjectAccessReview).DeepCopyInto(out.(*SelfSubjectAccessReview))
return nil return nil
@ -56,6 +64,14 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*SelfSubjectAccessReviewSpec).DeepCopyInto(out.(*SelfSubjectAccessReviewSpec)) in.(*SelfSubjectAccessReviewSpec).DeepCopyInto(out.(*SelfSubjectAccessReviewSpec))
return nil return nil
}, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})}, }, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SelfSubjectRulesReview).DeepCopyInto(out.(*SelfSubjectRulesReview))
return nil
}, InType: reflect.TypeOf(&SelfSubjectRulesReview{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SelfSubjectRulesReviewSpec).DeepCopyInto(out.(*SelfSubjectRulesReviewSpec))
return nil
}, InType: reflect.TypeOf(&SelfSubjectRulesReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SubjectAccessReview).DeepCopyInto(out.(*SubjectAccessReview)) in.(*SubjectAccessReview).DeepCopyInto(out.(*SubjectAccessReview))
return nil return nil
@ -68,6 +84,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*SubjectAccessReviewStatus).DeepCopyInto(out.(*SubjectAccessReviewStatus)) in.(*SubjectAccessReviewStatus).DeepCopyInto(out.(*SubjectAccessReviewStatus))
return nil return nil
}, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})}, }, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SubjectRulesReviewStatus).DeepCopyInto(out.(*SubjectRulesReviewStatus))
return nil
}, InType: reflect.TypeOf(&SubjectRulesReviewStatus{})},
) )
} }
@ -116,6 +136,32 @@ func (in *NonResourceAttributes) DeepCopy() *NonResourceAttributes {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NonResourceRule) DeepCopyInto(out *NonResourceRule) {
*out = *in
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.NonResourceURLs != nil {
in, out := &in.NonResourceURLs, &out.NonResourceURLs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonResourceRule.
func (in *NonResourceRule) DeepCopy() *NonResourceRule {
if in == nil {
return nil
}
out := new(NonResourceRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceAttributes) DeepCopyInto(out *ResourceAttributes) { func (in *ResourceAttributes) DeepCopyInto(out *ResourceAttributes) {
*out = *in *out = *in
@ -132,6 +178,42 @@ func (in *ResourceAttributes) DeepCopy() *ResourceAttributes {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceRule) DeepCopyInto(out *ResourceRule) {
*out = *in
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.APIGroups != nil {
in, out := &in.APIGroups, &out.APIGroups
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Resources != nil {
in, out := &in.Resources, &out.Resources
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ResourceNames != nil {
in, out := &in.ResourceNames, &out.ResourceNames
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRule.
func (in *ResourceRule) DeepCopy() *ResourceRule {
if in == nil {
return nil
}
out := new(ResourceRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) { func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) {
*out = *in *out = *in
@ -195,6 +277,51 @@ func (in *SelfSubjectAccessReviewSpec) DeepCopy() *SelfSubjectAccessReviewSpec {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelfSubjectRulesReview) DeepCopyInto(out *SelfSubjectRulesReview) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
in.Status.DeepCopyInto(&out.Status)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReview.
func (in *SelfSubjectRulesReview) DeepCopy() *SelfSubjectRulesReview {
if in == nil {
return nil
}
out := new(SelfSubjectRulesReview)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *SelfSubjectRulesReview) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelfSubjectRulesReviewSpec) DeepCopyInto(out *SelfSubjectRulesReviewSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReviewSpec.
func (in *SelfSubjectRulesReviewSpec) DeepCopy() *SelfSubjectRulesReviewSpec {
if in == nil {
return nil
}
out := new(SelfSubjectRulesReviewSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) { func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) {
*out = *in *out = *in
@ -286,3 +413,33 @@ func (in *SubjectAccessReviewStatus) DeepCopy() *SubjectAccessReviewStatus {
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubjectRulesReviewStatus) DeepCopyInto(out *SubjectRulesReviewStatus) {
*out = *in
if in.ResourceRules != nil {
in, out := &in.ResourceRules, &out.ResourceRules
*out = make([]ResourceRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.NonResourceRules != nil {
in, out := &in.NonResourceRules, &out.NonResourceRules
*out = make([]NonResourceRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectRulesReviewStatus.
func (in *SubjectRulesReviewStatus) DeepCopy() *SubjectRulesReviewStatus {
if in == nil {
return nil
}
out := new(SubjectRulesReviewStatus)
in.DeepCopyInto(out)
return out
}

File diff suppressed because it is too large Load Diff

View File

@ -65,6 +65,17 @@ message NonResourceAttributes {
optional string verb = 2; optional string verb = 2;
} }
// NonResourceRule holds information that describes a rule for the non-resource
message NonResourceRule {
// Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.
repeated string verbs = 1;
// 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.
// +optional
repeated string nonResourceURLs = 2;
}
// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
message ResourceAttributes { message ResourceAttributes {
// Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
@ -99,6 +110,26 @@ message ResourceAttributes {
optional string name = 7; optional string name = 7;
} }
// 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.
message ResourceRule {
// Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.
repeated string verbs = 1;
// 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.
// +optional
repeated string apiGroups = 2;
// Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all.
// +optional
repeated string resources = 3;
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.
// +optional
repeated string resourceNames = 4;
}
// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a // 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 // 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 // to check whether they can perform an action
@ -126,6 +157,29 @@ message SelfSubjectAccessReviewSpec {
optional NonResourceAttributes nonResourceAttributes = 2; optional NonResourceAttributes nonResourceAttributes = 2;
} }
// 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.
message SelfSubjectRulesReview {
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec holds information about the request being evaluated.
optional SelfSubjectRulesReviewSpec spec = 2;
// Status is filled in by the server and indicates the set of actions a user can perform.
// +optional
optional SubjectRulesReviewStatus status = 3;
}
message SelfSubjectRulesReviewSpec {
// Namespace to evaluate rules for. Required.
optional string namespace = 1;
}
// SubjectAccessReview checks whether or not a user or group can perform an action. // SubjectAccessReview checks whether or not a user or group can perform an action.
message SubjectAccessReview { message SubjectAccessReview {
// +optional // +optional
@ -185,3 +239,27 @@ message SubjectAccessReviewStatus {
optional string evaluationError = 3; optional string evaluationError = 3;
} }
// 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.
message SubjectRulesReviewStatus {
// 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.
repeated ResourceRule resourceRules = 1;
// 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.
repeated NonResourceRule nonResourceRules = 2;
// 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.
optional bool incomplete = 3;
// 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.
// +optional
optional string evaluationError = 4;
}

View File

@ -47,6 +47,16 @@ func (NonResourceAttributes) SwaggerDoc() map[string]string {
return map_NonResourceAttributes return map_NonResourceAttributes
} }
var map_NonResourceRule = map[string]string{
"": "NonResourceRule holds information that describes a rule for the non-resource",
"verbs": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.",
"nonResourceURLs": "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.",
}
func (NonResourceRule) SwaggerDoc() map[string]string {
return map_NonResourceRule
}
var map_ResourceAttributes = map[string]string{ var map_ResourceAttributes = map[string]string{
"": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
"namespace": "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", "namespace": "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",
@ -62,6 +72,18 @@ func (ResourceAttributes) SwaggerDoc() map[string]string {
return map_ResourceAttributes return map_ResourceAttributes
} }
var map_ResourceRule = map[string]string{
"": "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.",
"verbs": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
"apiGroups": "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.",
"resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources. \"*\" means all.",
"resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.",
}
func (ResourceRule) SwaggerDoc() map[string]string {
return map_ResourceRule
}
var map_SelfSubjectAccessReview = map[string]string{ var map_SelfSubjectAccessReview = map[string]string{
"": "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",
"spec": "Spec holds information about the request being evaluated. user and groups must be empty", "spec": "Spec holds information about the request being evaluated. user and groups must be empty",
@ -82,6 +104,24 @@ func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string {
return map_SelfSubjectAccessReviewSpec return map_SelfSubjectAccessReviewSpec
} }
var map_SelfSubjectRulesReview = map[string]string{
"": "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.",
"spec": "Spec holds information about the request being evaluated.",
"status": "Status is filled in by the server and indicates the set of actions a user can perform.",
}
func (SelfSubjectRulesReview) SwaggerDoc() map[string]string {
return map_SelfSubjectRulesReview
}
var map_SelfSubjectRulesReviewSpec = map[string]string{
"namespace": "Namespace to evaluate rules for. Required.",
}
func (SelfSubjectRulesReviewSpec) SwaggerDoc() map[string]string {
return map_SelfSubjectRulesReviewSpec
}
var map_SubjectAccessReview = map[string]string{ var map_SubjectAccessReview = map[string]string{
"": "SubjectAccessReview checks whether or not a user or group can perform an action.", "": "SubjectAccessReview checks whether or not a user or group can perform an action.",
"spec": "Spec holds information about the request being evaluated", "spec": "Spec holds information about the request being evaluated",
@ -117,4 +157,16 @@ func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
return map_SubjectAccessReviewStatus return map_SubjectAccessReviewStatus
} }
var map_SubjectRulesReviewStatus = map[string]string{
"": "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.",
"resourceRules": "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.",
"nonResourceRules": "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.",
"incomplete": "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.",
"evaluationError": "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.",
}
func (SubjectRulesReviewStatus) SwaggerDoc() map[string]string {
return map_SubjectRulesReviewStatus
}
// AUTO-GENERATED FUNCTIONS END HERE // AUTO-GENERATED FUNCTIONS END HERE

View File

@ -44,10 +44,18 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*NonResourceAttributes).DeepCopyInto(out.(*NonResourceAttributes)) in.(*NonResourceAttributes).DeepCopyInto(out.(*NonResourceAttributes))
return nil return nil
}, InType: reflect.TypeOf(&NonResourceAttributes{})}, }, InType: reflect.TypeOf(&NonResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*NonResourceRule).DeepCopyInto(out.(*NonResourceRule))
return nil
}, InType: reflect.TypeOf(&NonResourceRule{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ResourceAttributes).DeepCopyInto(out.(*ResourceAttributes)) in.(*ResourceAttributes).DeepCopyInto(out.(*ResourceAttributes))
return nil return nil
}, InType: reflect.TypeOf(&ResourceAttributes{})}, }, InType: reflect.TypeOf(&ResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ResourceRule).DeepCopyInto(out.(*ResourceRule))
return nil
}, InType: reflect.TypeOf(&ResourceRule{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SelfSubjectAccessReview).DeepCopyInto(out.(*SelfSubjectAccessReview)) in.(*SelfSubjectAccessReview).DeepCopyInto(out.(*SelfSubjectAccessReview))
return nil return nil
@ -56,6 +64,14 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*SelfSubjectAccessReviewSpec).DeepCopyInto(out.(*SelfSubjectAccessReviewSpec)) in.(*SelfSubjectAccessReviewSpec).DeepCopyInto(out.(*SelfSubjectAccessReviewSpec))
return nil return nil
}, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})}, }, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SelfSubjectRulesReview).DeepCopyInto(out.(*SelfSubjectRulesReview))
return nil
}, InType: reflect.TypeOf(&SelfSubjectRulesReview{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SelfSubjectRulesReviewSpec).DeepCopyInto(out.(*SelfSubjectRulesReviewSpec))
return nil
}, InType: reflect.TypeOf(&SelfSubjectRulesReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SubjectAccessReview).DeepCopyInto(out.(*SubjectAccessReview)) in.(*SubjectAccessReview).DeepCopyInto(out.(*SubjectAccessReview))
return nil return nil
@ -68,6 +84,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*SubjectAccessReviewStatus).DeepCopyInto(out.(*SubjectAccessReviewStatus)) in.(*SubjectAccessReviewStatus).DeepCopyInto(out.(*SubjectAccessReviewStatus))
return nil return nil
}, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})}, }, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SubjectRulesReviewStatus).DeepCopyInto(out.(*SubjectRulesReviewStatus))
return nil
}, InType: reflect.TypeOf(&SubjectRulesReviewStatus{})},
) )
} }
@ -116,6 +136,32 @@ func (in *NonResourceAttributes) DeepCopy() *NonResourceAttributes {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NonResourceRule) DeepCopyInto(out *NonResourceRule) {
*out = *in
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.NonResourceURLs != nil {
in, out := &in.NonResourceURLs, &out.NonResourceURLs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonResourceRule.
func (in *NonResourceRule) DeepCopy() *NonResourceRule {
if in == nil {
return nil
}
out := new(NonResourceRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceAttributes) DeepCopyInto(out *ResourceAttributes) { func (in *ResourceAttributes) DeepCopyInto(out *ResourceAttributes) {
*out = *in *out = *in
@ -132,6 +178,42 @@ func (in *ResourceAttributes) DeepCopy() *ResourceAttributes {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceRule) DeepCopyInto(out *ResourceRule) {
*out = *in
if in.Verbs != nil {
in, out := &in.Verbs, &out.Verbs
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.APIGroups != nil {
in, out := &in.APIGroups, &out.APIGroups
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Resources != nil {
in, out := &in.Resources, &out.Resources
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ResourceNames != nil {
in, out := &in.ResourceNames, &out.ResourceNames
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRule.
func (in *ResourceRule) DeepCopy() *ResourceRule {
if in == nil {
return nil
}
out := new(ResourceRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) { func (in *SelfSubjectAccessReview) DeepCopyInto(out *SelfSubjectAccessReview) {
*out = *in *out = *in
@ -195,6 +277,51 @@ func (in *SelfSubjectAccessReviewSpec) DeepCopy() *SelfSubjectAccessReviewSpec {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelfSubjectRulesReview) DeepCopyInto(out *SelfSubjectRulesReview) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
in.Status.DeepCopyInto(&out.Status)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReview.
func (in *SelfSubjectRulesReview) DeepCopy() *SelfSubjectRulesReview {
if in == nil {
return nil
}
out := new(SelfSubjectRulesReview)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *SelfSubjectRulesReview) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelfSubjectRulesReviewSpec) DeepCopyInto(out *SelfSubjectRulesReviewSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReviewSpec.
func (in *SelfSubjectRulesReviewSpec) DeepCopy() *SelfSubjectRulesReviewSpec {
if in == nil {
return nil
}
out := new(SelfSubjectRulesReviewSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) { func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) {
*out = *in *out = *in
@ -286,3 +413,33 @@ func (in *SubjectAccessReviewStatus) DeepCopy() *SubjectAccessReviewStatus {
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubjectRulesReviewStatus) DeepCopyInto(out *SubjectRulesReviewStatus) {
*out = *in
if in.ResourceRules != nil {
in, out := &in.ResourceRules, &out.ResourceRules
*out = make([]ResourceRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.NonResourceRules != nil {
in, out := &in.NonResourceRules, &out.NonResourceRules
*out = make([]NonResourceRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectRulesReviewStatus.
func (in *SubjectRulesReviewStatus) DeepCopy() *SubjectRulesReviewStatus {
if in == nil {
return nil
}
out := new(SubjectRulesReviewStatus)
in.DeepCopyInto(out)
return out
}

View File

@ -7,7 +7,10 @@ load(
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = ["interfaces.go"], srcs = [
"interfaces.go",
"rule.go",
],
deps = ["//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library"], deps = ["//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library"],
) )

View File

@ -23,6 +23,7 @@ go_library(
"delegating.go", "delegating.go",
], ],
deps = [ deps = [
"//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library",
"//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library",
"//vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook:go_default_library", "//vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library",

View File

@ -10,7 +10,10 @@ go_test(
name = "go_default_test", name = "go_default_test",
srcs = ["union_test.go"], srcs = ["union_test.go"],
library = ":go_default_library", library = ":go_default_library",
deps = ["//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library"], deps = [
"//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library",
"//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library",
],
) )
go_library( go_library(
@ -18,6 +21,7 @@ go_library(
srcs = ["union.go"], srcs = ["union.go"],
deps = [ deps = [
"//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library",
"//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library",
"//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library",
], ],
) )

View File

@ -32,6 +32,7 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/cache:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/cache:go_default_library",
"//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library",
"//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library",
"//vendor/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//vendor/k8s.io/apiserver/pkg/util/webhook:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library",

View File

@ -15,6 +15,7 @@ go_library(
"localsubjectaccessreview_expansion.go", "localsubjectaccessreview_expansion.go",
"selfsubjectaccessreview.go", "selfsubjectaccessreview.go",
"selfsubjectaccessreview_expansion.go", "selfsubjectaccessreview_expansion.go",
"selfsubjectrulesreview.go",
"subjectaccessreview.go", "subjectaccessreview.go",
"subjectaccessreview_expansion.go", "subjectaccessreview_expansion.go",
], ],

View File

@ -27,6 +27,7 @@ type AuthorizationV1Interface interface {
RESTClient() rest.Interface RESTClient() rest.Interface
LocalSubjectAccessReviewsGetter LocalSubjectAccessReviewsGetter
SelfSubjectAccessReviewsGetter SelfSubjectAccessReviewsGetter
SelfSubjectRulesReviewsGetter
SubjectAccessReviewsGetter SubjectAccessReviewsGetter
} }
@ -43,6 +44,10 @@ func (c *AuthorizationV1Client) SelfSubjectAccessReviews() SelfSubjectAccessRevi
return newSelfSubjectAccessReviews(c) return newSelfSubjectAccessReviews(c)
} }
func (c *AuthorizationV1Client) SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface {
return newSelfSubjectRulesReviews(c)
}
func (c *AuthorizationV1Client) SubjectAccessReviews() SubjectAccessReviewInterface { func (c *AuthorizationV1Client) SubjectAccessReviews() SubjectAccessReviewInterface {
return newSubjectAccessReviews(c) return newSubjectAccessReviews(c)
} }

View File

@ -14,6 +14,7 @@ go_library(
"fake_localsubjectaccessreview_expansion.go", "fake_localsubjectaccessreview_expansion.go",
"fake_selfsubjectaccessreview.go", "fake_selfsubjectaccessreview.go",
"fake_selfsubjectaccessreview_expansion.go", "fake_selfsubjectaccessreview_expansion.go",
"fake_selfsubjectrulesreview.go",
"fake_subjectaccessreview.go", "fake_subjectaccessreview.go",
"fake_subjectaccessreview_expansion.go", "fake_subjectaccessreview_expansion.go",
], ],

View File

@ -34,6 +34,10 @@ func (c *FakeAuthorizationV1) SelfSubjectAccessReviews() v1.SelfSubjectAccessRev
return &FakeSelfSubjectAccessReviews{c} return &FakeSelfSubjectAccessReviews{c}
} }
func (c *FakeAuthorizationV1) SelfSubjectRulesReviews() v1.SelfSubjectRulesReviewInterface {
return &FakeSelfSubjectRulesReviews{c}
}
func (c *FakeAuthorizationV1) SubjectAccessReviews() v1.SubjectAccessReviewInterface { func (c *FakeAuthorizationV1) SubjectAccessReviews() v1.SubjectAccessReviewInterface {
return &FakeSubjectAccessReviews{c} return &FakeSubjectAccessReviews{c}
} }

View File

@ -0,0 +1,22 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
type FakeSelfSubjectRulesReviews struct {
Fake *FakeAuthorizationV1
}

View File

@ -15,3 +15,5 @@ limitations under the License.
*/ */
package v1 package v1
type SelfSubjectRulesReviewExpansion interface{}

View File

@ -0,0 +1,44 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
rest "k8s.io/client-go/rest"
)
// SelfSubjectRulesReviewsGetter has a method to return a SelfSubjectRulesReviewInterface.
// A group's client should implement this interface.
type SelfSubjectRulesReviewsGetter interface {
SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface
}
// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
type SelfSubjectRulesReviewInterface interface {
SelfSubjectRulesReviewExpansion
}
// selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
type selfSubjectRulesReviews struct {
client rest.Interface
}
// newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews
func newSelfSubjectRulesReviews(c *AuthorizationV1Client) *selfSubjectRulesReviews {
return &selfSubjectRulesReviews{
client: c.RESTClient(),
}
}

View File

@ -15,6 +15,7 @@ go_library(
"localsubjectaccessreview_expansion.go", "localsubjectaccessreview_expansion.go",
"selfsubjectaccessreview.go", "selfsubjectaccessreview.go",
"selfsubjectaccessreview_expansion.go", "selfsubjectaccessreview_expansion.go",
"selfsubjectrulesreview.go",
"subjectaccessreview.go", "subjectaccessreview.go",
"subjectaccessreview_expansion.go", "subjectaccessreview_expansion.go",
], ],

View File

@ -27,6 +27,7 @@ type AuthorizationV1beta1Interface interface {
RESTClient() rest.Interface RESTClient() rest.Interface
LocalSubjectAccessReviewsGetter LocalSubjectAccessReviewsGetter
SelfSubjectAccessReviewsGetter SelfSubjectAccessReviewsGetter
SelfSubjectRulesReviewsGetter
SubjectAccessReviewsGetter SubjectAccessReviewsGetter
} }
@ -43,6 +44,10 @@ func (c *AuthorizationV1beta1Client) SelfSubjectAccessReviews() SelfSubjectAcces
return newSelfSubjectAccessReviews(c) return newSelfSubjectAccessReviews(c)
} }
func (c *AuthorizationV1beta1Client) SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface {
return newSelfSubjectRulesReviews(c)
}
func (c *AuthorizationV1beta1Client) SubjectAccessReviews() SubjectAccessReviewInterface { func (c *AuthorizationV1beta1Client) SubjectAccessReviews() SubjectAccessReviewInterface {
return newSubjectAccessReviews(c) return newSubjectAccessReviews(c)
} }

View File

@ -15,6 +15,7 @@ go_library(
"fake_localsubjectaccessreview_expansion.go", "fake_localsubjectaccessreview_expansion.go",
"fake_selfsubjectaccessreview.go", "fake_selfsubjectaccessreview.go",
"fake_selfsubjectaccessreview_expansion.go", "fake_selfsubjectaccessreview_expansion.go",
"fake_selfsubjectrulesreview.go",
"fake_subjectaccessreview.go", "fake_subjectaccessreview.go",
"fake_subjectaccessreview_expansion.go", "fake_subjectaccessreview_expansion.go",
], ],

View File

@ -34,6 +34,10 @@ func (c *FakeAuthorizationV1beta1) SelfSubjectAccessReviews() v1beta1.SelfSubjec
return &FakeSelfSubjectAccessReviews{c} return &FakeSelfSubjectAccessReviews{c}
} }
func (c *FakeAuthorizationV1beta1) SelfSubjectRulesReviews() v1beta1.SelfSubjectRulesReviewInterface {
return &FakeSelfSubjectRulesReviews{c}
}
func (c *FakeAuthorizationV1beta1) SubjectAccessReviews() v1beta1.SubjectAccessReviewInterface { func (c *FakeAuthorizationV1beta1) SubjectAccessReviews() v1beta1.SubjectAccessReviewInterface {
return &FakeSubjectAccessReviews{c} return &FakeSubjectAccessReviews{c}
} }

View File

@ -0,0 +1,22 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
type FakeSelfSubjectRulesReviews struct {
Fake *FakeAuthorizationV1beta1
}

View File

@ -15,3 +15,5 @@ limitations under the License.
*/ */
package v1beta1 package v1beta1
type SelfSubjectRulesReviewExpansion interface{}

View File

@ -0,0 +1,44 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1beta1
import (
rest "k8s.io/client-go/rest"
)
// SelfSubjectRulesReviewsGetter has a method to return a SelfSubjectRulesReviewInterface.
// A group's client should implement this interface.
type SelfSubjectRulesReviewsGetter interface {
SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface
}
// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
type SelfSubjectRulesReviewInterface interface {
SelfSubjectRulesReviewExpansion
}
// selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
type selfSubjectRulesReviews struct {
client rest.Interface
}
// newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews
func newSelfSubjectRulesReviews(c *AuthorizationV1beta1Client) *selfSubjectRulesReviews {
return &selfSubjectRulesReviews{
client: c.RESTClient(),
}
}

View File

@ -11,6 +11,7 @@ go_library(
"expansion_generated.go", "expansion_generated.go",
"localsubjectaccessreview.go", "localsubjectaccessreview.go",
"selfsubjectaccessreview.go", "selfsubjectaccessreview.go",
"selfsubjectrulesreview.go",
"subjectaccessreview.go", "subjectaccessreview.go",
], ],
deps = [ deps = [

View File

@ -30,6 +30,10 @@ type LocalSubjectAccessReviewNamespaceListerExpansion interface{}
// SelfSubjectAccessReviewLister. // SelfSubjectAccessReviewLister.
type SelfSubjectAccessReviewListerExpansion interface{} type SelfSubjectAccessReviewListerExpansion interface{}
// SelfSubjectRulesReviewListerExpansion allows custom methods to be added to
// SelfSubjectRulesReviewLister.
type SelfSubjectRulesReviewListerExpansion interface{}
// SubjectAccessReviewListerExpansion allows custom methods to be added to // SubjectAccessReviewListerExpansion allows custom methods to be added to
// SubjectAccessReviewLister. // SubjectAccessReviewLister.
type SubjectAccessReviewListerExpansion interface{} type SubjectAccessReviewListerExpansion interface{}

View File

@ -0,0 +1,67 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by lister-gen
package v1
import (
v1 "k8s.io/api/authorization/v1"
"k8s.io/apimachinery/pkg/api/errors"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// SelfSubjectRulesReviewLister helps list SelfSubjectRulesReviews.
type SelfSubjectRulesReviewLister interface {
// List lists all SelfSubjectRulesReviews in the indexer.
List(selector labels.Selector) (ret []*v1.SelfSubjectRulesReview, err error)
// Get retrieves the SelfSubjectRulesReview from the index for a given name.
Get(name string) (*v1.SelfSubjectRulesReview, error)
SelfSubjectRulesReviewListerExpansion
}
// selfSubjectRulesReviewLister implements the SelfSubjectRulesReviewLister interface.
type selfSubjectRulesReviewLister struct {
indexer cache.Indexer
}
// NewSelfSubjectRulesReviewLister returns a new SelfSubjectRulesReviewLister.
func NewSelfSubjectRulesReviewLister(indexer cache.Indexer) SelfSubjectRulesReviewLister {
return &selfSubjectRulesReviewLister{indexer: indexer}
}
// List lists all SelfSubjectRulesReviews in the indexer.
func (s *selfSubjectRulesReviewLister) List(selector labels.Selector) (ret []*v1.SelfSubjectRulesReview, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.SelfSubjectRulesReview))
})
return ret, err
}
// Get retrieves the SelfSubjectRulesReview from the index for a given name.
func (s *selfSubjectRulesReviewLister) Get(name string) (*v1.SelfSubjectRulesReview, error) {
key := &v1.SelfSubjectRulesReview{ObjectMeta: meta_v1.ObjectMeta{Name: name}}
obj, exists, err := s.indexer.Get(key)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("selfsubjectrulesreview"), name)
}
return obj.(*v1.SelfSubjectRulesReview), nil
}

View File

@ -11,6 +11,7 @@ go_library(
"expansion_generated.go", "expansion_generated.go",
"localsubjectaccessreview.go", "localsubjectaccessreview.go",
"selfsubjectaccessreview.go", "selfsubjectaccessreview.go",
"selfsubjectrulesreview.go",
"subjectaccessreview.go", "subjectaccessreview.go",
], ],
deps = [ deps = [

View File

@ -30,6 +30,10 @@ type LocalSubjectAccessReviewNamespaceListerExpansion interface{}
// SelfSubjectAccessReviewLister. // SelfSubjectAccessReviewLister.
type SelfSubjectAccessReviewListerExpansion interface{} type SelfSubjectAccessReviewListerExpansion interface{}
// SelfSubjectRulesReviewListerExpansion allows custom methods to be added to
// SelfSubjectRulesReviewLister.
type SelfSubjectRulesReviewListerExpansion interface{}
// SubjectAccessReviewListerExpansion allows custom methods to be added to // SubjectAccessReviewListerExpansion allows custom methods to be added to
// SubjectAccessReviewLister. // SubjectAccessReviewLister.
type SubjectAccessReviewListerExpansion interface{} type SubjectAccessReviewListerExpansion interface{}

View File

@ -0,0 +1,67 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by lister-gen
package v1beta1
import (
v1beta1 "k8s.io/api/authorization/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// SelfSubjectRulesReviewLister helps list SelfSubjectRulesReviews.
type SelfSubjectRulesReviewLister interface {
// List lists all SelfSubjectRulesReviews in the indexer.
List(selector labels.Selector) (ret []*v1beta1.SelfSubjectRulesReview, err error)
// Get retrieves the SelfSubjectRulesReview from the index for a given name.
Get(name string) (*v1beta1.SelfSubjectRulesReview, error)
SelfSubjectRulesReviewListerExpansion
}
// selfSubjectRulesReviewLister implements the SelfSubjectRulesReviewLister interface.
type selfSubjectRulesReviewLister struct {
indexer cache.Indexer
}
// NewSelfSubjectRulesReviewLister returns a new SelfSubjectRulesReviewLister.
func NewSelfSubjectRulesReviewLister(indexer cache.Indexer) SelfSubjectRulesReviewLister {
return &selfSubjectRulesReviewLister{indexer: indexer}
}
// List lists all SelfSubjectRulesReviews in the indexer.
func (s *selfSubjectRulesReviewLister) List(selector labels.Selector) (ret []*v1beta1.SelfSubjectRulesReview, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.SelfSubjectRulesReview))
})
return ret, err
}
// Get retrieves the SelfSubjectRulesReview from the index for a given name.
func (s *selfSubjectRulesReviewLister) Get(name string) (*v1beta1.SelfSubjectRulesReview, error) {
key := &v1beta1.SelfSubjectRulesReview{ObjectMeta: v1.ObjectMeta{Name: name}}
obj, exists, err := s.indexer.Get(key)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("selfsubjectrulesreview"), name)
}
return obj.(*v1beta1.SelfSubjectRulesReview), nil
}