From 890f95fd18d0b24d899d15f7294c3bff7b83a9d8 Mon Sep 17 00:00:00 2001 From: Kuat Date: Wed, 17 Oct 2018 15:02:45 -0700 Subject: [PATCH] policy: add missing APA attribute bindings (#655) * add missing APA attribute bindings Signed-off-by: Kuat Yessenov * review Signed-off-by: Kuat Yessenov * rename to output Signed-off-by: Kuat Yessenov --- policy/v1beta1/cfg.pb.go | 335 ++++++++++++++++---- policy/v1beta1/cfg.proto | 14 + policy/v1beta1/istio.policy.v1beta1.pb.html | 19 ++ python/istio_api/policy/v1beta1/cfg_pb2.py | 92 ++++-- 4 files changed, 373 insertions(+), 87 deletions(-) diff --git a/policy/v1beta1/cfg.pb.go b/policy/v1beta1/cfg.pb.go index 3aff72a7661d..08827d7a5942 100644 --- a/policy/v1beta1/cfg.pb.go +++ b/policy/v1beta1/cfg.pb.go @@ -436,6 +436,19 @@ type Instance struct { // Required. Depends on referenced template. Struct representation of a // proto defined by the template; this varies depending on the value of field `template`. Params *google_protobuf1.Struct `protobuf:"bytes,3,opt,name=params" json:"params,omitempty"` + // Optional. Defines attribute bindings to map the output of attribute-producing adapters back into + // the attribute space. The variable `output` refers to the output template instance produced + // by the adapter. + // The following example derives `source.namespace` from `source.uid` in the context of Kubernetes: + // ```yaml + // params: + // # Pass the required attribute data to the adapter + // source_uid: source.uid | "" + // attribute_bindings: + // # Fill the new attributes from the adapter produced output + // source.namespace: output.source_namespace + // ``` + AttributeBindings map[string]string `protobuf:"bytes,4,rep,name=attribute_bindings,json=attributeBindings" json:"attribute_bindings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Instance) Reset() { *m = Instance{} } @@ -470,6 +483,13 @@ func (m *Instance) GetParams() *google_protobuf1.Struct { return nil } +func (m *Instance) GetAttributeBindings() map[string]string { + if m != nil { + return m.AttributeBindings + } + return nil +} + // Handler allows the operator to configure a specific adapter implementation. // Each adapter implementation defines its own `params` proto. // @@ -998,6 +1018,14 @@ func (this *Instance) Equal(that interface{}) bool { if !this.Params.Equal(that1.Params) { return false } + if len(this.AttributeBindings) != len(that1.AttributeBindings) { + return false + } + for i := range this.AttributeBindings { + if this.AttributeBindings[i] != that1.AttributeBindings[i] { + return false + } + } return true } func (this *Handler) Equal(that interface{}) bool { @@ -1259,7 +1287,7 @@ func (this *Instance) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 9) s = append(s, "&v1beta1.Instance{") s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") s = append(s, "CompiledTemplate: "+fmt.Sprintf("%#v", this.CompiledTemplate)+",\n") @@ -1267,6 +1295,19 @@ func (this *Instance) GoString() string { if this.Params != nil { s = append(s, "Params: "+fmt.Sprintf("%#v", this.Params)+",\n") } + keysForAttributeBindings := make([]string, 0, len(this.AttributeBindings)) + for k, _ := range this.AttributeBindings { + keysForAttributeBindings = append(keysForAttributeBindings, k) + } + sortkeys.Strings(keysForAttributeBindings) + mapStringForAttributeBindings := "map[string]string{" + for _, k := range keysForAttributeBindings { + mapStringForAttributeBindings += fmt.Sprintf("%#v: %#v,", k, this.AttributeBindings[k]) + } + mapStringForAttributeBindings += "}" + if this.AttributeBindings != nil { + s = append(s, "AttributeBindings: "+mapStringForAttributeBindings+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -1641,6 +1682,23 @@ func (m *Instance) MarshalTo(dAtA []byte) (int, error) { } i += n3 } + if len(m.AttributeBindings) > 0 { + for k, _ := range m.AttributeBindings { + dAtA[i] = 0x22 + i++ + v := m.AttributeBindings[k] + mapSize := 1 + len(k) + sovCfg(uint64(len(k))) + 1 + len(v) + sovCfg(uint64(len(v))) + i = encodeVarintCfg(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintCfg(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintCfg(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } if len(m.CompiledTemplate) > 0 { dAtA[i] = 0xa2 i++ @@ -2027,6 +2085,14 @@ func (m *Instance) Size() (n int) { l = m.Params.Size() n += 1 + l + sovCfg(uint64(l)) } + if len(m.AttributeBindings) > 0 { + for k, v := range m.AttributeBindings { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCfg(uint64(len(k))) + 1 + len(v) + sovCfg(uint64(len(v))) + n += mapEntrySize + 1 + sovCfg(uint64(mapEntrySize)) + } + } l = len(m.CompiledTemplate) if l > 0 { n += 5 + l + sovCfg(uint64(l)) @@ -2215,10 +2281,21 @@ func (this *Instance) String() string { if this == nil { return "nil" } + keysForAttributeBindings := make([]string, 0, len(this.AttributeBindings)) + for k, _ := range this.AttributeBindings { + keysForAttributeBindings = append(keysForAttributeBindings, k) + } + sortkeys.Strings(keysForAttributeBindings) + mapStringForAttributeBindings := "map[string]string{" + for _, k := range keysForAttributeBindings { + mapStringForAttributeBindings += fmt.Sprintf("%v: %v,", k, this.AttributeBindings[k]) + } + mapStringForAttributeBindings += "}" s := strings.Join([]string{`&Instance{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Template:` + fmt.Sprintf("%v", this.Template) + `,`, `Params:` + strings.Replace(fmt.Sprintf("%v", this.Params), "Struct", "google_protobuf1.Struct", 1) + `,`, + `AttributeBindings:` + mapStringForAttributeBindings + `,`, `CompiledTemplate:` + fmt.Sprintf("%v", this.CompiledTemplate) + `,`, `}`, }, "") @@ -3220,6 +3297,124 @@ func (m *Instance) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeBindings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCfg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCfg + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AttributeBindings == nil { + m.AttributeBindings = 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 ErrIntOverflowCfg + } + 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 ErrIntOverflowCfg + } + 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 ErrInvalidLengthCfg + } + 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 ErrIntOverflowCfg + } + 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 ErrInvalidLengthCfg + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipCfg(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCfg + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.AttributeBindings[mapkey] = mapvalue + iNdEx = postIndex case 67794676: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CompiledTemplate", wireType) @@ -4114,72 +4309,74 @@ var ( func init() { proto.RegisterFile("policy/v1beta1/cfg.proto", fileDescriptorCfg) } var fileDescriptorCfg = []byte{ - // 1058 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xc6, 0xa9, 0x63, 0x3f, 0x37, 0x89, 0x33, 0x0d, 0x64, 0x6b, 0xa2, 0x4d, 0xb4, 0x20, - 0xe8, 0x01, 0xad, 0x1b, 0x23, 0x28, 0xaa, 0x22, 0x44, 0x5a, 0xbb, 0x4a, 0x44, 0x9b, 0x58, 0x93, - 0xa4, 0x88, 0x5e, 0x56, 0x13, 0xef, 0xc4, 0x59, 0xe1, 0x9d, 0xdd, 0xee, 0xce, 0x46, 0xc9, 0x8d, - 0x0b, 0xf7, 0x1e, 0x91, 0xf8, 0x02, 0xf0, 0x25, 0x38, 0xe7, 0x58, 0xa9, 0x97, 0x9e, 0x80, 0x98, - 0x0b, 0x17, 0xa4, 0x1e, 0xf8, 0x00, 0x68, 0x67, 0x67, 0x66, 0xd3, 0xd8, 0x41, 0x84, 0xdb, 0xcc, - 0xfb, 0xbd, 0x7f, 0xbf, 0xf7, 0xde, 0xbe, 0x59, 0x30, 0xa3, 0x70, 0xe8, 0xf7, 0x4f, 0x5b, 0xc7, - 0x6b, 0x07, 0x94, 0x93, 0xb5, 0x56, 0xff, 0x70, 0xe0, 0x44, 0x71, 0xc8, 0x43, 0xb4, 0xe8, 0x27, - 0xdc, 0x0f, 0x9d, 0x1c, 0x77, 0x24, 0xde, 0x5c, 0x1c, 0x84, 0x83, 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xff, 0xff, 0x78, 0x30, 0xb2, 0xf0, 0xad, 0x09, - 0x00, 0x00, + // 1104 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x4f, 0x1b, 0xc7, + 0x17, 0xf7, 0x62, 0x30, 0xf6, 0x73, 0x00, 0x33, 0xe1, 0x1b, 0x36, 0xfe, 0xa2, 0x05, 0xb9, 0x55, + 0x9b, 0x43, 0xb5, 0x0e, 0xae, 0xda, 0x54, 0x11, 0xaa, 0x0a, 0xb1, 0x23, 0x50, 0x13, 0xb0, 0x06, + 0x48, 0xd5, 0x5c, 0x56, 0x83, 0x77, 0x30, 0xa3, 0x7a, 0x67, 0x37, 0xbb, 0xb3, 0x08, 0x6e, 0xbd, + 0xf4, 0x9e, 0x63, 0xff, 0x84, 0xf6, 0x9f, 0xe8, 0xb5, 0x1c, 0x23, 0xe5, 0x92, 0x53, 0x5b, 0xdc, + 0x4b, 0x2f, 0x95, 0x72, 0xe8, 0x1f, 0x50, 0xed, 0xec, 0xcc, 0xae, 0x63, 0x4c, 0x55, 0x7a, 0xdb, + 0x79, 0x9f, 0xf7, 0xeb, 0xf3, 0xde, 0x9b, 0xb7, 0x03, 0x66, 0xe0, 0x0f, 0x58, 0xef, 0xbc, 0x79, + 0xba, 0x7e, 0x44, 0x05, 0x59, 0x6f, 0xf6, 0x8e, 0xfb, 0x76, 0x10, 0xfa, 0xc2, 0x47, 0x4b, 0x2c, + 0x12, 0xcc, 0xb7, 0x53, 0xdc, 0x56, 0x78, 0x7d, 0xa9, 0xef, 0xf7, 0x7d, 0xa9, 0xd0, 0x4c, 0xbe, + 0x52, 0xdd, 0xfa, 0x4a, 0xdf, 0xf7, 0xfb, 0x03, 0xda, 0x94, 0xa7, 0xa3, 0xf8, 0xb8, 0x19, 0x89, + 0x30, 0xee, 0x09, 0x85, 0x5a, 0xe3, 0xa8, 0x1b, 0x87, 0x44, 0x30, 0x9f, 0x2b, 0x7c, 0x75, 0x2c, + 0x87, 0x53, 0x32, 0x88, 0xa9, 0x23, 0xce, 0x03, 0x9a, 0x2a, 0x34, 0xbe, 0x2b, 0xc2, 0xe2, 0xa6, + 0x10, 0x21, 0x3b, 0x8a, 0x05, 0x7d, 0x4a, 0x38, 0x3b, 0xa6, 0x91, 0x40, 0x75, 0x28, 0x87, 0xf4, + 0x94, 0x45, 0xcc, 0xe7, 0xa6, 0xb1, 0x66, 0xdc, 0xab, 0xe0, 0xec, 0x8c, 0x10, 0x4c, 0x73, 0xe2, + 0x51, 0x73, 0x4a, 0xca, 0xe5, 0x37, 0xfa, 0x0a, 0x80, 0x68, 0x27, 0x91, 0x59, 0x5c, 0x2b, 0xde, + 0xab, 0xb6, 0x1e, 0xd8, 0x93, 0x58, 0xda, 0x57, 0x82, 0xe5, 0x92, 0xa8, 0xc3, 0x45, 0x78, 0x8e, + 0x47, 0x5c, 0xd5, 0x5f, 0xc0, 0x5c, 0x06, 0xef, 0xf0, 0x63, 0x1f, 0xad, 0x41, 0xd5, 0xa5, 0x51, + 0x2f, 0x64, 0x81, 0xc8, 0x93, 0x1b, 0x15, 0xa1, 0xcf, 0x01, 0x72, 0x96, 0x32, 0xcb, 0xf9, 0xd6, + 0xea, 0xe4, 0x5c, 0x9e, 0x25, 0x7a, 0x07, 0xe7, 0x01, 0xc5, 0x95, 0x53, 0xfd, 0x59, 0x17, 0xb0, + 0x30, 0x96, 0x11, 0xaa, 0x41, 0xf1, 0x1b, 0x7a, 0xae, 0x82, 0x25, 0x9f, 0xe8, 0x4b, 0x98, 0x91, + 0x16, 0xd2, 0x7f, 0xb5, 0xf5, 0xc9, 0x8d, 0xb9, 0x26, 0x64, 0x70, 0xea, 0xe3, 0xe1, 0xd4, 0x67, + 0x46, 0xe3, 0x62, 0x1a, 0xa6, 0x71, 0x3c, 0xa0, 0x68, 0x09, 0x66, 0x3c, 0x22, 0x7a, 0x27, 0x2a, + 0x5a, 0x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xcd, 0x77, 0x1f, 0x6f, 0x47, 0x25, 0xd9, + 0x93, 0x8f, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xd7, 0xd6, 0x0f, 0x59, 0x0a, 0x00, 0x00, } diff --git a/policy/v1beta1/cfg.proto b/policy/v1beta1/cfg.proto index 76d74133fb1c..530b07c72518 100644 --- a/policy/v1beta1/cfg.proto +++ b/policy/v1beta1/cfg.proto @@ -231,6 +231,20 @@ message Instance { // Required. Depends on referenced template. Struct representation of a // proto defined by the template; this varies depending on the value of field `template`. google.protobuf.Struct params = 3; + + // Optional. Defines attribute bindings to map the output of attribute-producing adapters back into + // the attribute space. The variable `output` refers to the output template instance produced + // by the adapter. + // The following example derives `source.namespace` from `source.uid` in the context of Kubernetes: + // ```yaml + // params: + // # Pass the required attribute data to the adapter + // source_uid: source.uid | "" + // attribute_bindings: + // # Fill the new attributes from the adapter produced output + // source.namespace: output.source_namespace + // ``` + map attribute_bindings = 4; } // Handler allows the operator to configure a specific adapter implementation. diff --git a/policy/v1beta1/istio.policy.v1beta1.pb.html b/policy/v1beta1/istio.policy.v1beta1.pb.html index ff9adf23c642..8407ccd47264 100644 --- a/policy/v1beta1/istio.policy.v1beta1.pb.html +++ b/policy/v1beta1/istio.policy.v1beta1.pb.html @@ -545,6 +545,25 @@

Instance

Required. Depends on referenced template. Struct representation of a proto defined by the template; this varies depending on the value of field template.

+ + + +attributeBindings +map<string, string> + +

Optional. Defines attribute bindings to map the output of attribute-producing adapters back into +the attribute space. The variable output refers to the output template instance produced +by the adapter. +The following example derives source.namespace from source.uid in the context of Kubernetes:

+ +
params:
+  # Pass the required attribute data to the adapter
+  source_uid: source.uid | ""
+attribute_bindings:
+  # Fill the new attributes from the adapter produced output
+  source.namespace: output.source_namespace
+
+ diff --git a/python/istio_api/policy/v1beta1/cfg_pb2.py b/python/istio_api/policy/v1beta1/cfg_pb2.py index 1cd03cb70919..754f7898ecb8 100644 --- a/python/istio_api/policy/v1beta1/cfg_pb2.py +++ b/python/istio_api/policy/v1beta1/cfg_pb2.py @@ -23,7 +23,7 @@ name='policy/v1beta1/cfg.proto', package='istio.policy.v1beta1', syntax='proto3', - serialized_pb=_b('\n\x18policy/v1beta1/cfg.proto\x12\x14istio.policy.v1beta1\x1a\x14gogoproto/gogo.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fpolicy/v1beta1/value_type.proto\"\xc5\x02\n\x11\x41ttributeManifest\x12\x10\n\x08revision\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12K\n\nattributes\x18\x03 \x03(\x0b\x32\x37.istio.policy.v1beta1.AttributeManifest.AttributesEntry\x1aY\n\rAttributeInfo\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x33\n\nvalue_type\x18\x02 \x01(\x0e\x32\x1f.istio.policy.v1beta1.ValueType\x1ah\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32\x35.istio.policy.v1beta1.AttributeManifest.AttributeInfo:\x02\x38\x01\"\xe2\x03\n\x04Rule\x12\r\n\x05match\x18\x01 \x01(\t\x12-\n\x07\x61\x63tions\x18\x02 \x03(\x0b\x32\x1c.istio.policy.v1beta1.Action\x12U\n\x19request_header_operations\x18\x03 \x03(\x0b\x32\x32.istio.policy.v1beta1.Rule.HeaderOperationTemplate\x12V\n\x1aresponse_header_operations\x18\x04 \x03(\x0b\x32\x32.istio.policy.v1beta1.Rule.HeaderOperationTemplate\x12\x30\n\x08sampling\x18\x05 \x01(\x0b\x32\x1e.istio.policy.v1beta1.Sampling\x1a\xba\x01\n\x17HeaderOperationTemplate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06values\x18\x02 \x03(\t\x12O\n\toperation\x18\x03 \x01(\x0e\x32<.istio.policy.v1beta1.Rule.HeaderOperationTemplate.Operation\"0\n\tOperation\x12\x0b\n\x07REPLACE\x10\x00\x12\n\n\x06REMOVE\x10\x01\x12\n\n\x06\x41PPEND\x10\x02\":\n\x06\x41\x63tion\x12\x0f\n\x07handler\x18\x02 \x01(\t\x12\x11\n\tinstances\x18\x03 \x03(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\"q\n\x08Instance\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x11\x63ompiled_template\x18\xf4\xed\xa9 \x01(\t\x12\x10\n\x08template\x18\x02 \x01(\t\x12\'\n\x06params\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa4\x01\n\x07Handler\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x10\x63ompiled_adapter\x18\xf4\xed\xa9 \x01(\t\x12\x0f\n\x07\x61\x64\x61pter\x18\x02 \x01(\t\x12\'\n\x06params\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x34\n\nconnection\x18\x04 \x01(\x0b\x32 .istio.policy.v1beta1.Connection\"\x1d\n\nConnection\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\"}\n\x08Sampling\x12\x34\n\x06random\x18\x01 \x01(\x0b\x32$.istio.policy.v1beta1.RandomSampling\x12;\n\nrate_limit\x18\x02 \x01(\x0b\x32\'.istio.policy.v1beta1.RateLimitSampling\"\x94\x01\n\x0eRandomSampling\x12\x1c\n\x14\x61ttribute_expression\x18\x01 \x01(\t\x12@\n\x0fpercent_sampled\x18\x02 \x01(\x0b\x32\'.istio.policy.v1beta1.FractionalPercent\x12\"\n\x1ause_independent_randomness\x18\x03 \x01(\x08\"\x89\x01\n\x11RateLimitSampling\x12>\n\x11sampling_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xc8\xde\x1f\x00\x98\xdf\x1f\x01\x12\x1d\n\x15max_unsampled_entries\x18\x02 \x01(\x03\x12\x15\n\rsampling_rate\x18\x03 \x01(\x03\"\xa6\x01\n\x11\x46ractionalPercent\x12\x11\n\tnumerator\x18\x01 \x01(\r\x12L\n\x0b\x64\x65nominator\x18\x02 \x01(\x0e\x32\x37.istio.policy.v1beta1.FractionalPercent.DenominatorType\"0\n\x0f\x44\x65nominatorType\x12\x0b\n\x07HUNDRED\x10\x00\x12\x10\n\x0cTEN_THOUSAND\x10\x01\x42\x1dZ\x1bistio.io/api/policy/v1beta1b\x06proto3') + serialized_pb=_b('\n\x18policy/v1beta1/cfg.proto\x12\x14istio.policy.v1beta1\x1a\x14gogoproto/gogo.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fpolicy/v1beta1/value_type.proto\"\xc5\x02\n\x11\x41ttributeManifest\x12\x10\n\x08revision\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12K\n\nattributes\x18\x03 \x03(\x0b\x32\x37.istio.policy.v1beta1.AttributeManifest.AttributesEntry\x1aY\n\rAttributeInfo\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x33\n\nvalue_type\x18\x02 \x01(\x0e\x32\x1f.istio.policy.v1beta1.ValueType\x1ah\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32\x35.istio.policy.v1beta1.AttributeManifest.AttributeInfo:\x02\x38\x01\"\xe2\x03\n\x04Rule\x12\r\n\x05match\x18\x01 \x01(\t\x12-\n\x07\x61\x63tions\x18\x02 \x03(\x0b\x32\x1c.istio.policy.v1beta1.Action\x12U\n\x19request_header_operations\x18\x03 \x03(\x0b\x32\x32.istio.policy.v1beta1.Rule.HeaderOperationTemplate\x12V\n\x1aresponse_header_operations\x18\x04 \x03(\x0b\x32\x32.istio.policy.v1beta1.Rule.HeaderOperationTemplate\x12\x30\n\x08sampling\x18\x05 \x01(\x0b\x32\x1e.istio.policy.v1beta1.Sampling\x1a\xba\x01\n\x17HeaderOperationTemplate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06values\x18\x02 \x03(\t\x12O\n\toperation\x18\x03 \x01(\x0e\x32<.istio.policy.v1beta1.Rule.HeaderOperationTemplate.Operation\"0\n\tOperation\x12\x0b\n\x07REPLACE\x10\x00\x12\n\n\x06REMOVE\x10\x01\x12\n\n\x06\x41PPEND\x10\x02\":\n\x06\x41\x63tion\x12\x0f\n\x07handler\x18\x02 \x01(\t\x12\x11\n\tinstances\x18\x03 \x03(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\"\xfe\x01\n\x08Instance\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x11\x63ompiled_template\x18\xf4\xed\xa9 \x01(\t\x12\x10\n\x08template\x18\x02 \x01(\t\x12\'\n\x06params\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12Q\n\x12\x61ttribute_bindings\x18\x04 \x03(\x0b\x32\x35.istio.policy.v1beta1.Instance.AttributeBindingsEntry\x1a\x38\n\x16\x41ttributeBindingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa4\x01\n\x07Handler\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x10\x63ompiled_adapter\x18\xf4\xed\xa9 \x01(\t\x12\x0f\n\x07\x61\x64\x61pter\x18\x02 \x01(\t\x12\'\n\x06params\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x34\n\nconnection\x18\x04 \x01(\x0b\x32 .istio.policy.v1beta1.Connection\"\x1d\n\nConnection\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\"}\n\x08Sampling\x12\x34\n\x06random\x18\x01 \x01(\x0b\x32$.istio.policy.v1beta1.RandomSampling\x12;\n\nrate_limit\x18\x02 \x01(\x0b\x32\'.istio.policy.v1beta1.RateLimitSampling\"\x94\x01\n\x0eRandomSampling\x12\x1c\n\x14\x61ttribute_expression\x18\x01 \x01(\t\x12@\n\x0fpercent_sampled\x18\x02 \x01(\x0b\x32\'.istio.policy.v1beta1.FractionalPercent\x12\"\n\x1ause_independent_randomness\x18\x03 \x01(\x08\"\x89\x01\n\x11RateLimitSampling\x12>\n\x11sampling_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xc8\xde\x1f\x00\x98\xdf\x1f\x01\x12\x1d\n\x15max_unsampled_entries\x18\x02 \x01(\x03\x12\x15\n\rsampling_rate\x18\x03 \x01(\x03\"\xa6\x01\n\x11\x46ractionalPercent\x12\x11\n\tnumerator\x18\x01 \x01(\r\x12L\n\x0b\x64\x65nominator\x18\x02 \x01(\x0e\x32\x37.istio.policy.v1beta1.FractionalPercent.DenominatorType\"0\n\x0f\x44\x65nominatorType\x12\x0b\n\x07HUNDRED\x10\x00\x12\x10\n\x0cTEN_THOUSAND\x10\x01\x42\x1dZ\x1bistio.io/api/policy/v1beta1b\x06proto3') , dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,policy_dot_v1beta1_dot_value__type__pb2.DESCRIPTOR,]) @@ -72,8 +72,8 @@ ], containing_type=None, options=None, - serialized_start=1890, - serialized_end=1938, + serialized_start=2032, + serialized_end=2080, ) _sym_db.RegisterEnumDescriptor(_FRACTIONALPERCENT_DENOMINATORTYPE) @@ -346,6 +346,43 @@ ) +_INSTANCE_ATTRIBUTEBINDINGSENTRY = _descriptor.Descriptor( + name='AttributeBindingsEntry', + full_name='istio.policy.v1beta1.Instance.AttributeBindingsEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='istio.policy.v1beta1.Instance.AttributeBindingsEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='istio.policy.v1beta1.Instance.AttributeBindingsEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1239, + serialized_end=1295, +) + _INSTANCE = _descriptor.Descriptor( name='Instance', full_name='istio.policy.v1beta1.Instance', @@ -381,10 +418,17 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='attribute_bindings', full_name='istio.policy.v1beta1.Instance.attribute_bindings', index=4, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), ], extensions=[ ], - nested_types=[], + nested_types=[_INSTANCE_ATTRIBUTEBINDINGSENTRY, ], enum_types=[ ], options=None, @@ -393,8 +437,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1040, - serialized_end=1153, + serialized_start=1041, + serialized_end=1295, ) @@ -452,8 +496,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1156, - serialized_end=1320, + serialized_start=1298, + serialized_end=1462, ) @@ -483,8 +527,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1322, - serialized_end=1351, + serialized_start=1464, + serialized_end=1493, ) @@ -521,8 +565,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1353, - serialized_end=1478, + serialized_start=1495, + serialized_end=1620, ) @@ -566,8 +610,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1481, - serialized_end=1629, + serialized_start=1623, + serialized_end=1771, ) @@ -611,8 +655,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1632, - serialized_end=1769, + serialized_start=1774, + serialized_end=1911, ) @@ -650,8 +694,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1772, - serialized_end=1938, + serialized_start=1914, + serialized_end=2080, ) _ATTRIBUTEMANIFEST_ATTRIBUTEINFO.fields_by_name['value_type'].enum_type = policy_dot_v1beta1_dot_value__type__pb2._VALUETYPE @@ -666,7 +710,9 @@ _RULE.fields_by_name['request_header_operations'].message_type = _RULE_HEADEROPERATIONTEMPLATE _RULE.fields_by_name['response_header_operations'].message_type = _RULE_HEADEROPERATIONTEMPLATE _RULE.fields_by_name['sampling'].message_type = _SAMPLING +_INSTANCE_ATTRIBUTEBINDINGSENTRY.containing_type = _INSTANCE _INSTANCE.fields_by_name['params'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT +_INSTANCE.fields_by_name['attribute_bindings'].message_type = _INSTANCE_ATTRIBUTEBINDINGSENTRY _HANDLER.fields_by_name['params'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _HANDLER.fields_by_name['connection'].message_type = _CONNECTION _SAMPLING.fields_by_name['random'].message_type = _RANDOMSAMPLING @@ -733,11 +779,19 @@ _sym_db.RegisterMessage(Action) Instance = _reflection.GeneratedProtocolMessageType('Instance', (_message.Message,), dict( + + AttributeBindingsEntry = _reflection.GeneratedProtocolMessageType('AttributeBindingsEntry', (_message.Message,), dict( + DESCRIPTOR = _INSTANCE_ATTRIBUTEBINDINGSENTRY, + __module__ = 'policy.v1beta1.cfg_pb2' + # @@protoc_insertion_point(class_scope:istio.policy.v1beta1.Instance.AttributeBindingsEntry) + )) + , DESCRIPTOR = _INSTANCE, __module__ = 'policy.v1beta1.cfg_pb2' # @@protoc_insertion_point(class_scope:istio.policy.v1beta1.Instance) )) _sym_db.RegisterMessage(Instance) +_sym_db.RegisterMessage(Instance.AttributeBindingsEntry) Handler = _reflection.GeneratedProtocolMessageType('Handler', (_message.Message,), dict( DESCRIPTOR = _HANDLER, @@ -786,6 +840,8 @@ DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\033istio.io/api/policy/v1beta1')) _ATTRIBUTEMANIFEST_ATTRIBUTESENTRY.has_options = True _ATTRIBUTEMANIFEST_ATTRIBUTESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) +_INSTANCE_ATTRIBUTEBINDINGSENTRY.has_options = True +_INSTANCE_ATTRIBUTEBINDINGSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _RATELIMITSAMPLING.fields_by_name['sampling_duration'].has_options = True _RATELIMITSAMPLING.fields_by_name['sampling_duration']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000\230\337\037\001')) # @@protoc_insertion_point(module_scope)