generated.proto 8.5 KB

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