blob: 3ae6e7206014160e7876b071728b79a0b193e796 [file] [log] [blame]
Zack Williamse940c7a2019-08-21 14:25:39 -07001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17package v1beta1
18
19// This file contains a collection of methods that can be used from go-restful to
20// generate Swagger API documentation for its models. Please read this PR for more
21// information on the implementation: https://github.com/emicklei/go-restful/pull/215
22//
23// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
24// they are on one line! For multiple line or blocks that you want to ignore use ---.
25// Any context after a --- is ignored.
26//
27// Those methods can be generated by using hack/update-generated-swagger-docs.sh
28
29// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
30var map_LocalSubjectAccessReview = map[string]string{
31 "": "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.",
32 "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.",
33 "status": "Status is filled in by the server and indicates whether the request is allowed or not",
34}
35
36func (LocalSubjectAccessReview) SwaggerDoc() map[string]string {
37 return map_LocalSubjectAccessReview
38}
39
40var map_NonResourceAttributes = map[string]string{
41 "": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface",
42 "path": "Path is the URL path of the request",
43 "verb": "Verb is the standard HTTP verb",
44}
45
46func (NonResourceAttributes) SwaggerDoc() map[string]string {
47 return map_NonResourceAttributes
48}
49
50var map_NonResourceRule = map[string]string{
51 "": "NonResourceRule holds information that describes a rule for the non-resource",
52 "verbs": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.",
53 "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.",
54}
55
56func (NonResourceRule) SwaggerDoc() map[string]string {
57 return map_NonResourceRule
58}
59
60var map_ResourceAttributes = map[string]string{
61 "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
62 "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",
63 "verb": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
64 "group": "Group is the API Group of the Resource. \"*\" means all.",
65 "version": "Version is the API Version of the Resource. \"*\" means all.",
66 "resource": "Resource is one of the existing resource types. \"*\" means all.",
67 "subresource": "Subresource is one of the existing resource types. \"\" means none.",
68 "name": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.",
69}
70
71func (ResourceAttributes) SwaggerDoc() map[string]string {
72 return map_ResourceAttributes
73}
74
75var map_ResourceRule = map[string]string{
76 "": "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.",
77 "verbs": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
78 "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.",
79 "resources": "Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.\n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.",
80 "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.",
81}
82
83func (ResourceRule) SwaggerDoc() map[string]string {
84 return map_ResourceRule
85}
86
87var map_SelfSubjectAccessReview = map[string]string{
88 "": "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",
89 "spec": "Spec holds information about the request being evaluated. user and groups must be empty",
90 "status": "Status is filled in by the server and indicates whether the request is allowed or not",
91}
92
93func (SelfSubjectAccessReview) SwaggerDoc() map[string]string {
94 return map_SelfSubjectAccessReview
95}
96
97var map_SelfSubjectAccessReviewSpec = map[string]string{
98 "": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
99 "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
100 "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
101}
102
103func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string {
104 return map_SelfSubjectAccessReviewSpec
105}
106
107var map_SelfSubjectRulesReview = map[string]string{
108 "": "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.",
109 "spec": "Spec holds information about the request being evaluated.",
110 "status": "Status is filled in by the server and indicates the set of actions a user can perform.",
111}
112
113func (SelfSubjectRulesReview) SwaggerDoc() map[string]string {
114 return map_SelfSubjectRulesReview
115}
116
117var map_SelfSubjectRulesReviewSpec = map[string]string{
118 "namespace": "Namespace to evaluate rules for. Required.",
119}
120
121func (SelfSubjectRulesReviewSpec) SwaggerDoc() map[string]string {
122 return map_SelfSubjectRulesReviewSpec
123}
124
125var map_SubjectAccessReview = map[string]string{
126 "": "SubjectAccessReview checks whether or not a user or group can perform an action.",
127 "spec": "Spec holds information about the request being evaluated",
128 "status": "Status is filled in by the server and indicates whether the request is allowed or not",
129}
130
131func (SubjectAccessReview) SwaggerDoc() map[string]string {
132 return map_SubjectAccessReview
133}
134
135var map_SubjectAccessReviewSpec = map[string]string{
136 "": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
137 "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
138 "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
139 "user": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups",
140 "group": "Groups is the groups you're testing for.",
141 "extra": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.",
142 "uid": "UID information about the requesting user.",
143}
144
145func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string {
146 return map_SubjectAccessReviewSpec
147}
148
149var map_SubjectAccessReviewStatus = map[string]string{
150 "": "SubjectAccessReviewStatus",
151 "allowed": "Allowed is required. True if the action would be allowed, false otherwise.",
152 "denied": "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.",
153 "reason": "Reason is optional. It indicates why a request was allowed or denied.",
154 "evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.",
155}
156
157func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
158 return map_SubjectAccessReviewStatus
159}
160
161var map_SubjectRulesReviewStatus = map[string]string{
162 "": "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.",
163 "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.",
164 "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.",
165 "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.",
166 "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.",
167}
168
169func (SubjectRulesReviewStatus) SwaggerDoc() map[string]string {
170 return map_SubjectRulesReviewStatus
171}
172
173// AUTO-GENERATED FUNCTIONS END HERE