diff --git a/mixer/v1/config/client/client_config.pb.go b/mixer/v1/config/client/client_config.pb.go index bb42caf9a0..f88aa49497 100644 --- a/mixer/v1/config/client/client_config.pb.go +++ b/mixer/v1/config/client/client_config.pb.go @@ -65,6 +65,8 @@ type ServiceConfig struct { DisableReportCalls bool `protobuf:"varint,2,opt,name=disable_report_calls,json=disableReportCalls,proto3" json:"disable_report_calls,omitempty"` // Send these attributes to Mixer in both Check and Report. This // typically includes the "destination.service" attribute. + // In case of a per-route override, per-route attributes take precedence + // over the attributes supplied in the client configuration. MixerAttributes *istio_mixer_v1.Attributes `protobuf:"bytes,3,opt,name=mixer_attributes,json=mixerAttributes" json:"mixer_attributes,omitempty"` // HTTP API specifications to generate API attributes. HttpApiSpec []*HTTPAPISpec `protobuf:"bytes,4,rep,name=http_api_spec,json=httpApiSpec" json:"http_api_spec,omitempty"` @@ -75,6 +77,19 @@ type ServiceConfig struct { // [mesh-level // policy][istio.mixer.v1.config.client.TransportConfig.network_fail_policy]. NetworkFailPolicy *NetworkFailPolicy `protobuf:"bytes,7,opt,name=network_fail_policy,json=networkFailPolicy" json:"network_fail_policy,omitempty"` + // Default attributes to forward to upstream. This typically + // includes the "source.ip" and "source.uid" attributes. + // In case of a per-route override, per-route attributes take precedence + // over the attributes supplied in the client configuration. + // + // Forwarded attributes take precedence over the static Mixer attributes. + // The full order of application is as follows: + // 1. static Mixer attributes from the filter config; + // 2. static Mixer attributes from the route config; + // 3. forwarded attributes from the source filter config (if any); + // 4. forwarded attributes from the source route config (if any); + // 5. derived attributes from the request metadata. + ForwardAttributes *istio_mixer_v1.Attributes `protobuf:"bytes,8,opt,name=forward_attributes,json=forwardAttributes" json:"forward_attributes,omitempty"` } func (m *ServiceConfig) Reset() { *m = ServiceConfig{} } @@ -285,6 +300,16 @@ func (m *ServiceConfig) MarshalTo(dAtA []byte) (int, error) { } i += n2 } + if m.ForwardAttributes != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintClientConfig(dAtA, i, uint64(m.ForwardAttributes.Size())) + n3, err := m.ForwardAttributes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } return i, nil } @@ -337,21 +362,21 @@ func (m *TransportConfig) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintClientConfig(dAtA, i, uint64(m.NetworkFailPolicy.Size())) - n3, err := m.NetworkFailPolicy.MarshalTo(dAtA[i:]) + n4, err := m.NetworkFailPolicy.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n3 + i += n4 } if m.StatsUpdateInterval != nil { dAtA[i] = 0x2a i++ i = encodeVarintClientConfig(dAtA, i, uint64(m.StatsUpdateInterval.Size())) - n4, err := m.StatsUpdateInterval.MarshalTo(dAtA[i:]) + n5, err := m.StatsUpdateInterval.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n4 + i += n5 } if len(m.CheckCluster) > 0 { dAtA[i] = 0x32 @@ -387,11 +412,11 @@ func (m *HttpClientConfig) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintClientConfig(dAtA, i, uint64(m.Transport.Size())) - n5, err := m.Transport.MarshalTo(dAtA[i:]) + n6, err := m.Transport.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n6 } if len(m.ServiceConfigs) > 0 { for k, _ := range m.ServiceConfigs { @@ -413,11 +438,11 @@ func (m *HttpClientConfig) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintClientConfig(dAtA, i, uint64(v.Size())) - n6, err := v.MarshalTo(dAtA[i:]) + n7, err := v.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n7 } } } @@ -431,21 +456,21 @@ func (m *HttpClientConfig) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintClientConfig(dAtA, i, uint64(m.MixerAttributes.Size())) - n7, err := m.MixerAttributes.MarshalTo(dAtA[i:]) + n8, err := m.MixerAttributes.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n8 } if m.ForwardAttributes != nil { dAtA[i] = 0x2a i++ i = encodeVarintClientConfig(dAtA, i, uint64(m.ForwardAttributes.Size())) - n8, err := m.ForwardAttributes.MarshalTo(dAtA[i:]) + n9, err := m.ForwardAttributes.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n9 } return i, nil } @@ -469,21 +494,21 @@ func (m *TcpClientConfig) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintClientConfig(dAtA, i, uint64(m.Transport.Size())) - n9, err := m.Transport.MarshalTo(dAtA[i:]) + n10, err := m.Transport.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n10 } if m.MixerAttributes != nil { dAtA[i] = 0x12 i++ i = encodeVarintClientConfig(dAtA, i, uint64(m.MixerAttributes.Size())) - n10, err := m.MixerAttributes.MarshalTo(dAtA[i:]) + n11, err := m.MixerAttributes.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n11 } if m.DisableCheckCalls { dAtA[i] = 0x18 @@ -509,21 +534,21 @@ func (m *TcpClientConfig) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintClientConfig(dAtA, i, uint64(m.ConnectionQuotaSpec.Size())) - n11, err := m.ConnectionQuotaSpec.MarshalTo(dAtA[i:]) + n12, err := m.ConnectionQuotaSpec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n12 } if m.ReportInterval != nil { dAtA[i] = 0x32 i++ i = encodeVarintClientConfig(dAtA, i, uint64(m.ReportInterval.Size())) - n12, err := m.ReportInterval.MarshalTo(dAtA[i:]) + n13, err := m.ReportInterval.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n13 } return i, nil } @@ -575,6 +600,10 @@ func (m *ServiceConfig) Size() (n int) { l = m.NetworkFailPolicy.Size() n += 1 + l + sovClientConfig(uint64(l)) } + if m.ForwardAttributes != nil { + l = m.ForwardAttributes.Size() + n += 1 + l + sovClientConfig(uint64(l)) + } return n } @@ -706,6 +735,7 @@ func (this *ServiceConfig) String() string { `HttpApiSpec:` + strings.Replace(fmt.Sprintf("%v", this.HttpApiSpec), "HTTPAPISpec", "HTTPAPISpec", 1) + `,`, `QuotaSpec:` + strings.Replace(fmt.Sprintf("%v", this.QuotaSpec), "QuotaSpec", "QuotaSpec", 1) + `,`, `NetworkFailPolicy:` + strings.Replace(fmt.Sprintf("%v", this.NetworkFailPolicy), "NetworkFailPolicy", "NetworkFailPolicy", 1) + `,`, + `ForwardAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ForwardAttributes), "Attributes", "istio_mixer_v1.Attributes", 1) + `,`, `}`, }, "") return s @@ -1039,6 +1069,39 @@ func (m *ServiceConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwardAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowClientConfig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthClientConfig + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ForwardAttributes == nil { + m.ForwardAttributes = &istio_mixer_v1.Attributes{} + } + if err := m.ForwardAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipClientConfig(dAtA[iNdEx:]) @@ -1927,58 +1990,59 @@ func init() { } var fileDescriptorClientConfig = []byte{ - // 844 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x8e, 0xe2, 0x46, - 0x10, 0xb6, 0xf9, 0xdb, 0xd0, 0x84, 0xbf, 0x66, 0x57, 0x62, 0x48, 0x64, 0x21, 0x56, 0xab, 0x90, - 0xac, 0x62, 0x67, 0xc9, 0x25, 0xda, 0x43, 0x24, 0x60, 0x19, 0x2d, 0xca, 0xfe, 0x10, 0xcf, 0xcc, - 0x25, 0x39, 0x58, 0x8d, 0x69, 0xa0, 0x85, 0xe3, 0xf6, 0xd8, 0x6d, 0x26, 0x73, 0xcb, 0x13, 0x44, - 0x39, 0xe4, 0x9e, 0xeb, 0x1c, 0xf3, 0x18, 0x73, 0x9c, 0x63, 0x8e, 0x81, 0x5c, 0x72, 0x9c, 0x47, - 0x88, 0xdc, 0xdd, 0xc0, 0xc0, 0x00, 0x23, 0xa4, 0xec, 0x89, 0x76, 0xd5, 0xf7, 0x55, 0x77, 0xd5, - 0x57, 0x55, 0x02, 0x7c, 0xf1, 0x13, 0xf9, 0x19, 0xfb, 0xc6, 0xf4, 0x85, 0x61, 0x53, 0x77, 0x48, - 0x46, 0x86, 0xed, 0x10, 0xec, 0x32, 0xf9, 0x63, 0x09, 0xa3, 0xee, 0xf9, 0x94, 0x51, 0xf8, 0x29, - 0x09, 0x18, 0xa1, 0x3a, 0x67, 0xe8, 0xd3, 0x17, 0xba, 0x74, 0x0a, 0x68, 0xe5, 0xf1, 0x88, 0x8e, - 0x28, 0x07, 0x1a, 0xd1, 0x49, 0x70, 0x2a, 0xda, 0x88, 0xd2, 0x91, 0x83, 0x0d, 0xfe, 0xd5, 0x0f, - 0x87, 0xc6, 0x20, 0xf4, 0x11, 0x23, 0xd4, 0x95, 0xfe, 0xa3, 0xe5, 0xfd, 0x88, 0x31, 0x9f, 0xf4, - 0x43, 0x86, 0x03, 0xe9, 0x7a, 0xb6, 0xe3, 0x69, 0xc8, 0x23, 0x56, 0xe0, 0x61, 0x5b, 0xc2, 0x6a, - 0x3b, 0x60, 0xe7, 0x21, 0x65, 0x48, 0x60, 0x6a, 0xbf, 0xab, 0xa0, 0xf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0xa5, 0x55, 0x94, 0xa5, - 0x11, 0xb6, 0x40, 0x5e, 0x3e, 0x63, 0xb9, 0x0c, 0x52, 0x0f, 0x2d, 0x03, 0x39, 0xd0, 0x8b, 0x3d, - 0xd0, 0x3a, 0xbb, 0x9e, 0x69, 0xca, 0xcd, 0x4c, 0x53, 0xfe, 0x9a, 0x69, 0xca, 0xed, 0x4c, 0x53, - 0x7e, 0x99, 0x6b, 0xea, 0xd5, 0x5c, 0x53, 0xae, 0xe7, 0x9a, 0x7a, 0x33, 0xd7, 0xd4, 0xbf, 0xe7, - 0x9a, 0xfa, 0xef, 0x5c, 0x53, 0x6e, 0xe7, 0x9a, 0xfa, 0xdb, 0x3f, 0x9a, 0xf2, 0xc3, 0x53, 0xf1, - 0x64, 0x42, 0xa3, 0xbf, 0x05, 0xc6, 0xf6, 0xbf, 0x02, 0xfd, 0x14, 0xbf, 0xf9, 0xeb, 0xff, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x2d, 0xa8, 0x75, 0xef, 0xed, 0x08, 0x00, 0x00, + // 853 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xbd, 0x8f, 0xe2, 0x46, + 0x14, 0xb7, 0xf9, 0xba, 0x63, 0x08, 0x5f, 0xc3, 0x9d, 0xc4, 0x92, 0xc8, 0x42, 0x9c, 0x4e, 0x21, + 0x39, 0xc5, 0xce, 0x91, 0x26, 0xba, 0x22, 0x12, 0x70, 0xac, 0x0e, 0xe5, 0x3e, 0x88, 0x77, 0xaf, + 0x49, 0x0a, 0x6b, 0x30, 0x03, 0x8c, 0x70, 0x3c, 0x5e, 0x7b, 0xcc, 0x66, 0xbb, 0xfc, 0x05, 0x51, + 0x8a, 0xf4, 0x69, 0xf7, 0x4f, 0xd9, 0x72, 0xcb, 0x94, 0x81, 0x34, 0x29, 0xb7, 0x4f, 0x13, 0x79, + 0x66, 0x80, 0x85, 0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 0x39, 0xd7, 0xd4, 0xbf, 0xe7, 0x9a, 0x72, 0x33, + 0xd7, 0xd4, 0x5f, 0xff, 0xd2, 0x94, 0xef, 0x9f, 0x88, 0x23, 0x13, 0x1a, 0xfd, 0xc3, 0x30, 0xb6, + 0xff, 0xab, 0xe8, 0xa7, 0xf8, 0xce, 0x5f, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xf7, 0x6c, + 0x81, 0x38, 0x09, 0x00, 0x00, } diff --git a/mixer/v1/config/client/client_config.proto b/mixer/v1/config/client/client_config.proto index f7f80a0db4..2371e72624 100644 --- a/mixer/v1/config/client/client_config.proto +++ b/mixer/v1/config/client/client_config.proto @@ -60,6 +60,8 @@ message ServiceConfig { // Send these attributes to Mixer in both Check and Report. This // typically includes the "destination.service" attribute. + // In case of a per-route override, per-route attributes take precedence + // over the attributes supplied in the client configuration. Attributes mixer_attributes = 3; // HTTP API specifications to generate API attributes. @@ -73,6 +75,20 @@ message ServiceConfig { // [mesh-level // policy][istio.mixer.v1.config.client.TransportConfig.network_fail_policy]. NetworkFailPolicy network_fail_policy = 7; + + // Default attributes to forward to upstream. This typically + // includes the "source.ip" and "source.uid" attributes. + // In case of a per-route override, per-route attributes take precedence + // over the attributes supplied in the client configuration. + // + // Forwarded attributes take precedence over the static Mixer attributes. + // The full order of application is as follows: + // 1. static Mixer attributes from the filter config; + // 2. static Mixer attributes from the route config; + // 3. forwarded attributes from the source filter config (if any); + // 4. forwarded attributes from the source route config (if any); + // 5. derived attributes from the request metadata. + Attributes forward_attributes = 8; } // Defines the transport config on how to call Mixer. diff --git a/mixer/v1/config/client/istio.mixer.v1.config.client.pb.html b/mixer/v1/config/client/istio.mixer.v1.config.client.pb.html index 8bde2cee23..892f086818 100644 --- a/mixer/v1/config/client/istio.mixer.v1.config.client.pb.html +++ b/mixer/v1/config/client/istio.mixer.v1.config.client.pb.html @@ -735,7 +735,9 @@
istio.mixer.v1.AttributesSend these attributes to Mixer in both Check and Report. This -typically includes the “destination.service” attribute.
+typically includes the “destination.service” attribute. +In case of a per-route override, per-route attributes take precedence +over the attributes supplied in the client configuration.forwardAttributesistio.mixer.v1.AttributesDefault attributes to forward to upstream. This typically +includes the “source.ip” and “source.uid” attributes. +In case of a per-route override, per-route attributes take precedence +over the attributes supplied in the client configuration.
+ +Forwarded attributes take precedence over the static Mixer attributes. +The full order of application is as follows: +1. static Mixer attributes from the filter config; +2. static Mixer attributes from the route config; +3. forwarded attributes from the source filter config (if any); +4. forwarded attributes from the source route config (if any); +5. derived attributes from the request metadata.
+