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