generated.proto 8.8 KB

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