diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..1db2bfabfe --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.pb.go linguist-generated=true +*.pb.html linguist-generated=true diff --git a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html index 48999418da..bcee77a76a 100644 --- a/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html +++ b/mcp/v1alpha1/istio.mcp.v1alpha1.pb.html @@ -2,7 +2,7 @@ title: istio.mcp.v1alpha1 layout: protoc-gen-docs generator: protoc-gen-docs -number_of_entries: 9 +number_of_entries: 13 ---
This package defines the common, core types used by the Mesh Configuration Protocol.
@@ -27,76 +27,31 @@Identifies a specific MCP client instance. The client identifier is -presented to the management server, which may use this identifier -to distinguish per client configuration for serving. This -information is not authoriative. Authoritative identity should come -from the underlying transport layer (e.g. rpc credentials).
+Service where the source is the gRPC client. The source is responsible for +initiating connections and opening streams.
-| Field | -Type | -Description | -
|---|---|---|
id |
-string |
-
- An opaque identifier for the MCP client. - - |
-
metadata |
-google.protobuf.Struct |
-
- Opaque metadata extending the client identifier. +
+The source, acting as gRPC client, establishes a new resource stream +with the sink. The sink sends RequestResources message to and +receives Resources messages from the source. - |
-
Envelope for a configuration resource as transferred via the Mesh Configuration Protocol. -Each envelope is made up of common metadata, and a type-specific resource payload.
- -| Field | -Type | -Description | -
|---|---|---|
metadata |
-Metadata |
-
- Common metadata describing the resource. +Service where the sink is the gRPC client. The sink is responsible for +initiating connections and opening streams. - |
-
resource |
-google.protobuf.Any |
-
- The resource itself. +
+The sink, acting as gRPC client, establishes a new resource stream +with the source. The sink sends RequestResources message to +and receives Resources messages from the source. - |
-
IncrementalMeshConfigRequest are be sent in 2 situations:
@@ -118,11 +73,11 @@clientClientsinkNodeSinkNodeThe client making the request.
+The sink node making the request.
envelopesEnvelope[]resourcesResource[]The response resources wrapped in the common MCP Envelope +
The response resources wrapped in the common MCP Resource message. These are typed resources that match the type url in the IncrementalMeshConfigRequest.
@@ -265,11 +220,11 @@clientClientsinkNodeSinkNodeThe client making the request.
+The sink node making the request.
envelopesEnvelope[]resourcesResource[]The response resources wrapped in the common MCP Envelope +
The response resources wrapped in the common MCP Resource message.
typeUrlstringType URL for resources wrapped in the provided envelope(s). This +
Type URL for resources wrapped in the provided resources(s). This must be consistent with the type_url in the wrapper messages if -envelopes is non-empty.
+resources is non-empty.namestringThe name of the resource. It is unique within the context of a -resource type and the origin server of the resource. The resource -type is identified by the TypeUrl of the resource field of the -Envelope message.
+Fully qualified name of the resource. Unique in context of a collection.
+ +The fully qualified name consists of a directory and basename. The directory identifies +the resources location in a resource hierarchy. The basename identifies the specific +resource name within the context of that directory.
+ +The directory and basename are composed of one or more segments. Segments must be +valid DNS labels. “/” is the delimiter between +segments
+ +The rightmost segment is the basename. All segments to the +left of the basename form the directory. Segments moving towards the left +represent higher positions in the resource hierarchy, similar to reverse +DNS notation. e.g.
+ +/
An empty directory indicates a resource that is located at the root of the +hierarchy, e.g.
+ +/
On Kubernetes the resource hierarchy is two-levels: namespaces and +cluster-scoped (i.e. global).
+ +Namespace resources fully qualified name is of the form:
+ +”/
Cluster scoped resources are located at the root of the hierarchy and are of the form:
+ +”/
versionstringThe resource level version. It allows MCP to track the state of -individual resources.
+Resource version. This is used to determine when resources change across +resource updates. It should be treated as opaque by consumers/sinks.
+ +labelsmap<string, string>Map of string keys and values that can be used to organize and categorize +resources within a collection.
+ +annotationsmap<string, string>Map of string keys and values that can be used by source and sink to communicate +arbitrary metadata about this resource.
+ +A RequestResource can be sent in two situations:
+ +Initial message in an MCP bidirectional change stream +as an ACK or NACK response to a previous Resources. In +this case the responsenonce is set to the nonce value +in the Resources. ACK/NACK is determined by the presence +of errordetail.
+ +| Field | +Type | +Description | +
|---|---|---|
sinkNode |
+SinkNode |
+
+ The sink node making the request. + + |
+
collection |
+string |
+
+ Type of resource collection that is being requested, e.g. + +istio/networking/v1alpha3/VirtualService
+k8s/ |
+
initialResourceVersions |
+map<string, string> |
+
+ When the RequestResources is the first in a stream, the initialresourceversions must +be populated. Otherwise, initialresourceversions must be omitted. The keys are the +resources names of the MCP resources known to the MCP client. The values in the map +are the associated resource level version info. + + |
+
responseNonce |
+string |
+
+ When the RequestResources is an ACK or NACK message in response to a previous RequestResources, +the responsenonce must be the nonce in the RequestResources. Otherwise responsenonce must +be omitted. + + |
+
errorDetail |
+google.rpc.Status |
+
+ This is populated when the previously received resources could not be applied +The message field in error_details provides the source internal error +related to the failure. + + |
+
Resource as transferred via the Mesh Configuration Protocol. Each +resource is made up of common metadata, and a type-specific resource payload.
+ +| Field | +Type | +Description | +
|---|---|---|
metadata |
+Metadata |
+
+ Common metadata describing the resource. + + |
+
body |
+google.protobuf.Any |
+
+ The primary payload for the resource. + + |
+
Resources do not need to include a full snapshot of the tracked +resources. Instead they are a diff to the state of a MCP client. +Per resource versions allow sources and sinks to track state at +the resource granularity. An MCP incremental session is always +in the context of a gRPC bidirectional stream. This allows the +MCP source to keep track of the state of MCP sink connected to +it.
+ +In Incremental MCP the nonce field is required and used to pair +Resources to an RequestResources ACK or NACK.
+ +| Field | +Type | +Description | +
|---|---|---|
systemVersionInfo |
+string |
+
+ The version of the response data (used for debugging). + + |
+
collection |
+string |
+
+ Type of resource collection that is being requested, e.g. + +istio/networking/v1alpha3/VirtualService
+k8s/ |
+
resources |
+Resource[] |
+
+ The response resources wrapped in the common MCP Resource message. +These are typed resources that match the type url in the +RequestResources message. + + |
+
removedResources |
+string[] |
+
+ Names of resources that have been deleted and to be +removed from the MCP sink node. Removed resources for missing +resources can be ignored. + + |
+
nonce |
+string |
+
+ Required. The nonce provides a way for RequestChange to uniquely +reference a RequestResources. + + |
+
Identifies a specific MCP sink node instance. The node identifier is +presented to the resource source, which may use this identifier +to distinguish per sink configuration for serving. This +information is not authoritative. Authoritative identity should come +from the underlying transport layer (e.g. rpc credentials).
+ +| Field | +Type | +Description | +
|---|---|---|
id |
+string |
+
+ An opaque identifier for the MCP node. + + |
+
annotations |
+map<string, string> |
+
+ Opaque annotations extending the node identifier. |
|
Optional. A list of HTTP methods (e.g., “GET”, “POST”). It is ignored in gRPC case because the value is always “POST”. -If set to [“*”] or not specified, it applies to any method. +If not specified, it matches to any methods. |
@@ -128,8 +127,7 @@ constraints |
AccessRule.Constraint[] |
- Optional. Extra constraints in the ServiceRole specification. -The above ServiceRole example shows an example of constraint “version”. +Optional. Extra constraints in the ServiceRole specification. |
@@ -162,10 +160,9 @@ string[] |
List of valid values for the constraint. -Exact match, prefix match, and suffix match are supported for constraint values. -For example, the value “v1alpha2” matches -“v1alpha2” (exact match), or “v1” (prefix match), -or “alpha2” (suffix match). +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). |
@@ -335,8 +332,7 @@ string |
Required. The name of the ServiceRole object being referenced. -The ServiceRole object must be in the same namespace as the ServiceRoleBinding -object. +The ServiceRole object must be in the same namespace as the ServiceRoleBinding object. |
@@ -345,9 +341,7 @@
properties |
map<string, string> |
- Optional. The set of properties that identify the subject. -The above ServiceRoleBinding example shows an example of property “source.namespace”. +Optional. The set of properties that identify the subject. |
diff --git a/rbac/v1alpha1/rbac.pb.go b/rbac/v1alpha1/rbac.pb.go
index b4f490610b..b194986bed 100644
--- a/rbac/v1alpha1/rbac.pb.go
+++ b/rbac/v1alpha1/rbac.pb.go
@@ -71,6 +71,8 @@
rbac/v1alpha1/rbac.proto
It has these top-level messages:
+ WorkloadSelector
+ AuthorizationPolicy
ServiceRole
AccessRule
ServiceRoleBinding
@@ -159,11 +161,74 @@ var RbacConfig_Mode_value = map[string]int32{
func (x RbacConfig_Mode) String() string {
return proto.EnumName(RbacConfig_Mode_name, int32(x))
}
-func (RbacConfig_Mode) EnumDescriptor() ([]byte, []int) { return fileDescriptorRbac, []int{5, 0} }
+func (RbacConfig_Mode) EnumDescriptor() ([]byte, []int) { return fileDescriptorRbac, []int{7, 0} }
+
+// $hide_from_docs
+// This is forked from the networking/v1alpha3/sidecar.proto to avoid a direct
+// dependency from the rbac API on networking API.
+// TODO: Move the WorkloadSelector to a common place to be shared by other packages.
+// WorkloadSelector specifies the criteria used to determine if the Gateway
+// or Sidecar resource can be applied to a proxy. The matching criteria
+// includes the metadata associated with a proxy, workload info such as
+// labels attached to the pod/VM, or any other info that the proxy provides
+// to Istio during the initial handshake. If multiple conditions are
+// specified, all conditions need to match in order for the workload to be
+// selected. Currently, only label based selection mechanism is supported.
+type WorkloadSelector struct {
+ // One or more labels that indicate a specific set of pods/VMs on which
+ // this sidecar configuration should be applied. The scope of label
+ // search is restricted to the configuration namespace in which the the
+ // resource is present.
+ Labels map[string]string `protobuf:"bytes,1,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (m *WorkloadSelector) Reset() { *m = WorkloadSelector{} }
+func (m *WorkloadSelector) String() string { return proto.CompactTextString(m) }
+func (*WorkloadSelector) ProtoMessage() {}
+func (*WorkloadSelector) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{0} }
+
+func (m *WorkloadSelector) GetLabels() map[string]string {
+ if m != nil {
+ return m.Labels
+ }
+ return nil
+}
+
+// $hide_from_docs
+// AuthorizationPolicy to enforce access control on a selected workload.
+type AuthorizationPolicy struct {
+ // $hide_from_docs
+ // Optional. One or more labels that indicate a specific set of pods/VMs
+ // on which this authorization policy should be applied. Leave this empty to
+ // select all pods/VMs.
+ // The scope of label search is platform dependent. On Kubernetes, for example,
+ // the scope includes pods running in the same namespace as the authorization policy itself.
+ WorkloadSelector *WorkloadSelector `protobuf:"bytes,1,opt,name=workload_selector,json=workloadSelector" json:"workload_selector,omitempty"`
+ // $hide_from_docs
+ // A list of bindings that specify the subjects and permissions to the selected workload.
+ Allow []*ServiceRoleBinding `protobuf:"bytes,2,rep,name=allow" json:"allow,omitempty"`
+}
+
+func (m *AuthorizationPolicy) Reset() { *m = AuthorizationPolicy{} }
+func (m *AuthorizationPolicy) String() string { return proto.CompactTextString(m) }
+func (*AuthorizationPolicy) ProtoMessage() {}
+func (*AuthorizationPolicy) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{1} }
+
+func (m *AuthorizationPolicy) GetWorkloadSelector() *WorkloadSelector {
+ if m != nil {
+ return m.WorkloadSelector
+ }
+ return nil
+}
+
+func (m *AuthorizationPolicy) GetAllow() []*ServiceRoleBinding {
+ if m != nil {
+ return m.Allow
+ }
+ return nil
+}
// ServiceRole specification contains a list of access rules (permissions).
-// This represent the "Spec" part of the ServiceRole object. The name and namespace
-// of the ServiceRole is specified in "metadata" section of the ServiceRole object.
type ServiceRole struct {
// Required. The set of access rules (permissions) that the role has.
Rules []*AccessRule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"`
@@ -172,7 +237,7 @@ type ServiceRole struct {
func (m *ServiceRole) Reset() { *m = ServiceRole{} }
func (m *ServiceRole) String() string { return proto.CompactTextString(m) }
func (*ServiceRole) ProtoMessage() {}
-func (*ServiceRole) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{0} }
+func (*ServiceRole) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{2} }
func (m *ServiceRole) GetRules() []*AccessRule {
if m != nil {
@@ -190,28 +255,52 @@ type AccessRule struct {
// 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" 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.
+ Hosts []string `protobuf:"bytes,5,rep,name=hosts" 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" 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 paths.
- // For example, the path "/books/review" matches
- // "/books/review" (exact match), or "/books/*" (prefix match),
- // or "*/review" (suffix match).
- // If not specified, it applies to any path.
+ // 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.
Paths []string `protobuf:"bytes,2,rep,name=paths" 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" json:"not_paths,omitempty"`
// Optional. A list of HTTP methods (e.g., "GET", "POST").
// It is ignored in gRPC case because the value is always "POST".
- // If set to ["*"] or not specified, it applies to any method.
+ // If not specified, it matches to any methods.
Methods []string `protobuf:"bytes,3,rep,name=methods" 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" 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" 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" json:"not_ports,omitempty"`
// Optional. Extra constraints in the ServiceRole specification.
- // The above ServiceRole example shows an example of constraint "version".
Constraints []*AccessRule_Constraint `protobuf:"bytes,4,rep,name=constraints" json:"constraints,omitempty"`
}
func (m *AccessRule) Reset() { *m = AccessRule{} }
func (m *AccessRule) String() string { return proto.CompactTextString(m) }
func (*AccessRule) ProtoMessage() {}
-func (*AccessRule) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{1} }
+func (*AccessRule) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{3} }
func (m *AccessRule) GetServices() []string {
if m != nil {
@@ -220,6 +309,20 @@ func (m *AccessRule) GetServices() []string {
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
@@ -227,6 +330,13 @@ func (m *AccessRule) GetPaths() []string {
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
@@ -234,6 +344,27 @@ func (m *AccessRule) GetMethods() []string {
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
@@ -246,17 +377,16 @@ 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 constraint values.
- // For example, the value "v1alpha2" matches
- // "v1alpha2" (exact match), or "v1*" (prefix match),
- // or "*alpha2" (suffix match).
+ // 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" json:"values,omitempty"`
}
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 fileDescriptorRbac, []int{1, 0} }
+func (*AccessRule_Constraint) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{3, 0} }
func (m *AccessRule_Constraint) GetKey() string {
if m != nil {
@@ -273,9 +403,6 @@ func (m *AccessRule_Constraint) GetValues() []string {
}
// ServiceRoleBinding assigns a ServiceRole to a list of subjects.
-// This represents the "Spec" part of the ServiceRoleBinding object. The name and namespace
-// of the ServiceRoleBinding is specified in "metadata" section of the ServiceRoleBinding
-// object.
type ServiceRoleBinding struct {
// Required. List of subjects that are assigned the ServiceRole object.
Subjects []*Subject `protobuf:"bytes,1,rep,name=subjects" json:"subjects,omitempty"`
@@ -289,7 +416,7 @@ type ServiceRoleBinding struct {
func (m *ServiceRoleBinding) Reset() { *m = ServiceRoleBinding{} }
func (m *ServiceRoleBinding) String() string { return proto.CompactTextString(m) }
func (*ServiceRoleBinding) ProtoMessage() {}
-func (*ServiceRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{2} }
+func (*ServiceRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{4} }
func (m *ServiceRoleBinding) GetSubjects() []*Subject {
if m != nil {
@@ -318,17 +445,45 @@ 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 principals that the subject represents. This is matched to the
+ // `source.principal` attribute. If not specified, it applies to any principals.
+ Principals []string `protobuf:"bytes,4,rep,name=principals" json:"principals,omitempty"`
+ // $hide_from_docs
+ // Optional. A list of principals that must not be matched.
+ NotPrincipals []string `protobuf:"bytes,5,rep,name=not_principals,json=notPrincipals" json:"not_principals,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"`
+ // $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" 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" 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" 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" 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" 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" json:"not_ips,omitempty"`
// Optional. The set of properties that identify the subject.
- // The above ServiceRoleBinding example shows an example of property "source.namespace".
Properties map[string]string `protobuf:"bytes,3,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *Subject) Reset() { *m = Subject{} }
func (m *Subject) String() string { return proto.CompactTextString(m) }
func (*Subject) ProtoMessage() {}
-func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{3} }
+func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{5} }
func (m *Subject) GetUser() string {
if m != nil {
@@ -337,6 +492,20 @@ func (m *Subject) GetUser() string {
return ""
}
+func (m *Subject) GetPrincipals() []string {
+ if m != nil {
+ return m.Principals
+ }
+ return nil
+}
+
+func (m *Subject) GetNotPrincipals() []string {
+ if m != nil {
+ return m.NotPrincipals
+ }
+ return nil
+}
+
func (m *Subject) GetGroup() string {
if m != nil {
return m.Group
@@ -344,6 +513,48 @@ func (m *Subject) GetGroup() string {
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
@@ -357,15 +568,14 @@ type RoleRef struct {
// Currently, "ServiceRole" is the only supported value for "kind".
Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
// Required. The name of the ServiceRole object being referenced.
- // The ServiceRole object must be in the same namespace as the ServiceRoleBinding
- // object.
+ // 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"`
}
func (m *RoleRef) Reset() { *m = RoleRef{} }
func (m *RoleRef) String() string { return proto.CompactTextString(m) }
func (*RoleRef) ProtoMessage() {}
-func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{4} }
+func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{6} }
func (m *RoleRef) GetKind() string {
if m != nil {
@@ -422,7 +632,7 @@ type RbacConfig struct {
func (m *RbacConfig) Reset() { *m = RbacConfig{} }
func (m *RbacConfig) String() string { return proto.CompactTextString(m) }
func (*RbacConfig) ProtoMessage() {}
-func (*RbacConfig) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{5} }
+func (*RbacConfig) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{7} }
func (m *RbacConfig) GetMode() RbacConfig_Mode {
if m != nil {
@@ -456,6 +666,9 @@ func (m *RbacConfig) GetEnforcementMode() EnforcementMode {
type RbacConfig_Target struct {
// A list of services.
Services []string `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"`
+ // $hide_from_docs
+ // A list of workloads.
+ WorkloadSelectors []*WorkloadSelector `protobuf:"bytes,3,rep,name=workload_selectors,json=workloadSelectors" json:"workload_selectors,omitempty"`
// A list of namespaces.
Namespaces []string `protobuf:"bytes,2,rep,name=namespaces" json:"namespaces,omitempty"`
}
@@ -463,7 +676,7 @@ type RbacConfig_Target struct {
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 fileDescriptorRbac, []int{5, 0} }
+func (*RbacConfig_Target) Descriptor() ([]byte, []int) { return fileDescriptorRbac, []int{7, 0} }
func (m *RbacConfig_Target) GetServices() []string {
if m != nil {
@@ -472,6 +685,13 @@ func (m *RbacConfig_Target) GetServices() []string {
return nil
}
+func (m *RbacConfig_Target) GetWorkloadSelectors() []*WorkloadSelector {
+ if m != nil {
+ return m.WorkloadSelectors
+ }
+ return nil
+}
+
func (m *RbacConfig_Target) GetNamespaces() []string {
if m != nil {
return m.Namespaces
@@ -480,6 +700,8 @@ func (m *RbacConfig_Target) GetNamespaces() []string {
}
func init() {
+ proto.RegisterType((*WorkloadSelector)(nil), "istio.rbac.v1alpha1.WorkloadSelector")
+ proto.RegisterType((*AuthorizationPolicy)(nil), "istio.rbac.v1alpha1.AuthorizationPolicy")
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")
@@ -491,6 +713,81 @@ 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)
}
+func (m *WorkloadSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WorkloadSelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Labels) > 0 {
+ for k, _ := range m.Labels {
+ dAtA[i] = 0xa
+ i++
+ v := m.Labels[k]
+ mapSize := 1 + len(k) + sovRbac(uint64(len(k))) + 1 + len(v) + sovRbac(uint64(len(v)))
+ i = encodeVarintRbac(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintRbac(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintRbac(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *AuthorizationPolicy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AuthorizationPolicy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.WorkloadSelector != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintRbac(dAtA, i, uint64(m.WorkloadSelector.Size()))
+ n1, err := m.WorkloadSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ }
+ if len(m.Allow) > 0 {
+ for _, msg := range m.Allow {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintRbac(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
func (m *ServiceRole) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -593,6 +890,102 @@ func (m *AccessRule) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if len(m.Hosts) > 0 {
+ for _, s := range m.Hosts {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NotHosts) > 0 {
+ for _, s := range m.NotHosts {
+ dAtA[i] = 0x32
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NotPaths) > 0 {
+ for _, s := range m.NotPaths {
+ dAtA[i] = 0x3a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NotMethods) > 0 {
+ for _, s := range m.NotMethods {
+ dAtA[i] = 0x42
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Ports) > 0 {
+ dAtA3 := make([]byte, len(m.Ports)*10)
+ var j2 int
+ for _, num1 := range m.Ports {
+ num := uint64(num1)
+ for num >= 1<<7 {
+ dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80)
+ num >>= 7
+ j2++
+ }
+ dAtA3[j2] = uint8(num)
+ j2++
+ }
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintRbac(dAtA, i, uint64(j2))
+ i += copy(dAtA[i:], dAtA3[:j2])
+ }
+ if len(m.NotPorts) > 0 {
+ dAtA5 := make([]byte, len(m.NotPorts)*10)
+ var j4 int
+ for _, num1 := range m.NotPorts {
+ num := uint64(num1)
+ for num >= 1<<7 {
+ dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80)
+ num >>= 7
+ j4++
+ }
+ dAtA5[j4] = uint8(num)
+ j4++
+ }
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintRbac(dAtA, i, uint64(j4))
+ i += copy(dAtA[i:], dAtA5[:j4])
+ }
return i, nil
}
@@ -666,11 +1059,11 @@ func (m *ServiceRoleBinding) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x12
i++
i = encodeVarintRbac(dAtA, i, uint64(m.RoleRef.Size()))
- n1, err := m.RoleRef.MarshalTo(dAtA[i:])
+ n6, err := m.RoleRef.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n1
+ i += n6
}
if m.Mode != 0 {
dAtA[i] = 0x18
@@ -724,21 +1117,141 @@ func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
- return i, nil
-}
-
-func (m *RoleRef) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
+ if len(m.Principals) > 0 {
+ for _, s := range m.Principals {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
}
- return dAtA[:n], nil
-}
-
-func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
- var i int
+ if len(m.NotPrincipals) > 0 {
+ for _, s := range m.NotPrincipals {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x32
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NotGroups) > 0 {
+ for _, s := range m.NotGroups {
+ dAtA[i] = 0x3a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Namespaces) > 0 {
+ for _, s := range m.Namespaces {
+ dAtA[i] = 0x42
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NotNamespaces) > 0 {
+ for _, s := range m.NotNamespaces {
+ dAtA[i] = 0x4a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Ips) > 0 {
+ for _, s := range m.Ips {
+ dAtA[i] = 0x52
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NotIps) > 0 {
+ for _, s := range m.NotIps {
+ dAtA[i] = 0x5a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleRef) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
+ var i int
_ = i
var l int
_ = l
@@ -781,21 +1294,21 @@ func (m *RbacConfig) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x12
i++
i = encodeVarintRbac(dAtA, i, uint64(m.Inclusion.Size()))
- n2, err := m.Inclusion.MarshalTo(dAtA[i:])
+ n7, err := m.Inclusion.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n2
+ i += n7
}
if m.Exclusion != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintRbac(dAtA, i, uint64(m.Exclusion.Size()))
- n3, err := m.Exclusion.MarshalTo(dAtA[i:])
+ n8, err := m.Exclusion.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n3
+ i += n8
}
if m.EnforcementMode != 0 {
dAtA[i] = 0x20
@@ -850,6 +1363,18 @@ func (m *RbacConfig_Target) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if len(m.WorkloadSelectors) > 0 {
+ for _, msg := range m.WorkloadSelectors {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintRbac(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
return i, nil
}
@@ -862,6 +1387,36 @@ func encodeVarintRbac(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return offset + 1
}
+func (m *WorkloadSelector) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovRbac(uint64(len(k))) + 1 + len(v) + sovRbac(uint64(len(v)))
+ n += mapEntrySize + 1 + sovRbac(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *AuthorizationPolicy) Size() (n int) {
+ var l int
+ _ = l
+ if m.WorkloadSelector != nil {
+ l = m.WorkloadSelector.Size()
+ n += 1 + l + sovRbac(uint64(l))
+ }
+ if len(m.Allow) > 0 {
+ for _, e := range m.Allow {
+ l = e.Size()
+ n += 1 + l + sovRbac(uint64(l))
+ }
+ }
+ return n
+}
+
func (m *ServiceRole) Size() (n int) {
var l int
_ = l
@@ -901,6 +1456,44 @@ func (m *AccessRule) Size() (n int) {
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
+ }
return n
}
@@ -958,6 +1551,54 @@ func (m *Subject) Size() (n int) {
n += mapEntrySize + 1 + sovRbac(uint64(mapEntrySize))
}
}
+ if len(m.Principals) > 0 {
+ for _, s := range m.Principals {
+ l = len(s)
+ n += 1 + l + sovRbac(uint64(l))
+ }
+ }
+ if len(m.NotPrincipals) > 0 {
+ for _, s := range m.NotPrincipals {
+ 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))
+ }
+ }
return n
}
@@ -1010,6 +1651,12 @@ func (m *RbacConfig_Target) Size() (n int) {
n += 1 + l + sovRbac(uint64(l))
}
}
+ if len(m.WorkloadSelectors) > 0 {
+ for _, e := range m.WorkloadSelectors {
+ l = e.Size()
+ n += 1 + l + sovRbac(uint64(l))
+ }
+ }
return n
}
@@ -1026,7 +1673,7 @@ func sovRbac(x uint64) (n int) {
func sozRbac(x uint64) (n int) {
return sovRbac(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
-func (m *ServiceRole) Unmarshal(dAtA []byte) error {
+func (m *WorkloadSelector) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -1049,15 +1696,15 @@ func (m *ServiceRole) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: ServiceRole: wiretype end group for non-group")
+ return fmt.Errorf("proto: WorkloadSelector: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: ServiceRole: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: WorkloadSelector: 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)
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -1081,68 +1728,350 @@ func (m *ServiceRole) Unmarshal(dAtA []byte) error {
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) > l {
- return io.ErrUnexpectedEOF
- }
- 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)
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
}
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
+ 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 > 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 > 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.Labels[mapkey] = mapvalue
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipRbac(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthRbac
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AuthorizationPolicy) 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: AuthorizationPolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AuthorizationPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WorkloadSelector", 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 > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.WorkloadSelector == nil {
+ m.WorkloadSelector = &WorkloadSelector{}
+ }
+ if err := m.WorkloadSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Allow", 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 > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Allow = append(m.Allow, &ServiceRoleBinding{})
+ if err := m.Allow[len(m.Allow)-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) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+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 > 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) > l {
+ return io.ErrUnexpectedEOF
+ }
+ 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 {
@@ -1242,18 +2171,258 @@ func (m *AccessRule) Unmarshal(dAtA []byte) error {
break
}
}
- if msglen < 0 {
- return ErrInvalidLengthRbac
- }
- postIndex := iNdEx + msglen
- 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
+ if msglen < 0 {
+ return ErrInvalidLengthRbac
+ }
+ postIndex := iNdEx + msglen
+ 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 > 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 > 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 > 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 > 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 > l {
+ return io.ErrUnexpectedEOF
+ }
+ 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 > l {
+ return io.ErrUnexpectedEOF
+ }
+ 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:])
@@ -1721,6 +2890,238 @@ func (m *Subject) Unmarshal(dAtA []byte) error {
}
m.Properties[mapkey] = mapvalue
iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Principals", 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 > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Principals = append(m.Principals, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NotPrincipals", 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 > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NotPrincipals = append(m.NotPrincipals, 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 > 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 > 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 > 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 > 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 > 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 > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NotIps = append(m.NotIps, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
@@ -2091,6 +3492,37 @@ func (m *RbacConfig_Target) Unmarshal(dAtA []byte) error {
}
m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WorkloadSelectors", 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 > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.WorkloadSelectors = append(m.WorkloadSelectors, &WorkloadSelector{})
+ if err := m.WorkloadSelectors[len(m.WorkloadSelectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRbac(dAtA[iNdEx:])
@@ -2220,44 +3652,62 @@ var (
func init() { proto.RegisterFile("rbac/v1alpha1/rbac.proto", fileDescriptorRbac) }
var fileDescriptorRbac = []byte{
- // 615 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 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0x3f, 0x58, 0x73, 0x86, 0x07, 0x2e, 0xe9, 0x39, 0x7d, 0x73, 0x05, 0xaf,
- 0x03, 0x1c, 0x3b, 0xe4, 0x68, 0x30, 0x1a, 0x0d, 0x3e, 0x3a, 0x26, 0xda, 0xef, 0xfc, 0xbc, 0x6e,
- 0xa2, 0x5f, 0xd7, 0x4d, 0xf4, 0xe7, 0xba, 0x89, 0xbe, 0x34, 0x52, 0x07, 0x98, 0xe8, 0x7a, 0x21,
- 0xeb, 0xde, 0x78, 0x0d, 0xc7, 0x15, 0xfd, 0x12, 0xbe, 0xfa, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x00,
- 0xdb, 0x22, 0xbc, 0x25, 0x05, 0x00, 0x00,
+ // 909 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xdd, 0x6e, 0x23, 0x35,
+ 0x14, 0xde, 0xc9, 0xe4, 0xa7, 0x39, 0x81, 0x76, 0xea, 0x85, 0x65, 0x14, 0x20, 0x5b, 0x45, 0x2c,
+ 0x44, 0x2b, 0x94, 0xa8, 0x45, 0xac, 0x0a, 0xd2, 0x5e, 0x6c, 0xdb, 0x94, 0x8d, 0xd4, 0x26, 0x95,
+ 0x53, 0x58, 0xc4, 0x4d, 0x34, 0x99, 0xb8, 0x8d, 0xe9, 0xd4, 0x1e, 0xd9, 0x4e, 0x4b, 0xb9, 0xe4,
+ 0x86, 0x57, 0x40, 0x3c, 0x01, 0x0f, 0xc0, 0x03, 0x70, 0xc9, 0x25, 0x8f, 0x80, 0xfa, 0x24, 0xc8,
+ 0xf6, 0xfc, 0xa4, 0x69, 0xe8, 0xb6, 0x77, 0x3e, 0xdf, 0x39, 0xdf, 0x39, 0x9f, 0xed, 0xcf, 0x99,
+ 0x80, 0x2f, 0xc6, 0x41, 0xd8, 0xb9, 0xd8, 0x0c, 0xa2, 0x78, 0x1a, 0x6c, 0x76, 0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db, 0x61, 0x6f, 0xd0, 0xf7, 0x0a, 0xf3, 0x70, 0xf7, 0xfb, 0x14, 0x76,
+ 0x9f, 0x77, 0x60, 0x6d, 0xe1, 0x1c, 0xd0, 0x3b, 0xb0, 0xd2, 0xed, 0xef, 0x0f, 0xf0, 0x6e, 0x77,
+ 0xcf, 0x7b, 0x84, 0x56, 0x01, 0x8e, 0xba, 0xf8, 0xb0, 0x37, 0x1c, 0xf6, 0xbe, 0xeb, 0x7a, 0xce,
+ 0x4e, 0xeb, 0xef, 0xeb, 0x86, 0xf3, 0xcf, 0x75, 0xc3, 0xf9, 0xf7, 0xba, 0xe1, 0xfc, 0x50, 0xb7,
+ 0xf2, 0x29, 0xef, 0x04, 0x31, 0xed, 0xdc, 0xf8, 0x0b, 0x31, 0x2e, 0x9b, 0xbf, 0x0f, 0x5f, 0xfc,
+ 0x17, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x5d, 0x8c, 0xf1, 0x5a, 0x08, 0x00, 0x00,
}
diff --git a/rbac/v1alpha1/rbac.proto b/rbac/v1alpha1/rbac.proto
index 1b138bda48..69c080cd5d 100644
--- a/rbac/v1alpha1/rbac.proto
+++ b/rbac/v1alpha1/rbac.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Istio Authors
+// Copyright 2019 Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -84,9 +84,42 @@ package istio.rbac.v1alpha1;
option go_package="istio.io/api/rbac/v1alpha1";
+// $hide_from_docs
+// This is forked from the networking/v1alpha3/sidecar.proto to avoid a direct
+// dependency from the rbac API on networking API.
+// TODO: Move the WorkloadSelector to a common place to be shared by other packages.
+// WorkloadSelector specifies the criteria used to determine if the Gateway
+// or Sidecar resource can be applied to a proxy. The matching criteria
+// includes the metadata associated with a proxy, workload info such as
+// labels attached to the pod/VM, or any other info that the proxy provides
+// to Istio during the initial handshake. If multiple conditions are
+// specified, all conditions need to match in order for the workload to be
+// selected. Currently, only label based selection mechanism is supported.
+message WorkloadSelector {
+ // One or more labels that indicate a specific set of pods/VMs on which
+ // this sidecar configuration should be applied. The scope of label
+ // search is restricted to the configuration namespace in which the the
+ // resource is present.
+ map