generated.proto 8.9 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.v1beta1;
  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/v1beta1";
  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 ClusterRoleBindingList, 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 = 2;
  89. // Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups.
  90. // '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.
  91. // +optional
  92. // +listType=atomic
  93. repeated string resources = 3;
  94. // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
  95. // +optional
  96. // +listType=atomic
  97. repeated string resourceNames = 4;
  98. // 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
  99. // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
  100. // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
  101. // +optional
  102. // +listType=atomic
  103. repeated string nonResourceURLs = 5;
  104. }
  105. // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
  106. // Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.
  107. message Role {
  108. // Standard object's metadata.
  109. // +optional
  110. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  111. // Rules holds all the PolicyRules for this Role
  112. // +optional
  113. // +listType=atomic
  114. repeated PolicyRule rules = 2;
  115. }
  116. // 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.
  117. // It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
  118. // namespace only have effect in that namespace.
  119. // Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.
  120. message RoleBinding {
  121. // Standard object's metadata.
  122. // +optional
  123. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  124. // Subjects holds references to the objects the role applies to.
  125. // +optional
  126. // +listType=atomic
  127. repeated Subject subjects = 2;
  128. // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
  129. // If the RoleRef cannot be resolved, the Authorizer must return an error.
  130. optional RoleRef roleRef = 3;
  131. }
  132. // RoleBindingList is a collection of RoleBindings
  133. // Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.
  134. message RoleBindingList {
  135. // Standard object's metadata.
  136. // +optional
  137. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  138. // Items is a list of RoleBindings
  139. repeated RoleBinding items = 2;
  140. }
  141. // RoleList is a collection of Roles
  142. // Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.
  143. message RoleList {
  144. // Standard object's metadata.
  145. // +optional
  146. optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  147. // Items is a list of Roles
  148. repeated Role items = 2;
  149. }
  150. // RoleRef contains information that points to the role being used
  151. message RoleRef {
  152. // APIGroup is the group for the resource being referenced
  153. optional string apiGroup = 1;
  154. // Kind is the type of resource being referenced
  155. optional string kind = 2;
  156. // Name is the name of resource being referenced
  157. // +required
  158. // +k8s:required
  159. optional string name = 3;
  160. }
  161. // Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
  162. // or a value for non-objects such as user and group names.
  163. message Subject {
  164. // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
  165. // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
  166. optional string kind = 1;
  167. // APIGroup holds the API group of the referenced subject.
  168. // Defaults to "" for ServiceAccount subjects.
  169. // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
  170. // +optional
  171. optional string apiGroup = 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. }