generated.proto 7.7 KB

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