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