Files
kubesphere/vendor/istio.io/api/rbac/v1alpha1/rbac.pb.go
hongming fe6c5de00f update dependencies
Signed-off-by: hongming <talonwan@yunify.com>
2021-01-04 15:35:32 +08:00

3875 lines
100 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: rbac/v1alpha1/rbac.proto
// Note: The v1alpha1 RBAC policy is deprecated by the v1beta1 Authorization policy.
// This page is kept for migration purpose and will be removed in Istio 1.6.
//
// Istio RBAC (Role Based Access Control) defines ServiceRole and ServiceRoleBinding
// objects.
//
// A ServiceRole specification includes a list of rules (permissions). Each rule has
// the following standard fields:
//
// * services: a list of services.
// * methods: A list of HTTP methods. You can set the value to `["*"]` to include all HTTP methods.
// This field should not be set for TCP services. The policy will be ignored.
// For gRPC services, only `POST` is allowed; other methods will result in denying services.
// * paths: HTTP paths or gRPC methods. Note that gRPC methods should be
// presented in the form of "/packageName.serviceName/methodName" and are case sensitive.
//
// In addition to the standard fields, operators can also use custom keys in the `constraints` field,
// the supported keys are listed in the "constraints and properties" page.
//
// Below is an example of ServiceRole object "product-viewer", which has "read" ("GET" and "HEAD")
// access to "products.svc.cluster.local" service at versions "v1" and "v2". "path" is not specified,
// so it applies to any path in the service.
//
// ```yaml
// apiVersion: "rbac.istio.io/v1alpha1"
// kind: ServiceRole
// metadata:
// name: products-viewer
// namespace: default
// spec:
// rules:
// - services: ["products.svc.cluster.local"]
// methods: ["GET", "HEAD"]
// constraints:
// - key: "destination.labels[version]"
// values: ["v1", "v2"]
// ```
//
// A ServiceRoleBinding specification includes two parts:
//
// * The `roleRef` field that refers to a ServiceRole object in the same namespace.
// * A list of `subjects` that are assigned the roles.
//
// In addition to a simple `user` field, operators can also use custom keys in the `properties` field,
// the supported keys are listed in the "constraints and properties" page.
//
// Below is an example of ServiceRoleBinding object "test-binding-products", which binds two subjects
// to ServiceRole "product-viewer":
//
// * User "alice@yahoo.com"
// * Services in "abc" namespace.
//
// ```yaml
// apiVersion: "rbac.istio.io/v1alpha1"
// kind: ServiceRoleBinding
// metadata:
// name: test-binding-products
// namespace: default
// spec:
// subjects:
// - user: alice@yahoo.com
// - properties:
// source.namespace: "abc"
// roleRef:
// kind: ServiceRole
// name: "products-viewer"
// ```
package v1alpha1
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
io "io"
_ "istio.io/gogo-genproto/googleapis/google/api"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// $hide_from_docs
// RBAC ServiceRoleBinding enforcement mode, used to verify new ServiceRoleBinding
// configs work as expected before rolling to production. RBAC engine only logs results
// from configs that are in permissive mode, and discards result before returning
// to the user.
type EnforcementMode int32
const (
// Policy in ENFORCED mode has impact on user experience.
// Policy is in ENFORCED mode by default.
EnforcementMode_ENFORCED EnforcementMode = 0
// Policy in PERMISSIVE mode isn't enforced and has no impact on users.
// RBAC engine run policies in PERMISSIVE mode and logs stats.
EnforcementMode_PERMISSIVE EnforcementMode = 1
)
var EnforcementMode_name = map[int32]string{
0: "ENFORCED",
1: "PERMISSIVE",
}
var EnforcementMode_value = map[string]int32{
"ENFORCED": 0,
"PERMISSIVE": 1,
}
func (x EnforcementMode) String() string {
return proto.EnumName(EnforcementMode_name, int32(x))
}
func (EnforcementMode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{0}
}
// $hide_from_docs
type RbacConfig_Mode int32
const (
// Disable Istio RBAC completely, Istio RBAC policies will not be enforced.
RbacConfig_OFF RbacConfig_Mode = 0
// Enable Istio RBAC for all services and namespaces. Note Istio RBAC is deny-by-default
// which means all requests will be denied if it's not allowed by RBAC rules.
RbacConfig_ON RbacConfig_Mode = 1
// Enable Istio RBAC only for services and namespaces specified in the inclusion field. Any other
// services and namespaces not in the inclusion field will not be enforced by Istio RBAC policies.
RbacConfig_ON_WITH_INCLUSION RbacConfig_Mode = 2
// Enable Istio RBAC for all services and namespaces except those specified in the exclusion field. Any other
// services and namespaces not in the exclusion field will be enforced by Istio RBAC policies.
RbacConfig_ON_WITH_EXCLUSION RbacConfig_Mode = 3
)
var RbacConfig_Mode_name = map[int32]string{
0: "OFF",
1: "ON",
2: "ON_WITH_INCLUSION",
3: "ON_WITH_EXCLUSION",
}
var RbacConfig_Mode_value = map[string]int32{
"OFF": 0,
"ON": 1,
"ON_WITH_INCLUSION": 2,
"ON_WITH_EXCLUSION": 3,
}
func (x RbacConfig_Mode) String() string {
return proto.EnumName(RbacConfig_Mode_name, int32(x))
}
func (RbacConfig_Mode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{5, 0}
}
// $hide_from_docs
// ServiceRole specification contains a list of access rules (permissions).
//
// <!-- crd generation tags
// +cue-gen:ServiceRole:groupName:rbac.istio.io
// +cue-gen:ServiceRole:version:v1alpha1
// +cue-gen:ServiceRole:storageVersion
// +cue-gen:ServiceRole:annotations:helm.sh/resource-policy=keep
// +cue-gen:ServiceRole:labels:app=mixer,chart=istio,heritage=Tiller,release=istio,package=istio.io.mixer,istio=rbac
// +cue-gen:ServiceRole:subresource:status
// +cue-gen:ServiceRole:scope:Namespaced
// +cue-gen:ServiceRole:resource:categories=istio-io,rbac-istio-io
// +cue-gen:ServiceRole:preserveUnknownFields:false
// -->
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=rbac.istio.io/v1alpha1
// +genclient
// +k8s:deepcopy-gen=true
// -->
type ServiceRole struct {
// The set of access rules (permissions) that the role has.
Rules []*AccessRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ServiceRole) Reset() { *m = ServiceRole{} }
func (m *ServiceRole) String() string { return proto.CompactTextString(m) }
func (*ServiceRole) ProtoMessage() {}
func (*ServiceRole) Descriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{0}
}
func (m *ServiceRole) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ServiceRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ServiceRole.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ServiceRole) XXX_Merge(src proto.Message) {
xxx_messageInfo_ServiceRole.Merge(m, src)
}
func (m *ServiceRole) XXX_Size() int {
return m.Size()
}
func (m *ServiceRole) XXX_DiscardUnknown() {
xxx_messageInfo_ServiceRole.DiscardUnknown(m)
}
var xxx_messageInfo_ServiceRole proto.InternalMessageInfo
func (m *ServiceRole) GetRules() []*AccessRule {
if m != nil {
return m.Rules
}
return nil
}
// $hide_from_docs
// AccessRule defines a permission to access a list of services.
type AccessRule struct {
// A list of service names.
// Exact match, prefix match, and suffix match are supported for service names.
// For example, the service name "bookstore.mtv.cluster.local" matches
// "bookstore.mtv.cluster.local" (exact match), or "bookstore\*" (prefix match),
// or "\*.mtv.cluster.local" (suffix match).
// If set to ["\*"], it refers to all services in the namespace.
Services []string `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
// $hide_from_docs
// Optional. A list of HTTP hosts. This is matched against the HOST header in
// a HTTP request. Exact match, prefix match and suffix match are supported.
// For example, the host "test.abc.com" matches "test.abc.com" (exact match),
// or "\*.abc.com" (prefix match), or "test.abc.\*" (suffix match).
// If not specified, it matches to any host.
// This field should not be set for TCP services. The policy will be ignored.
Hosts []string `protobuf:"bytes,5,rep,name=hosts,proto3" json:"hosts,omitempty"`
// $hide_from_docs
// Optional. A list of HTTP hosts that must not be matched.
NotHosts []string `protobuf:"bytes,6,rep,name=not_hosts,json=notHosts,proto3" json:"not_hosts,omitempty"`
// Optional. A list of HTTP paths or gRPC methods.
// gRPC methods must be presented as fully-qualified name in the form of
// "/packageName.serviceName/methodName" and are case sensitive.
// Exact match, prefix match, and suffix match are supported. For example,
// the path "/books/review" matches "/books/review" (exact match),
// or "/books/\*" (prefix match), or "\*/review" (suffix match).
// If not specified, it matches to any path.
// This field should not be set for TCP services. The policy will be ignored.
Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
// $hide_from_docs
// Optional. A list of HTTP paths or gRPC methods that must not be matched.
NotPaths []string `protobuf:"bytes,7,rep,name=not_paths,json=notPaths,proto3" json:"not_paths,omitempty"`
// Optional. A list of HTTP methods (e.g., "GET", "POST").
// If not specified or specified as "\*", it matches to any methods.
// This field should not be set for TCP services. The policy will be ignored.
// For gRPC services, only `POST` is allowed; other methods will result in denying services.
Methods []string `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
// $hide_from_docs
// Optional. A list of HTTP methods that must not be matched.
// Note: It's an error to set methods and not_methods at the same time.
NotMethods []string `protobuf:"bytes,8,rep,name=not_methods,json=notMethods,proto3" json:"not_methods,omitempty"`
// $hide_from_docs
// Optional. A list of port numbers of the request. If not specified, it matches
// to any port number.
// Note: It's an error to set ports and not_ports at the same time.
Ports []int32 `protobuf:"varint,9,rep,packed,name=ports,proto3" json:"ports,omitempty"`
// $hide_from_docs
// Optional. A list of port numbers that must not be matched.
// Note: It's an error to set ports and not_ports at the same time.
NotPorts []int32 `protobuf:"varint,10,rep,packed,name=not_ports,json=notPorts,proto3" json:"not_ports,omitempty"`
// Optional. Extra constraints in the ServiceRole specification.
Constraints []*AccessRule_Constraint `protobuf:"bytes,4,rep,name=constraints,proto3" json:"constraints,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AccessRule) Reset() { *m = AccessRule{} }
func (m *AccessRule) String() string { return proto.CompactTextString(m) }
func (*AccessRule) ProtoMessage() {}
func (*AccessRule) Descriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{1}
}
func (m *AccessRule) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AccessRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AccessRule.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AccessRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_AccessRule.Merge(m, src)
}
func (m *AccessRule) XXX_Size() int {
return m.Size()
}
func (m *AccessRule) XXX_DiscardUnknown() {
xxx_messageInfo_AccessRule.DiscardUnknown(m)
}
var xxx_messageInfo_AccessRule proto.InternalMessageInfo
func (m *AccessRule) GetServices() []string {
if m != nil {
return m.Services
}
return nil
}
func (m *AccessRule) GetHosts() []string {
if m != nil {
return m.Hosts
}
return nil
}
func (m *AccessRule) GetNotHosts() []string {
if m != nil {
return m.NotHosts
}
return nil
}
func (m *AccessRule) GetPaths() []string {
if m != nil {
return m.Paths
}
return nil
}
func (m *AccessRule) GetNotPaths() []string {
if m != nil {
return m.NotPaths
}
return nil
}
func (m *AccessRule) GetMethods() []string {
if m != nil {
return m.Methods
}
return nil
}
func (m *AccessRule) GetNotMethods() []string {
if m != nil {
return m.NotMethods
}
return nil
}
func (m *AccessRule) GetPorts() []int32 {
if m != nil {
return m.Ports
}
return nil
}
func (m *AccessRule) GetNotPorts() []int32 {
if m != nil {
return m.NotPorts
}
return nil
}
func (m *AccessRule) GetConstraints() []*AccessRule_Constraint {
if m != nil {
return m.Constraints
}
return nil
}
// $hide_from_docs
// Definition of a custom constraint. The supported keys are listed in the "constraint and properties" page.
type AccessRule_Constraint struct {
// Key of the constraint.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// List of valid values for the constraint.
// Exact match, prefix match, and suffix match are supported.
// For example, the value "v1alpha2" matches "v1alpha2" (exact match),
// or "v1\*" (prefix match), or "\*alpha2" (suffix match).
Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AccessRule_Constraint) Reset() { *m = AccessRule_Constraint{} }
func (m *AccessRule_Constraint) String() string { return proto.CompactTextString(m) }
func (*AccessRule_Constraint) ProtoMessage() {}
func (*AccessRule_Constraint) Descriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{1, 0}
}
func (m *AccessRule_Constraint) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AccessRule_Constraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AccessRule_Constraint.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AccessRule_Constraint) XXX_Merge(src proto.Message) {
xxx_messageInfo_AccessRule_Constraint.Merge(m, src)
}
func (m *AccessRule_Constraint) XXX_Size() int {
return m.Size()
}
func (m *AccessRule_Constraint) XXX_DiscardUnknown() {
xxx_messageInfo_AccessRule_Constraint.DiscardUnknown(m)
}
var xxx_messageInfo_AccessRule_Constraint proto.InternalMessageInfo
func (m *AccessRule_Constraint) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *AccessRule_Constraint) GetValues() []string {
if m != nil {
return m.Values
}
return nil
}
// $hide_from_docs
// ServiceRoleBinding assigns a ServiceRole to a list of subjects.
//
// <!-- crd generation tags
// +cue-gen:ServiceRoleBinding:groupName:rbac.istio.io
// +cue-gen:ServiceRoleBinding:version:v1alpha1
// +cue-gen:ServiceRoleBinding:storageVersion
// +cue-gen:ServiceRoleBinding:annotations:helm.sh/resource-policy=keep
// +cue-gen:ServiceRoleBinding:labels:app=mixer,chart=istio,heritage=Tiller,release=istio,package=istio.io.mixer,istio=rbac
// +cue-gen:ServiceRoleBinding:subresource:status
// +cue-gen:ServiceRoleBinding:scope:Namespaced
// +cue-gen:ServiceRoleBinding:resource:categories=istio-io,rbac-istio-io
// +cue-gen:ServiceRoleBinding:printerColumn:name=Reference,type=string,JSONPath=.spec.roleRef.name,description="The name of the ServiceRole object being referenced"
// +cue-gen:ServiceRoleBinding:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp is a timestamp
// representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations.
// Clients may not set this value. It is represented in RFC3339 form and is in UTC.
// Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata"
// +cue-gen:ServiceRoleBinding:preserveUnknownFields:false
// -->
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=rbac.istio.io/v1alpha1
// +genclient
// +k8s:deepcopy-gen=true
// -->
type ServiceRoleBinding struct {
// List of subjects that are assigned the ServiceRole object.
Subjects []*Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"`
// Reference to the ServiceRole object.
RoleRef *RoleRef `protobuf:"bytes,2,opt,name=roleRef,proto3" json:"roleRef,omitempty"`
// $hide_from_docs
// Indicates enforcement mode of the ServiceRoleBinding.
Mode EnforcementMode `protobuf:"varint,3,opt,name=mode,proto3,enum=istio.rbac.v1alpha1.EnforcementMode" json:"mode,omitempty"`
// $hide_from_docs
// Inline role definition. An inline role is a role that is defined inside an
// authorization policy, instead of explicitly defined in a ServiceRole object.
// Inline roles can be used for the role definitions that are not intended to
// be reused in other bindings, while explicit roles are reusable. Both inline
// roles (defined in "actions" field) and explicit roles (defined in ServiceRole)
// are supported. Users should use only one of them in a single binding.
// For example, the following "product-frontend" AuthorizationPolicy allows "frontend"
// service to view "product" service on "/info" path.
// ```yaml
// apiVersion: "rbac.istio.io/v1alpha1"
// kind: AuthorizationPolicy
// metadata:
// name: product-frontend
// namespace: ns1
// spec:
// selector:
// labels:
// app: product
// allow:
// - subjects:
// - names: ["cluster.local/ns/default/sa/frontend"]
// actions:
// - paths: ["/info"]
// methods: ["GET"]
// The set of access rules (permissions) that the role has.
Actions []*AccessRule `protobuf:"bytes,4,rep,name=actions,proto3" json:"actions,omitempty"`
// $hide_from_docs
// A `role` inside a ServiceRoleBinding refers to the ServiceRole that this
// ServiceRoleBinding binds to. A ServiceRoleBinding can bind to a ServiceRole
// in the same namespace or the root namespace. A ServiceRole in the root namespace
// represents a mesh global ServiceRole.
// The value of `role` is the name of the ServiceRole, and it can start with or without a forward slash ("/").
// When a `role` starts with "/", e.g. "/service-viewer", it means that this ServiceRoleBinding
// refers to the ServiceRole in the configurable Istio root namespace.
// When a `role` starts without "/", this ServiceRoleBinding refers to the ServiceRole in the
// same namespace as the AuthorizationPolicy's, which contains said ServiceRoleBinding.
Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ServiceRoleBinding) Reset() { *m = ServiceRoleBinding{} }
func (m *ServiceRoleBinding) String() string { return proto.CompactTextString(m) }
func (*ServiceRoleBinding) ProtoMessage() {}
func (*ServiceRoleBinding) Descriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{2}
}
func (m *ServiceRoleBinding) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ServiceRoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ServiceRoleBinding.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ServiceRoleBinding) XXX_Merge(src proto.Message) {
xxx_messageInfo_ServiceRoleBinding.Merge(m, src)
}
func (m *ServiceRoleBinding) XXX_Size() int {
return m.Size()
}
func (m *ServiceRoleBinding) XXX_DiscardUnknown() {
xxx_messageInfo_ServiceRoleBinding.DiscardUnknown(m)
}
var xxx_messageInfo_ServiceRoleBinding proto.InternalMessageInfo
func (m *ServiceRoleBinding) GetSubjects() []*Subject {
if m != nil {
return m.Subjects
}
return nil
}
func (m *ServiceRoleBinding) GetRoleRef() *RoleRef {
if m != nil {
return m.RoleRef
}
return nil
}
func (m *ServiceRoleBinding) GetMode() EnforcementMode {
if m != nil {
return m.Mode
}
return EnforcementMode_ENFORCED
}
func (m *ServiceRoleBinding) GetActions() []*AccessRule {
if m != nil {
return m.Actions
}
return nil
}
func (m *ServiceRoleBinding) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
// $hide_from_docs
// Subject defines an identity. The identity is either a user or identified by a set of `properties`.
// The supported keys in `properties` are listed in "constraint and properties" page.
type Subject struct {
// Optional. The user name/ID that the subject represents.
User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
// $hide_from_docs
// Optional. A list of subject names. This is matched to the
// `source.principal` attribute. If one of subject names is "\*", it matches to a subject with any name.
// Prefix and suffix matches are supported.
Names []string `protobuf:"bytes,4,rep,name=names,proto3" json:"names,omitempty"`
// $hide_from_docs
// Optional. A list of subject names that must not be matched.
NotNames []string `protobuf:"bytes,5,rep,name=not_names,json=notNames,proto3" json:"not_names,omitempty"`
// $hide_from_docs
// Optional. The group that the subject belongs to.
// Deprecated. Use groups and not_groups instead.
Group string `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` // Deprecated: Do not use.
// $hide_from_docs
// Optional. A list of groups that the subject represents. This is matched to the
// `request.auth.claims[groups]` attribute. If not specified, it applies to any groups.
Groups []string `protobuf:"bytes,6,rep,name=groups,proto3" json:"groups,omitempty"`
// $hide_from_docs
// Optional. A list of groups that must not be matched.
NotGroups []string `protobuf:"bytes,7,rep,name=not_groups,json=notGroups,proto3" json:"not_groups,omitempty"`
// $hide_from_docs
// Optional. A list of namespaces that the subject represents. This is matched to
// the `source.namespace` attribute. If not specified, it applies to any namespaces.
Namespaces []string `protobuf:"bytes,8,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
// $hide_from_docs
// Optional. A list of namespaces that must not be matched.
NotNamespaces []string `protobuf:"bytes,9,rep,name=not_namespaces,json=notNamespaces,proto3" json:"not_namespaces,omitempty"`
// $hide_from_docs
// Optional. A list of IP address or CIDR ranges that the subject represents.
// E.g. 192.168.100.2 or 10.1.0.0/16. If not specified, it applies to any IP addresses.
Ips []string `protobuf:"bytes,10,rep,name=ips,proto3" json:"ips,omitempty"`
// $hide_from_docs
// Optional. A list of IP addresses or CIDR ranges that must not be matched.
NotIps []string `protobuf:"bytes,11,rep,name=not_ips,json=notIps,proto3" json:"not_ips,omitempty"`
// Optional. The set of properties that identify the subject.
Properties map[string]string `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Subject) Reset() { *m = Subject{} }
func (m *Subject) String() string { return proto.CompactTextString(m) }
func (*Subject) ProtoMessage() {}
func (*Subject) Descriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{3}
}
func (m *Subject) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Subject.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Subject) XXX_Merge(src proto.Message) {
xxx_messageInfo_Subject.Merge(m, src)
}
func (m *Subject) XXX_Size() int {
return m.Size()
}
func (m *Subject) XXX_DiscardUnknown() {
xxx_messageInfo_Subject.DiscardUnknown(m)
}
var xxx_messageInfo_Subject proto.InternalMessageInfo
func (m *Subject) GetUser() string {
if m != nil {
return m.User
}
return ""
}
func (m *Subject) GetNames() []string {
if m != nil {
return m.Names
}
return nil
}
func (m *Subject) GetNotNames() []string {
if m != nil {
return m.NotNames
}
return nil
}
// Deprecated: Do not use.
func (m *Subject) GetGroup() string {
if m != nil {
return m.Group
}
return ""
}
func (m *Subject) GetGroups() []string {
if m != nil {
return m.Groups
}
return nil
}
func (m *Subject) GetNotGroups() []string {
if m != nil {
return m.NotGroups
}
return nil
}
func (m *Subject) GetNamespaces() []string {
if m != nil {
return m.Namespaces
}
return nil
}
func (m *Subject) GetNotNamespaces() []string {
if m != nil {
return m.NotNamespaces
}
return nil
}
func (m *Subject) GetIps() []string {
if m != nil {
return m.Ips
}
return nil
}
func (m *Subject) GetNotIps() []string {
if m != nil {
return m.NotIps
}
return nil
}
func (m *Subject) GetProperties() map[string]string {
if m != nil {
return m.Properties
}
return nil
}
// $hide_from_docs
// RoleRef refers to a role object.
type RoleRef struct {
// The type of the role being referenced.
// Currently, "ServiceRole" is the only supported value for "kind".
Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
// The name of the ServiceRole object being referenced.
// The ServiceRole object must be in the same namespace as the ServiceRoleBinding object.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RoleRef) Reset() { *m = RoleRef{} }
func (m *RoleRef) String() string { return proto.CompactTextString(m) }
func (*RoleRef) ProtoMessage() {}
func (*RoleRef) Descriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{4}
}
func (m *RoleRef) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RoleRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RoleRef.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *RoleRef) XXX_Merge(src proto.Message) {
xxx_messageInfo_RoleRef.Merge(m, src)
}
func (m *RoleRef) XXX_Size() int {
return m.Size()
}
func (m *RoleRef) XXX_DiscardUnknown() {
xxx_messageInfo_RoleRef.DiscardUnknown(m)
}
var xxx_messageInfo_RoleRef proto.InternalMessageInfo
func (m *RoleRef) GetKind() string {
if m != nil {
return m.Kind
}
return ""
}
func (m *RoleRef) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// $hide_from_docs
// RbacConfig implements the ClusterRbacConfig Custom Resource Definition for controlling Istio RBAC behavior.
// The ClusterRbacConfig Custom Resource is a singleton where only one ClusterRbacConfig should be created
// globally in the mesh and the namespace should be the same to other Istio components, which usually is `istio-system`.
//
// Below is an example of an `ClusterRbacConfig` resource called `istio-rbac-config` which enables Istio RBAC for all
// services in the default namespace.
//
// ```yaml
// apiVersion: "rbac.istio.io/v1alpha1"
// kind: ClusterRbacConfig
// metadata:
// name: default
// namespace: istio-system
// spec:
// mode: ON_WITH_INCLUSION
// inclusion:
// namespaces: [ "default" ]
// ```
//
// <!-- crd generation tags
// +cue-gen:RbacConfig:groupName:rbac.istio.io
// +cue-gen:RbacConfig:version:v1alpha1
// +cue-gen:RbacConfig:storageVersion
// +cue-gen:RbacConfig:annotations:helm.sh/resource-policy=keep
// +cue-gen:RbacConfig:labels:app=mixer,chart=istio,istio=rbac,heritage=Tiller,release=istio,package=istio.io.mixer
// +cue-gen:RbacConfig:subresource:status
// +cue-gen:RbacConfig:scope:Namespaced
// +cue-gen:RbacConfig:resource:categories=istio-io,rbac-istio-io
// +cue-gen:RbacConfig:preserveUnknownFields:false
// -->
//
// <!-- crd generation tags
// +cue-gen:ClusterRbacConfig:groupName:rbac.istio.io
// +cue-gen:ClusterRbacConfig:version:v1alpha1
// +cue-gen:ClusterRbacConfig:storageVersion
// +cue-gen:ClusterRbacConfig:annotations:helm.sh/resource-policy=keep
// +cue-gen:ClusterRbacConfig:labels:app=istio-pilot,chart=istio,istio=rbac,heritage=Tiller,release=istio
// +cue-gen:ClusterRbacConfig:subresource:status
// +cue-gen:ClusterRbacConfig:scope:Cluster
// +cue-gen:ClusterRbacConfig:resource:categories=istio-io,rbac-istio-io
// +cue-gen:ClusterRbacConfig:preserveUnknownFields:false
// -->
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=rbac.istio.io/v1alpha1
// +kubetype-gen:kubeType=RbacConfig
// +kubetype-gen:kubeType=ClusterRbacConfig
// +kubetype-gen:ClusterRbacConfig:tag=genclient:nonNamespaced
// +genclient
// +k8s:deepcopy-gen=true
// -->
type RbacConfig struct {
// Istio RBAC mode.
Mode RbacConfig_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=istio.rbac.v1alpha1.RbacConfig_Mode" json:"mode,omitempty"`
// A list of services or namespaces that should be enforced by Istio RBAC policies. Note: This field have
// effect only when mode is ON_WITH_INCLUSION and will be ignored for any other modes.
Inclusion *RbacConfig_Target `protobuf:"bytes,2,opt,name=inclusion,proto3" json:"inclusion,omitempty"`
// A list of services or namespaces that should not be enforced by Istio RBAC policies. Note: This field have
// effect only when mode is ON_WITH_EXCLUSION and will be ignored for any other modes.
Exclusion *RbacConfig_Target `protobuf:"bytes,3,opt,name=exclusion,proto3" json:"exclusion,omitempty"`
// $hide_from_docs
// Indicates enforcement mode of the RbacConfig, in ENFORCED mode by default.
// It's used to verify new RbacConfig work as expected before rolling to production.
// When setting as PERMISSIVE, RBAC isn't enforced and has no impact on users.
// RBAC engine run RbacConfig in PERMISSIVE mode and logs stats.
// Invalid to set RbacConfig in PERMISSIVE and ServiceRoleBinding in ENFORCED mode.
EnforcementMode EnforcementMode `protobuf:"varint,4,opt,name=enforcement_mode,json=enforcementMode,proto3,enum=istio.rbac.v1alpha1.EnforcementMode" json:"enforcement_mode,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RbacConfig) Reset() { *m = RbacConfig{} }
func (m *RbacConfig) String() string { return proto.CompactTextString(m) }
func (*RbacConfig) ProtoMessage() {}
func (*RbacConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{5}
}
func (m *RbacConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RbacConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RbacConfig.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *RbacConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_RbacConfig.Merge(m, src)
}
func (m *RbacConfig) XXX_Size() int {
return m.Size()
}
func (m *RbacConfig) XXX_DiscardUnknown() {
xxx_messageInfo_RbacConfig.DiscardUnknown(m)
}
var xxx_messageInfo_RbacConfig proto.InternalMessageInfo
func (m *RbacConfig) GetMode() RbacConfig_Mode {
if m != nil {
return m.Mode
}
return RbacConfig_OFF
}
func (m *RbacConfig) GetInclusion() *RbacConfig_Target {
if m != nil {
return m.Inclusion
}
return nil
}
func (m *RbacConfig) GetExclusion() *RbacConfig_Target {
if m != nil {
return m.Exclusion
}
return nil
}
func (m *RbacConfig) GetEnforcementMode() EnforcementMode {
if m != nil {
return m.EnforcementMode
}
return EnforcementMode_ENFORCED
}
// $hide_from_docs
// Target defines a list of services or namespaces.
type RbacConfig_Target struct {
// A list of services.
Services []string `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
// A list of namespaces.
Namespaces []string `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RbacConfig_Target) Reset() { *m = RbacConfig_Target{} }
func (m *RbacConfig_Target) String() string { return proto.CompactTextString(m) }
func (*RbacConfig_Target) ProtoMessage() {}
func (*RbacConfig_Target) Descriptor() ([]byte, []int) {
return fileDescriptor_3462954d26c055c0, []int{5, 0}
}
func (m *RbacConfig_Target) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RbacConfig_Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RbacConfig_Target.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *RbacConfig_Target) XXX_Merge(src proto.Message) {
xxx_messageInfo_RbacConfig_Target.Merge(m, src)
}
func (m *RbacConfig_Target) XXX_Size() int {
return m.Size()
}
func (m *RbacConfig_Target) XXX_DiscardUnknown() {
xxx_messageInfo_RbacConfig_Target.DiscardUnknown(m)
}
var xxx_messageInfo_RbacConfig_Target proto.InternalMessageInfo
func (m *RbacConfig_Target) GetServices() []string {
if m != nil {
return m.Services
}
return nil
}
func (m *RbacConfig_Target) GetNamespaces() []string {
if m != nil {
return m.Namespaces
}
return nil
}
func init() {
proto.RegisterEnum("istio.rbac.v1alpha1.EnforcementMode", EnforcementMode_name, EnforcementMode_value)
proto.RegisterEnum("istio.rbac.v1alpha1.RbacConfig_Mode", RbacConfig_Mode_name, RbacConfig_Mode_value)
proto.RegisterType((*ServiceRole)(nil), "istio.rbac.v1alpha1.ServiceRole")
proto.RegisterType((*AccessRule)(nil), "istio.rbac.v1alpha1.AccessRule")
proto.RegisterType((*AccessRule_Constraint)(nil), "istio.rbac.v1alpha1.AccessRule.Constraint")
proto.RegisterType((*ServiceRoleBinding)(nil), "istio.rbac.v1alpha1.ServiceRoleBinding")
proto.RegisterType((*Subject)(nil), "istio.rbac.v1alpha1.Subject")
proto.RegisterMapType((map[string]string)(nil), "istio.rbac.v1alpha1.Subject.PropertiesEntry")
proto.RegisterType((*RoleRef)(nil), "istio.rbac.v1alpha1.RoleRef")
proto.RegisterType((*RbacConfig)(nil), "istio.rbac.v1alpha1.RbacConfig")
proto.RegisterType((*RbacConfig_Target)(nil), "istio.rbac.v1alpha1.RbacConfig.Target")
}
func init() { proto.RegisterFile("rbac/v1alpha1/rbac.proto", fileDescriptor_3462954d26c055c0) }
var fileDescriptor_3462954d26c055c0 = []byte{
// 838 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xef, 0x6e, 0xdb, 0x36,
0x10, 0xaf, 0x24, 0xcb, 0xb2, 0xce, 0x5b, 0xa2, 0x71, 0xd9, 0x2a, 0x78, 0x5b, 0x62, 0x18, 0xdb,
0x60, 0x14, 0x83, 0x8d, 0x66, 0xc0, 0x50, 0xb4, 0xe8, 0x80, 0x26, 0x51, 0x56, 0x03, 0x8d, 0x1d,
0xd0, 0xdd, 0x1f, 0xec, 0x8b, 0x21, 0xcb, 0x8c, 0xcd, 0x55, 0x21, 0x05, 0x89, 0x36, 0xd6, 0x27,
0xd8, 0x5b, 0x0c, 0x7b, 0x84, 0x3d, 0xc6, 0x3e, 0xee, 0x11, 0x8a, 0x3c, 0xc9, 0x40, 0x52, 0x94,
0x1d, 0xc3, 0x6b, 0x9b, 0x6f, 0xbc, 0xfb, 0xdd, 0xef, 0xee, 0x74, 0xf7, 0xa3, 0x08, 0x61, 0x3e,
0x8d, 0x93, 0xfe, 0xea, 0x61, 0x9c, 0x66, 0x8b, 0xf8, 0x61, 0x5f, 0x5a, 0xbd, 0x2c, 0xe7, 0x82,
0xa3, 0x8f, 0x69, 0x21, 0x28, 0xef, 0x29, 0x8f, 0xc1, 0x5b, 0x47, 0x73, 0xce, 0xe7, 0x29, 0xe9,
0xc7, 0x19, 0xed, 0x5f, 0x51, 0x92, 0xce, 0x26, 0x53, 0xb2, 0x88, 0x57, 0x94, 0xe7, 0x9a, 0xd5,
0x19, 0x40, 0x73, 0x4c, 0xf2, 0x15, 0x4d, 0x08, 0xe6, 0x29, 0x41, 0x8f, 0xc1, 0xcd, 0x97, 0x29,
0x29, 0x42, 0xab, 0xed, 0x74, 0x9b, 0xc7, 0x47, 0xbd, 0x1d, 0x49, 0x7b, 0xcf, 0x92, 0x84, 0x14,
0x05, 0x5e, 0xa6, 0xe4, 0xc4, 0x79, 0xf3, 0xcc, 0xc6, 0x9a, 0xd2, 0xf9, 0xc3, 0x01, 0x58, 0x43,
0xe8, 0x08, 0x1a, 0x85, 0xce, 0xac, 0xb3, 0xf9, 0x3a, 0xb8, 0x72, 0xa2, 0x03, 0x70, 0x17, 0xbc,
0x10, 0x45, 0xe8, 0x4a, 0x14, 0x6b, 0x03, 0x7d, 0x06, 0x3e, 0xe3, 0x62, 0xa2, 0x91, 0xba, 0x42,
0x1a, 0x8c, 0x8b, 0xe7, 0x0a, 0x3c, 0x00, 0x37, 0x8b, 0xc5, 0xa2, 0x08, 0x6d, 0x4d, 0x51, 0x86,
0xa1, 0x68, 0xc4, 0xab, 0x28, 0x97, 0x0a, 0x0c, 0xc1, 0xbb, 0x26, 0x62, 0xc1, 0x67, 0x45, 0xe8,
0x28, 0xc8, 0x98, 0xe8, 0x08, 0x9a, 0x92, 0x66, 0xd0, 0x86, 0x42, 0x81, 0x71, 0x71, 0x51, 0x06,
0xc8, 0x6a, 0x3c, 0x17, 0x45, 0xe8, 0xb7, 0x9d, 0xae, 0x8b, 0xb5, 0x51, 0x55, 0x53, 0x08, 0x28,
0x44, 0x55, 0x53, 0xe0, 0x0b, 0x68, 0x26, 0x9c, 0x15, 0x22, 0x8f, 0x29, 0x13, 0x45, 0x58, 0x53,
0x53, 0x7c, 0xf0, 0x8e, 0x29, 0xf6, 0x4e, 0x2b, 0x0a, 0xde, 0xa4, 0xb7, 0xbe, 0x03, 0x58, 0x43,
0x28, 0x00, 0xe7, 0x15, 0x79, 0x1d, 0x5a, 0x6d, 0xab, 0xeb, 0x63, 0x79, 0x44, 0x9f, 0x42, 0x7d,
0x15, 0xa7, 0x4b, 0x62, 0xe6, 0x51, 0x5a, 0x9d, 0x3f, 0x6d, 0x40, 0x1b, 0x5b, 0x3d, 0xa1, 0x6c,
0x46, 0xd9, 0x1c, 0x3d, 0x85, 0x46, 0xb1, 0x9c, 0xfe, 0x46, 0x12, 0x61, 0xf6, 0xfb, 0xf9, 0xce,
0xce, 0xc6, 0x3a, 0xc8, 0xec, 0xab, 0xa4, 0xa0, 0x27, 0xe0, 0xe5, 0x3c, 0x25, 0x98, 0x5c, 0x85,
0x76, 0xdb, 0xfa, 0x5f, 0x36, 0xd6, 0x31, 0x9a, 0x6d, 0x18, 0xe8, 0x11, 0xd4, 0xae, 0xf9, 0x8c,
0x84, 0x4e, 0xdb, 0xea, 0xee, 0x1d, 0x7f, 0xb9, 0x93, 0x19, 0xb1, 0x2b, 0x9e, 0x27, 0xe4, 0x9a,
0x30, 0x71, 0xc1, 0x67, 0x04, 0x2b, 0x06, 0xfa, 0x1e, 0xbc, 0x38, 0x11, 0x94, 0x33, 0x33, 0xce,
0xf7, 0x13, 0xa5, 0x21, 0x21, 0x04, 0x35, 0xd9, 0x44, 0xe8, 0xaa, 0xb9, 0xa9, 0x73, 0xe7, 0x2f,
0x07, 0xbc, 0xf2, 0x2b, 0x25, 0xbe, 0x2c, 0x48, 0x5e, 0xce, 0x55, 0x9d, 0xe5, 0xe6, 0x59, 0x7c,
0x4d, 0x74, 0x45, 0x1f, 0x6b, 0xc3, 0x6c, 0x5e, 0x23, 0x6e, 0xa5, 0xb3, 0xa1, 0x02, 0x43, 0x70,
0xe7, 0x39, 0x5f, 0x66, 0x6a, 0x36, 0xfe, 0x89, 0x1d, 0x5a, 0x58, 0x3b, 0xe4, 0x96, 0xd4, 0xc1,
0xc8, 0xb9, 0xb4, 0xd0, 0x17, 0x20, 0xc5, 0x36, 0x29, 0x31, 0xad, 0x5b, 0x59, 0xe0, 0x07, 0x0d,
0x1f, 0x02, 0xa8, 0x4a, 0x59, 0x2c, 0x6f, 0x90, 0x51, 0x67, 0xe5, 0x41, 0x5f, 0xc1, 0x5e, 0xd5,
0x8d, 0x8e, 0xf1, 0x55, 0xcc, 0x87, 0xa6, 0x25, 0x1d, 0x16, 0x80, 0x43, 0x33, 0x2d, 0x54, 0x1f,
0xcb, 0x23, 0xba, 0x0f, 0x9e, 0x24, 0x4a, 0x6f, 0x53, 0x37, 0xc4, 0xb8, 0x18, 0x64, 0x52, 0xbc,
0x90, 0xe5, 0x3c, 0x23, 0xb9, 0xa0, 0x44, 0xdf, 0x96, 0xe6, 0xf1, 0x37, 0x6f, 0x53, 0x48, 0xef,
0xb2, 0x0a, 0x8f, 0x98, 0xc8, 0x5f, 0xe3, 0x0d, 0x7e, 0xeb, 0x29, 0xec, 0x6f, 0xc1, 0x3b, 0x14,
0x7c, 0x00, 0xae, 0xd2, 0xac, 0x9e, 0x1a, 0xd6, 0xc6, 0x63, 0xfb, 0x91, 0xd5, 0x79, 0x02, 0x5e,
0xa9, 0x24, 0x74, 0x1f, 0x6a, 0xaf, 0x28, 0x9b, 0x69, 0x9e, 0xde, 0xae, 0x72, 0x48, 0x40, 0x7e,
0x7e, 0x39, 0x72, 0x0d, 0x48, 0x47, 0xe7, 0x6f, 0x07, 0x00, 0x4f, 0xe3, 0xe4, 0x94, 0xb3, 0x2b,
0x3a, 0xaf, 0xc4, 0x67, 0xbd, 0x45, 0x7c, 0xeb, 0xf0, 0xde, 0x86, 0xf8, 0xce, 0xc0, 0xa7, 0x2c,
0x49, 0x97, 0x05, 0xe5, 0xac, 0x54, 0xfd, 0xd7, 0xef, 0xa2, 0xbf, 0x8c, 0xf3, 0x39, 0x11, 0x78,
0x4d, 0x94, 0x59, 0xc8, 0xef, 0x26, 0x8b, 0x73, 0xb7, 0x2c, 0x15, 0x11, 0x8d, 0x20, 0x20, 0xeb,
0x1b, 0x32, 0x51, 0x5f, 0x54, 0xbb, 0xc3, 0x75, 0xda, 0x27, 0xb7, 0x1d, 0xad, 0x33, 0xa8, 0xeb,
0x2a, 0xa8, 0xb5, 0xfd, 0xaf, 0xde, 0xf8, 0x4d, 0xdf, 0xd6, 0xa1, 0xbd, 0xad, 0xc3, 0x4e, 0x04,
0x35, 0x99, 0x0d, 0x79, 0xe0, 0x8c, 0xce, 0xcf, 0x83, 0x7b, 0xa8, 0x0e, 0xf6, 0x68, 0x18, 0x58,
0xe8, 0x13, 0xf8, 0x68, 0x34, 0x9c, 0xfc, 0x3c, 0x78, 0xf9, 0x7c, 0x32, 0x18, 0x9e, 0xbe, 0xf8,
0x71, 0x3c, 0x18, 0x0d, 0x03, 0x7b, 0xd3, 0x1d, 0xfd, 0x62, 0xdc, 0xce, 0x83, 0x3e, 0xec, 0x6f,
0x35, 0x8c, 0x3e, 0x80, 0x46, 0x34, 0x3c, 0x1f, 0xe1, 0xd3, 0xe8, 0x2c, 0xb8, 0x87, 0xf6, 0x00,
0x2e, 0x23, 0x7c, 0x31, 0x18, 0x8f, 0x07, 0x3f, 0x45, 0x81, 0x75, 0xd2, 0xfd, 0xe7, 0xe6, 0xd0,
0xfa, 0xf7, 0xe6, 0xd0, 0x7a, 0x73, 0x73, 0x68, 0xfd, 0xda, 0xd2, 0x13, 0xa0, 0x5c, 0x3d, 0x75,
0xb7, 0x1e, 0xc9, 0x69, 0x5d, 0x3d, 0x75, 0xdf, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0x0a, 0xb5,
0x43, 0x55, 0x3c, 0x07, 0x00, 0x00,
}
func (m *ServiceRole) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ServiceRole) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ServiceRole) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Rules) > 0 {
for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintRbac(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *AccessRule) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AccessRule) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AccessRule) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.NotPorts) > 0 {
dAtA2 := make([]byte, len(m.NotPorts)*10)
var j1 int
for _, num1 := range m.NotPorts {
num := uint64(num1)
for num >= 1<<7 {
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j1++
}
dAtA2[j1] = uint8(num)
j1++
}
i -= j1
copy(dAtA[i:], dAtA2[:j1])
i = encodeVarintRbac(dAtA, i, uint64(j1))
i--
dAtA[i] = 0x52
}
if len(m.Ports) > 0 {
dAtA4 := make([]byte, len(m.Ports)*10)
var j3 int
for _, num1 := range m.Ports {
num := uint64(num1)
for num >= 1<<7 {
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j3++
}
dAtA4[j3] = uint8(num)
j3++
}
i -= j3
copy(dAtA[i:], dAtA4[:j3])
i = encodeVarintRbac(dAtA, i, uint64(j3))
i--
dAtA[i] = 0x4a
}
if len(m.NotMethods) > 0 {
for iNdEx := len(m.NotMethods) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.NotMethods[iNdEx])
copy(dAtA[i:], m.NotMethods[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.NotMethods[iNdEx])))
i--
dAtA[i] = 0x42
}
}
if len(m.NotPaths) > 0 {
for iNdEx := len(m.NotPaths) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.NotPaths[iNdEx])
copy(dAtA[i:], m.NotPaths[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.NotPaths[iNdEx])))
i--
dAtA[i] = 0x3a
}
}
if len(m.NotHosts) > 0 {
for iNdEx := len(m.NotHosts) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.NotHosts[iNdEx])
copy(dAtA[i:], m.NotHosts[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.NotHosts[iNdEx])))
i--
dAtA[i] = 0x32
}
}
if len(m.Hosts) > 0 {
for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Hosts[iNdEx])
copy(dAtA[i:], m.Hosts[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Hosts[iNdEx])))
i--
dAtA[i] = 0x2a
}
}
if len(m.Constraints) > 0 {
for iNdEx := len(m.Constraints) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Constraints[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintRbac(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
}
if len(m.Methods) > 0 {
for iNdEx := len(m.Methods) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Methods[iNdEx])
copy(dAtA[i:], m.Methods[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Methods[iNdEx])))
i--
dAtA[i] = 0x1a
}
}
if len(m.Paths) > 0 {
for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Paths[iNdEx])
copy(dAtA[i:], m.Paths[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Paths[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if len(m.Services) > 0 {
for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Services[iNdEx])
copy(dAtA[i:], m.Services[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Services[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *AccessRule_Constraint) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AccessRule_Constraint) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AccessRule_Constraint) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Values) > 0 {
for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Values[iNdEx])
copy(dAtA[i:], m.Values[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Values[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if len(m.Key) > 0 {
i -= len(m.Key)
copy(dAtA[i:], m.Key)
i = encodeVarintRbac(dAtA, i, uint64(len(m.Key)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *ServiceRoleBinding) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ServiceRoleBinding) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ServiceRoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Role) > 0 {
i -= len(m.Role)
copy(dAtA[i:], m.Role)
i = encodeVarintRbac(dAtA, i, uint64(len(m.Role)))
i--
dAtA[i] = 0x2a
}
if len(m.Actions) > 0 {
for iNdEx := len(m.Actions) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Actions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintRbac(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
}
if m.Mode != 0 {
i = encodeVarintRbac(dAtA, i, uint64(m.Mode))
i--
dAtA[i] = 0x18
}
if m.RoleRef != nil {
{
size, err := m.RoleRef.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintRbac(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.Subjects) > 0 {
for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintRbac(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *Subject) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Subject) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.NotIps) > 0 {
for iNdEx := len(m.NotIps) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.NotIps[iNdEx])
copy(dAtA[i:], m.NotIps[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.NotIps[iNdEx])))
i--
dAtA[i] = 0x5a
}
}
if len(m.Ips) > 0 {
for iNdEx := len(m.Ips) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Ips[iNdEx])
copy(dAtA[i:], m.Ips[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Ips[iNdEx])))
i--
dAtA[i] = 0x52
}
}
if len(m.NotNamespaces) > 0 {
for iNdEx := len(m.NotNamespaces) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.NotNamespaces[iNdEx])
copy(dAtA[i:], m.NotNamespaces[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.NotNamespaces[iNdEx])))
i--
dAtA[i] = 0x4a
}
}
if len(m.Namespaces) > 0 {
for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Namespaces[iNdEx])
copy(dAtA[i:], m.Namespaces[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Namespaces[iNdEx])))
i--
dAtA[i] = 0x42
}
}
if len(m.NotGroups) > 0 {
for iNdEx := len(m.NotGroups) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.NotGroups[iNdEx])
copy(dAtA[i:], m.NotGroups[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.NotGroups[iNdEx])))
i--
dAtA[i] = 0x3a
}
}
if len(m.Groups) > 0 {
for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Groups[iNdEx])
copy(dAtA[i:], m.Groups[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Groups[iNdEx])))
i--
dAtA[i] = 0x32
}
}
if len(m.NotNames) > 0 {
for iNdEx := len(m.NotNames) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.NotNames[iNdEx])
copy(dAtA[i:], m.NotNames[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.NotNames[iNdEx])))
i--
dAtA[i] = 0x2a
}
}
if len(m.Names) > 0 {
for iNdEx := len(m.Names) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Names[iNdEx])
copy(dAtA[i:], m.Names[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Names[iNdEx])))
i--
dAtA[i] = 0x22
}
}
if len(m.Properties) > 0 {
for k := range m.Properties {
v := m.Properties[k]
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = encodeVarintRbac(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = encodeVarintRbac(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = encodeVarintRbac(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x1a
}
}
if len(m.Group) > 0 {
i -= len(m.Group)
copy(dAtA[i:], m.Group)
i = encodeVarintRbac(dAtA, i, uint64(len(m.Group)))
i--
dAtA[i] = 0x12
}
if len(m.User) > 0 {
i -= len(m.User)
copy(dAtA[i:], m.User)
i = encodeVarintRbac(dAtA, i, uint64(len(m.User)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *RoleRef) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *RoleRef) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintRbac(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0x12
}
if len(m.Kind) > 0 {
i -= len(m.Kind)
copy(dAtA[i:], m.Kind)
i = encodeVarintRbac(dAtA, i, uint64(len(m.Kind)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *RbacConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RbacConfig) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *RbacConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.EnforcementMode != 0 {
i = encodeVarintRbac(dAtA, i, uint64(m.EnforcementMode))
i--
dAtA[i] = 0x20
}
if m.Exclusion != nil {
{
size, err := m.Exclusion.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintRbac(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if m.Inclusion != nil {
{
size, err := m.Inclusion.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintRbac(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.Mode != 0 {
i = encodeVarintRbac(dAtA, i, uint64(m.Mode))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *RbacConfig_Target) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RbacConfig_Target) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *RbacConfig_Target) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Namespaces) > 0 {
for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Namespaces[iNdEx])
copy(dAtA[i:], m.Namespaces[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Namespaces[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if len(m.Services) > 0 {
for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Services[iNdEx])
copy(dAtA[i:], m.Services[iNdEx])
i = encodeVarintRbac(dAtA, i, uint64(len(m.Services[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintRbac(dAtA []byte, offset int, v uint64) int {
offset -= sovRbac(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *ServiceRole) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Rules) > 0 {
for _, e := range m.Rules {
l = e.Size()
n += 1 + l + sovRbac(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *AccessRule) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Services) > 0 {
for _, s := range m.Services {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.Paths) > 0 {
for _, s := range m.Paths {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.Methods) > 0 {
for _, s := range m.Methods {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.Constraints) > 0 {
for _, e := range m.Constraints {
l = e.Size()
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.Hosts) > 0 {
for _, s := range m.Hosts {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.NotHosts) > 0 {
for _, s := range m.NotHosts {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.NotPaths) > 0 {
for _, s := range m.NotPaths {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.NotMethods) > 0 {
for _, s := range m.NotMethods {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.Ports) > 0 {
l = 0
for _, e := range m.Ports {
l += sovRbac(uint64(e))
}
n += 1 + sovRbac(uint64(l)) + l
}
if len(m.NotPorts) > 0 {
l = 0
for _, e := range m.NotPorts {
l += sovRbac(uint64(e))
}
n += 1 + sovRbac(uint64(l)) + l
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *AccessRule_Constraint) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovRbac(uint64(l))
}
if len(m.Values) > 0 {
for _, s := range m.Values {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ServiceRoleBinding) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Subjects) > 0 {
for _, e := range m.Subjects {
l = e.Size()
n += 1 + l + sovRbac(uint64(l))
}
}
if m.RoleRef != nil {
l = m.RoleRef.Size()
n += 1 + l + sovRbac(uint64(l))
}
if m.Mode != 0 {
n += 1 + sovRbac(uint64(m.Mode))
}
if len(m.Actions) > 0 {
for _, e := range m.Actions {
l = e.Size()
n += 1 + l + sovRbac(uint64(l))
}
}
l = len(m.Role)
if l > 0 {
n += 1 + l + sovRbac(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Subject) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.User)
if l > 0 {
n += 1 + l + sovRbac(uint64(l))
}
l = len(m.Group)
if l > 0 {
n += 1 + l + sovRbac(uint64(l))
}
if len(m.Properties) > 0 {
for k, v := range m.Properties {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovRbac(uint64(len(k))) + 1 + len(v) + sovRbac(uint64(len(v)))
n += mapEntrySize + 1 + sovRbac(uint64(mapEntrySize))
}
}
if len(m.Names) > 0 {
for _, s := range m.Names {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.NotNames) > 0 {
for _, s := range m.NotNames {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.Groups) > 0 {
for _, s := range m.Groups {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.NotGroups) > 0 {
for _, s := range m.NotGroups {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.Namespaces) > 0 {
for _, s := range m.Namespaces {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.NotNamespaces) > 0 {
for _, s := range m.NotNamespaces {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.Ips) > 0 {
for _, s := range m.Ips {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.NotIps) > 0 {
for _, s := range m.NotIps {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *RoleRef) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Kind)
if l > 0 {
n += 1 + l + sovRbac(uint64(l))
}
l = len(m.Name)
if l > 0 {
n += 1 + l + sovRbac(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *RbacConfig) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Mode != 0 {
n += 1 + sovRbac(uint64(m.Mode))
}
if m.Inclusion != nil {
l = m.Inclusion.Size()
n += 1 + l + sovRbac(uint64(l))
}
if m.Exclusion != nil {
l = m.Exclusion.Size()
n += 1 + l + sovRbac(uint64(l))
}
if m.EnforcementMode != 0 {
n += 1 + sovRbac(uint64(m.EnforcementMode))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *RbacConfig_Target) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Services) > 0 {
for _, s := range m.Services {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if len(m.Namespaces) > 0 {
for _, s := range m.Namespaces {
l = len(s)
n += 1 + l + sovRbac(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovRbac(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozRbac(x uint64) (n int) {
return sovRbac(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ServiceRole) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ServiceRole: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ServiceRole: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Rules = append(m.Rules, &AccessRule{})
if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *AccessRule) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: AccessRule: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AccessRule: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Services = append(m.Services, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Methods = append(m.Methods, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Constraints", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Constraints = append(m.Constraints, &AccessRule_Constraint{})
if err := m.Constraints[len(m.Constraints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NotHosts", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.NotHosts = append(m.NotHosts, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NotPaths", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.NotPaths = append(m.NotPaths, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NotMethods", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.NotMethods = append(m.NotMethods, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 9:
if wireType == 0 {
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Ports = append(m.Ports, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
var elementCount int
var count int
for _, integer := range dAtA[iNdEx:postIndex] {
if integer < 128 {
count++
}
}
elementCount = count
if elementCount != 0 && len(m.Ports) == 0 {
m.Ports = make([]int32, 0, elementCount)
}
for iNdEx < postIndex {
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Ports = append(m.Ports, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
}
case 10:
if wireType == 0 {
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.NotPorts = append(m.NotPorts, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
var elementCount int
var count int
for _, integer := range dAtA[iNdEx:postIndex] {
if integer < 128 {
count++
}
}
elementCount = count
if elementCount != 0 && len(m.NotPorts) == 0 {
m.NotPorts = make([]int32, 0, elementCount)
}
for iNdEx < postIndex {
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.NotPorts = append(m.NotPorts, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field NotPorts", wireType)
}
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *AccessRule_Constraint) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Constraint: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Constraint: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Values = append(m.Values, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ServiceRoleBinding) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ServiceRoleBinding: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ServiceRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subjects = append(m.Subjects, &Subject{})
if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.RoleRef == nil {
m.RoleRef = &RoleRef{}
}
if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
}
m.Mode = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Mode |= EnforcementMode(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Actions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Actions = append(m.Actions, &AccessRule{})
if err := m.Actions[len(m.Actions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Role = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Subject) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Subject: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.User = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Group = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Properties", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Properties == nil {
m.Properties = make(map[string]string)
}
var mapkey string
var mapvalue string
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthRbac
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthRbac
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthRbac
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 {
return ErrInvalidLengthRbac
}
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := skipRbac(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Properties[mapkey] = mapvalue
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Names = append(m.Names, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NotNames", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.NotNames = append(m.NotNames, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NotGroups", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.NotGroups = append(m.NotGroups, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NotNamespaces", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.NotNamespaces = append(m.NotNamespaces, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 10:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ips", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Ips = append(m.Ips, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 11:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NotIps", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.NotIps = append(m.NotIps, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RoleRef) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Kind = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RbacConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RbacConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RbacConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
}
m.Mode = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Mode |= RbacConfig_Mode(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Inclusion", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Inclusion == nil {
m.Inclusion = &RbacConfig_Target{}
}
if err := m.Inclusion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Exclusion", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Exclusion == nil {
m.Exclusion = &RbacConfig_Target{}
}
if err := m.Exclusion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EnforcementMode", wireType)
}
m.EnforcementMode = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.EnforcementMode |= EnforcementMode(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RbacConfig_Target) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Target: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Target: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Services = append(m.Services, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRbac
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRbac
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthRbac
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthRbac
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipRbac(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRbac
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRbac
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRbac
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthRbac
}
iNdEx += length
if iNdEx < 0 {
return 0, ErrInvalidLengthRbac
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRbac
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipRbac(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
if iNdEx < 0 {
return 0, ErrInvalidLengthRbac
}
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthRbac = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowRbac = fmt.Errorf("proto: integer overflow")
)