...
1/*
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
17
18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
19
20syntax = "proto2";
21
22package k8s.io.api.rbac.v1;
23
24import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
25import "k8s.io/apimachinery/pkg/runtime/generated.proto";
26import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
27
28// Package-wide variables from generator "generated".
29option go_package = "k8s.io/api/rbac/v1";
30
31// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
32message 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 // +listType=atomic
37 repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1;
38}
39
40// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
41message ClusterRole {
42 // Standard object's metadata.
43 // +optional
44 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
45
46 // Rules holds all the PolicyRules for this ClusterRole
47 // +optional
48 // +listType=atomic
49 repeated PolicyRule rules = 2;
50
51 // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
52 // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be
53 // stomped by the controller.
54 // +optional
55 optional AggregationRule aggregationRule = 3;
56}
57
58// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
59// and adds who information via Subject.
60message ClusterRoleBinding {
61 // Standard object's metadata.
62 // +optional
63 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
64
65 // Subjects holds references to the objects the role applies to.
66 // +optional
67 // +listType=atomic
68 repeated Subject subjects = 2;
69
70 // RoleRef can only reference a ClusterRole in the global namespace.
71 // If the RoleRef cannot be resolved, the Authorizer must return an error.
72 // This field is immutable.
73 optional RoleRef roleRef = 3;
74}
75
76// ClusterRoleBindingList is a collection of ClusterRoleBindings
77message ClusterRoleBindingList {
78 // Standard object's metadata.
79 // +optional
80 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
81
82 // Items is a list of ClusterRoleBindings
83 repeated ClusterRoleBinding items = 2;
84}
85
86// ClusterRoleList is a collection of ClusterRoles
87message ClusterRoleList {
88 // Standard object's metadata.
89 // +optional
90 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
91
92 // Items is a list of ClusterRoles
93 repeated ClusterRole items = 2;
94}
95
96// PolicyRule holds information that describes a policy rule, but does not contain information
97// about who the rule applies to or which namespace the rule applies to.
98message PolicyRule {
99 // Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.
100 // +listType=atomic
101 repeated string verbs = 1;
102
103 // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
104 // the enumerated resources in any API group will be allowed. "" represents the core API group and "*" represents all API groups.
105 // +optional
106 // +listType=atomic
107 repeated string apiGroups = 2;
108
109 // Resources is a list of resources this rule applies to. '*' represents all resources.
110 // +optional
111 // +listType=atomic
112 repeated string resources = 3;
113
114 // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
115 // +optional
116 // +listType=atomic
117 repeated string resourceNames = 4;
118
119 // 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
120 // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
121 // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
122 // +optional
123 // +listType=atomic
124 repeated string nonResourceURLs = 5;
125}
126
127// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
128message Role {
129 // Standard object's metadata.
130 // +optional
131 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
132
133 // Rules holds all the PolicyRules for this Role
134 // +optional
135 // +listType=atomic
136 repeated PolicyRule rules = 2;
137}
138
139// 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.
140// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
141// namespace only have effect in that namespace.
142message RoleBinding {
143 // Standard object's metadata.
144 // +optional
145 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
146
147 // Subjects holds references to the objects the role applies to.
148 // +optional
149 // +listType=atomic
150 repeated Subject subjects = 2;
151
152 // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
153 // If the RoleRef cannot be resolved, the Authorizer must return an error.
154 // This field is immutable.
155 optional RoleRef roleRef = 3;
156}
157
158// RoleBindingList is a collection of RoleBindings
159message RoleBindingList {
160 // Standard object's metadata.
161 // +optional
162 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
163
164 // Items is a list of RoleBindings
165 repeated RoleBinding items = 2;
166}
167
168// RoleList is a collection of Roles
169message RoleList {
170 // Standard object's metadata.
171 // +optional
172 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
173
174 // Items is a list of Roles
175 repeated Role items = 2;
176}
177
178// RoleRef contains information that points to the role being used
179// +structType=atomic
180message RoleRef {
181 // APIGroup is the group for the resource being referenced
182 optional string apiGroup = 1;
183
184 // Kind is the type of resource being referenced
185 optional string kind = 2;
186
187 // Name is the name of resource being referenced
188 optional string name = 3;
189}
190
191// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
192// or a value for non-objects such as user and group names.
193// +structType=atomic
194message Subject {
195 // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
196 // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
197 optional string kind = 1;
198
199 // APIGroup holds the API group of the referenced subject.
200 // Defaults to "" for ServiceAccount subjects.
201 // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
202 // +optional
203 optional string apiGroup = 2;
204
205 // Name of the object being referenced.
206 optional string name = 3;
207
208 // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
209 // the Authorizer should report an error.
210 // +optional
211 optional string namespace = 4;
212}
213
View as plain text