Code refactoring for bpa operator
[icn.git] / cmd / bpa-operator / vendor / k8s.io / api / rbac / v1beta1 / generated.proto
1 /*
2 Copyright The Kubernetes Authors.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
17
18 // This file was autogenerated by go-to-protobuf. Do not edit it manually!
19
20 syntax = 'proto2';
21
22 package k8s.io.api.rbac.v1beta1;
23
24 import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
25 import "k8s.io/apimachinery/pkg/runtime/generated.proto";
26 import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
27
28 // Package-wide variables from generator "generated".
29 option go_package = "v1beta1";
30
31 // AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
32 message AggregationRule {
33   // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules.
34   // If any of the selectors match, then the ClusterRole's permissions will be added
35   // +optional
36   repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1;
37 }
38
39 // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
40 message ClusterRole {
41   // Standard object's metadata.
42   // +optional
43   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
44
45   // Rules holds all the PolicyRules for this ClusterRole
46   repeated PolicyRule rules = 2;
47
48   // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
49   // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be
50   // stomped by the controller.
51   // +optional
52   optional AggregationRule aggregationRule = 3;
53 }
54
55 // ClusterRoleBinding references a ClusterRole, but not contain it.  It can reference a ClusterRole in the global namespace,
56 // and adds who information via Subject.
57 message ClusterRoleBinding {
58   // Standard object's metadata.
59   // +optional
60   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
61
62   // Subjects holds references to the objects the role applies to.
63   // +optional
64   repeated Subject subjects = 2;
65
66   // RoleRef can only reference a ClusterRole in the global namespace.
67   // If the RoleRef cannot be resolved, the Authorizer must return an error.
68   optional RoleRef roleRef = 3;
69 }
70
71 // ClusterRoleBindingList is a collection of ClusterRoleBindings
72 message ClusterRoleBindingList {
73   // Standard object's metadata.
74   // +optional
75   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
76
77   // Items is a list of ClusterRoleBindings
78   repeated ClusterRoleBinding items = 2;
79 }
80
81 // ClusterRoleList is a collection of ClusterRoles
82 message ClusterRoleList {
83   // Standard object's metadata.
84   // +optional
85   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
86
87   // Items is a list of ClusterRoles
88   repeated ClusterRole items = 2;
89 }
90
91 // PolicyRule holds information that describes a policy rule, but does not contain information
92 // about who the rule applies to or which namespace the rule applies to.
93 message PolicyRule {
94   // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule.  VerbAll represents all kinds.
95   repeated string verbs = 1;
96
97   // APIGroups is the name of the APIGroup that contains the resources.  If multiple API groups are specified, any action requested against one of
98   // the enumerated resources in any API group will be allowed.
99   // +optional
100   repeated string apiGroups = 2;
101
102   // Resources is a list of resources this rule applies to.  '*' represents all resources in the specified apiGroups.
103   // '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.
104   // +optional
105   repeated string resources = 3;
106
107   // ResourceNames is an optional white list of names that the rule applies to.  An empty set means that everything is allowed.
108   // +optional
109   repeated string resourceNames = 4;
110
111   // 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
112   // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
113   // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"),  but not both.
114   // +optional
115   repeated string nonResourceURLs = 5;
116 }
117
118 // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
119 message Role {
120   // Standard object's metadata.
121   // +optional
122   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
123
124   // Rules holds all the PolicyRules for this Role
125   repeated PolicyRule rules = 2;
126 }
127
128 // RoleBinding references a role, but does not contain it.  It can reference a Role in the same namespace or a ClusterRole in the global namespace.
129 // It adds who information via Subjects and namespace information by which namespace it exists in.  RoleBindings in a given
130 // namespace only have effect in that namespace.
131 message RoleBinding {
132   // Standard object's metadata.
133   // +optional
134   optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
135
136   // Subjects holds references to the objects the role applies to.
137   // +optional
138   repeated Subject subjects = 2;
139
140   // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
141   // If the RoleRef cannot be resolved, the Authorizer must return an error.
142   optional RoleRef roleRef = 3;
143 }
144
145 // RoleBindingList is a collection of RoleBindings
146 message RoleBindingList {
147   // Standard object's metadata.
148   // +optional
149   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
150
151   // Items is a list of RoleBindings
152   repeated RoleBinding items = 2;
153 }
154
155 // RoleList is a collection of Roles
156 message RoleList {
157   // Standard object's metadata.
158   // +optional
159   optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
160
161   // Items is a list of Roles
162   repeated Role items = 2;
163 }
164
165 // RoleRef contains information that points to the role being used
166 message RoleRef {
167   // APIGroup is the group for the resource being referenced
168   optional string apiGroup = 1;
169
170   // Kind is the type of resource being referenced
171   optional string kind = 2;
172
173   // Name is the name of resource being referenced
174   optional string name = 3;
175 }
176
177 // Subject contains a reference to the object or user identities a role binding applies to.  This can either hold a direct API object reference,
178 // or a value for non-objects such as user and group names.
179 message Subject {
180   // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
181   // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
182   optional string kind = 1;
183
184   // APIGroup holds the API group of the referenced subject.
185   // Defaults to "" for ServiceAccount subjects.
186   // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
187   // +optional
188   optional string apiGroup = 2;
189
190   // Name of the object being referenced.
191   optional string name = 3;
192
193   // Namespace of the referenced object.  If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
194   // the Authorizer should report an error.
195   // +optional
196   optional string namespace = 4;
197 }
198