From 9db8e425f8a19cda92e31bd3c0165ba193a52ac6 Mon Sep 17 00:00:00 2001
From: Kuat Yessenov
Date: Wed, 16 May 2018 14:46:14 -0700
Subject: [PATCH 1/3] add forward attributes to service config
Signed-off-by: Kuat Yessenov
---
mixer/v1/config/client/client_config.pb.go | 200 +++++++++++-------
mixer/v1/config/client/client_config.proto | 4 +
.../istio.mixer.v1.config.client.pb.html | 9 +
.../v1/config/client/client_config_pb2.py | 28 ++-
4 files changed, 157 insertions(+), 84 deletions(-)
diff --git a/mixer/v1/config/client/client_config.pb.go b/mixer/v1/config/client/client_config.pb.go
index bb42caf9a0..720352d7d8 100644
--- a/mixer/v1/config/client/client_config.pb.go
+++ b/mixer/v1/config/client/client_config.pb.go
@@ -75,6 +75,9 @@ 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.
+ 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 +288,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 +350,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 +400,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 +426,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 +444,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 +482,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 +522,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 +588,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 +723,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 +1057,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 +1978,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, 0xf8, 0x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x67, 0x9a, 0xf2, 0xc7, 0x4c, 0x53, 0x6e, 0x66, 0x9a, 0xf2, 0xf3, 0x5c, 0x53, 0x2f, 0xe7, 0x9a,
+ 0x72, 0x35, 0xd7, 0xd4, 0xeb, 0xb9, 0xa6, 0xfe, 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..b9a4fe84a4 100644
--- a/mixer/v1/config/client/client_config.proto
+++ b/mixer/v1/config/client/client_config.proto
@@ -73,6 +73,10 @@ 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.
+ 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..c7c7c44505 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
@@ -764,6 +764,15 @@ ServiceConfig
[mesh-level
policy][istio.mixer.v1.config.client.TransportConfig.networkfailpolicy].
+
+
+
+forwardAttributes |
+istio.mixer.v1.Attributes |
+
+ Default attributes to forward to upstream. This typically
+includes the “source.ip” and “source.uid” attributes.
+
|
diff --git a/python/istio_api/mixer/v1/config/client/client_config_pb2.py b/python/istio_api/mixer/v1/config/client/client_config_pb2.py
index ab4ead5a7d..90e218de37 100644
--- a/python/istio_api/mixer/v1/config/client/client_config_pb2.py
+++ b/python/istio_api/mixer/v1/config/client/client_config_pb2.py
@@ -24,7 +24,7 @@
name='mixer/v1/config/client/client_config.proto',
package='istio.mixer.v1.config.client',
syntax='proto3',
- serialized_pb=_b('\n*mixer/v1/config/client/client_config.proto\x12\x1cistio.mixer.v1.config.client\x1a\x14gogoproto/gogo.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x19mixer/v1/attributes.proto\x1a%mixer/v1/config/client/api_spec.proto\x1a\"mixer/v1/config/client/quota.proto\"\x8c\x01\n\x11NetworkFailPolicy\x12J\n\x06policy\x18\x01 \x01(\x0e\x32:.istio.mixer.v1.config.client.NetworkFailPolicy.FailPolicy\"+\n\nFailPolicy\x12\r\n\tFAIL_OPEN\x10\x00\x12\x0e\n\nFAIL_CLOSE\x10\x01\"\xcd\x02\n\rServiceConfig\x12\x1b\n\x13\x64isable_check_calls\x18\x01 \x01(\x08\x12\x1c\n\x14\x64isable_report_calls\x18\x02 \x01(\x08\x12\x34\n\x10mixer_attributes\x18\x03 \x01(\x0b\x32\x1a.istio.mixer.v1.Attributes\x12@\n\rhttp_api_spec\x18\x04 \x03(\x0b\x32).istio.mixer.v1.config.client.HTTPAPISpec\x12;\n\nquota_spec\x18\x05 \x03(\x0b\x32\'.istio.mixer.v1.config.client.QuotaSpec\x12L\n\x13network_fail_policy\x18\x07 \x01(\x0b\x32/.istio.mixer.v1.config.client.NetworkFailPolicy\"\xa0\x02\n\x0fTransportConfig\x12\x1b\n\x13\x64isable_check_cache\x18\x01 \x01(\x08\x12\x1b\n\x13\x64isable_quota_cache\x18\x02 \x01(\x08\x12\x1c\n\x14\x64isable_report_batch\x18\x03 \x01(\x08\x12L\n\x13network_fail_policy\x18\x04 \x01(\x0b\x32/.istio.mixer.v1.config.client.NetworkFailPolicy\x12\x38\n\x15stats_update_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rcheck_cluster\x18\x06 \x01(\t\x12\x16\n\x0ereport_cluster\x18\x07 \x01(\t\"\xa8\x03\n\x10HttpClientConfig\x12@\n\ttransport\x18\x01 \x01(\x0b\x32-.istio.mixer.v1.config.client.TransportConfig\x12[\n\x0fservice_configs\x18\x02 \x03(\x0b\x32\x42.istio.mixer.v1.config.client.HttpClientConfig.ServiceConfigsEntry\x12#\n\x1b\x64\x65\x66\x61ult_destination_service\x18\x03 \x01(\t\x12\x34\n\x10mixer_attributes\x18\x04 \x01(\x0b\x32\x1a.istio.mixer.v1.Attributes\x12\x36\n\x12\x66orward_attributes\x18\x05 \x01(\x0b\x32\x1a.istio.mixer.v1.Attributes\x1a\x62\n\x13ServiceConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.istio.mixer.v1.config.client.ServiceConfig:\x02\x38\x01\"\xc0\x02\n\x0fTcpClientConfig\x12@\n\ttransport\x18\x01 \x01(\x0b\x32-.istio.mixer.v1.config.client.TransportConfig\x12\x34\n\x10mixer_attributes\x18\x02 \x01(\x0b\x32\x1a.istio.mixer.v1.Attributes\x12\x1b\n\x13\x64isable_check_calls\x18\x03 \x01(\x08\x12\x1c\n\x14\x64isable_report_calls\x18\x04 \x01(\x08\x12\x46\n\x15\x63onnection_quota_spec\x18\x05 \x01(\x0b\x32\'.istio.mixer.v1.config.client.QuotaSpec\x12\x32\n\x0freport_interval\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB1Z#istio.io/api/mixer/v1/config/client\xc8\xe1\x1e\x00\xa8\xe2\x1e\x00\xf0\xe1\x1e\x00\x62\x06proto3')
+ serialized_pb=_b('\n*mixer/v1/config/client/client_config.proto\x12\x1cistio.mixer.v1.config.client\x1a\x14gogoproto/gogo.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x19mixer/v1/attributes.proto\x1a%mixer/v1/config/client/api_spec.proto\x1a\"mixer/v1/config/client/quota.proto\"\x8c\x01\n\x11NetworkFailPolicy\x12J\n\x06policy\x18\x01 \x01(\x0e\x32:.istio.mixer.v1.config.client.NetworkFailPolicy.FailPolicy\"+\n\nFailPolicy\x12\r\n\tFAIL_OPEN\x10\x00\x12\x0e\n\nFAIL_CLOSE\x10\x01\"\x85\x03\n\rServiceConfig\x12\x1b\n\x13\x64isable_check_calls\x18\x01 \x01(\x08\x12\x1c\n\x14\x64isable_report_calls\x18\x02 \x01(\x08\x12\x34\n\x10mixer_attributes\x18\x03 \x01(\x0b\x32\x1a.istio.mixer.v1.Attributes\x12@\n\rhttp_api_spec\x18\x04 \x03(\x0b\x32).istio.mixer.v1.config.client.HTTPAPISpec\x12;\n\nquota_spec\x18\x05 \x03(\x0b\x32\'.istio.mixer.v1.config.client.QuotaSpec\x12L\n\x13network_fail_policy\x18\x07 \x01(\x0b\x32/.istio.mixer.v1.config.client.NetworkFailPolicy\x12\x36\n\x12\x66orward_attributes\x18\x08 \x01(\x0b\x32\x1a.istio.mixer.v1.Attributes\"\xa0\x02\n\x0fTransportConfig\x12\x1b\n\x13\x64isable_check_cache\x18\x01 \x01(\x08\x12\x1b\n\x13\x64isable_quota_cache\x18\x02 \x01(\x08\x12\x1c\n\x14\x64isable_report_batch\x18\x03 \x01(\x08\x12L\n\x13network_fail_policy\x18\x04 \x01(\x0b\x32/.istio.mixer.v1.config.client.NetworkFailPolicy\x12\x38\n\x15stats_update_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rcheck_cluster\x18\x06 \x01(\t\x12\x16\n\x0ereport_cluster\x18\x07 \x01(\t\"\xa8\x03\n\x10HttpClientConfig\x12@\n\ttransport\x18\x01 \x01(\x0b\x32-.istio.mixer.v1.config.client.TransportConfig\x12[\n\x0fservice_configs\x18\x02 \x03(\x0b\x32\x42.istio.mixer.v1.config.client.HttpClientConfig.ServiceConfigsEntry\x12#\n\x1b\x64\x65\x66\x61ult_destination_service\x18\x03 \x01(\t\x12\x34\n\x10mixer_attributes\x18\x04 \x01(\x0b\x32\x1a.istio.mixer.v1.Attributes\x12\x36\n\x12\x66orward_attributes\x18\x05 \x01(\x0b\x32\x1a.istio.mixer.v1.Attributes\x1a\x62\n\x13ServiceConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.istio.mixer.v1.config.client.ServiceConfig:\x02\x38\x01\"\xc0\x02\n\x0fTcpClientConfig\x12@\n\ttransport\x18\x01 \x01(\x0b\x32-.istio.mixer.v1.config.client.TransportConfig\x12\x34\n\x10mixer_attributes\x18\x02 \x01(\x0b\x32\x1a.istio.mixer.v1.Attributes\x12\x1b\n\x13\x64isable_check_calls\x18\x03 \x01(\x08\x12\x1c\n\x14\x64isable_report_calls\x18\x04 \x01(\x08\x12\x46\n\x15\x63onnection_quota_spec\x18\x05 \x01(\x0b\x32\'.istio.mixer.v1.config.client.QuotaSpec\x12\x32\n\x0freport_interval\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB1Z#istio.io/api/mixer/v1/config/client\xc8\xe1\x1e\x00\xa8\xe2\x1e\x00\xf0\xe1\x1e\x00\x62\x06proto3')
,
dependencies=[gogoproto_dot_gogo__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,mixer_dot_v1_dot_attributes__pb2.DESCRIPTOR,mixer_dot_v1_dot_config_dot_client_dot_api__spec__pb2.DESCRIPTOR,mixer_dot_v1_dot_config_dot_client_dot_quota__pb2.DESCRIPTOR,])
@@ -134,6 +134,13 @@
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
+ _descriptor.FieldDescriptor(
+ name='forward_attributes', full_name='istio.mixer.v1.config.client.ServiceConfig.forward_attributes', index=6,
+ number=8, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None, file=DESCRIPTOR),
],
extensions=[
],
@@ -147,7 +154,7 @@
oneofs=[
],
serialized_start=376,
- serialized_end=709,
+ serialized_end=765,
)
@@ -219,8 +226,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=712,
- serialized_end=1000,
+ serialized_start=768,
+ serialized_end=1056,
)
@@ -257,8 +264,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=1329,
- serialized_end=1427,
+ serialized_start=1385,
+ serialized_end=1483,
)
_HTTPCLIENTCONFIG = _descriptor.Descriptor(
@@ -315,8 +322,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=1003,
- serialized_end=1427,
+ serialized_start=1059,
+ serialized_end=1483,
)
@@ -381,8 +388,8 @@
extension_ranges=[],
oneofs=[
],
- serialized_start=1430,
- serialized_end=1750,
+ serialized_start=1486,
+ serialized_end=1806,
)
_NETWORKFAILPOLICY.fields_by_name['policy'].enum_type = _NETWORKFAILPOLICY_FAILPOLICY
@@ -391,6 +398,7 @@
_SERVICECONFIG.fields_by_name['http_api_spec'].message_type = mixer_dot_v1_dot_config_dot_client_dot_api__spec__pb2._HTTPAPISPEC
_SERVICECONFIG.fields_by_name['quota_spec'].message_type = mixer_dot_v1_dot_config_dot_client_dot_quota__pb2._QUOTASPEC
_SERVICECONFIG.fields_by_name['network_fail_policy'].message_type = _NETWORKFAILPOLICY
+_SERVICECONFIG.fields_by_name['forward_attributes'].message_type = mixer_dot_v1_dot_attributes__pb2._ATTRIBUTES
_TRANSPORTCONFIG.fields_by_name['network_fail_policy'].message_type = _NETWORKFAILPOLICY
_TRANSPORTCONFIG.fields_by_name['stats_update_interval'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
_HTTPCLIENTCONFIG_SERVICECONFIGSENTRY.fields_by_name['value'].message_type = _SERVICECONFIG
From c3ce3831d246fe0d302f336e2e3f4b81bcec9ae5 Mon Sep 17 00:00:00 2001
From: Kuat Yessenov
Date: Wed, 16 May 2018 20:39:46 -0700
Subject: [PATCH 2/3] clarify
Signed-off-by: Kuat Yessenov
---
mixer/v1/config/client/client_config.pb.go | 4 ++++
mixer/v1/config/client/client_config.proto | 4 ++++
.../v1/config/client/istio.mixer.v1.config.client.pb.html | 8 ++++++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/mixer/v1/config/client/client_config.pb.go b/mixer/v1/config/client/client_config.pb.go
index 720352d7d8..11a3779de1 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, these 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"`
@@ -77,6 +79,8 @@ type ServiceConfig struct {
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, these attributes take precedence
+ // over the attributes supplied in the client configuration.
ForwardAttributes *istio_mixer_v1.Attributes `protobuf:"bytes,8,opt,name=forward_attributes,json=forwardAttributes" json:"forward_attributes,omitempty"`
}
diff --git a/mixer/v1/config/client/client_config.proto b/mixer/v1/config/client/client_config.proto
index b9a4fe84a4..f9dbde73b0 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, these attributes take precedence
+ // over the attributes supplied in the client configuration.
Attributes mixer_attributes = 3;
// HTTP API specifications to generate API attributes.
@@ -76,6 +78,8 @@ message ServiceConfig {
// Default attributes to forward to upstream. This typically
// includes the "source.ip" and "source.uid" attributes.
+ // In case of a per-route override, these attributes take precedence
+ // over the attributes supplied in the client configuration.
Attributes forward_attributes = 8;
}
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 c7c7c44505..bee9a690d6 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 @@ ServiceConfig
istio.mixer.v1.Attributes |
Send 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, these attributes take precedence
+over the attributes supplied in the client configuration.
|
@@ -771,7 +773,9 @@ ServiceConfig
istio.mixer.v1.Attributes |
Default attributes to forward to upstream. This typically
-includes the “source.ip” and “source.uid” attributes.
+includes the “source.ip” and “source.uid” attributes.
+In case of a per-route override, these attributes take precedence
+over the attributes supplied in the client configuration.
|
From 6585537c3fbf764e54d0c8d045e39feab56203a4 Mon Sep 17 00:00:00 2001
From: Kuat Yessenov
Date: Tue, 22 May 2018 11:18:17 -0700
Subject: [PATCH 3/3] clarify order of application
Signed-off-by: Kuat Yessenov
---
mixer/v1/config/client/client_config.pb.go | 12 ++++++++++--
mixer/v1/config/client/client_config.proto | 12 ++++++++++--
.../client/istio.mixer.v1.config.client.pb.html | 12 ++++++++++--
3 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/mixer/v1/config/client/client_config.pb.go b/mixer/v1/config/client/client_config.pb.go
index 11a3779de1..f88aa49497 100644
--- a/mixer/v1/config/client/client_config.pb.go
+++ b/mixer/v1/config/client/client_config.pb.go
@@ -65,7 +65,7 @@ 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, these attributes take precedence
+ // 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.
@@ -79,8 +79,16 @@ type ServiceConfig struct {
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, these attributes take precedence
+ // 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"`
}
diff --git a/mixer/v1/config/client/client_config.proto b/mixer/v1/config/client/client_config.proto
index f9dbde73b0..2371e72624 100644
--- a/mixer/v1/config/client/client_config.proto
+++ b/mixer/v1/config/client/client_config.proto
@@ -60,7 +60,7 @@ 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, these attributes take precedence
+ // In case of a per-route override, per-route attributes take precedence
// over the attributes supplied in the client configuration.
Attributes mixer_attributes = 3;
@@ -78,8 +78,16 @@ message ServiceConfig {
// Default attributes to forward to upstream. This typically
// includes the "source.ip" and "source.uid" attributes.
- // In case of a per-route override, these attributes take precedence
+ // 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;
}
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 bee9a690d6..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
@@ -736,7 +736,7 @@ 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, these attributes take precedence
+In case of a per-route override, per-route attributes take precedence
over the attributes supplied in the client configuration.
|
@@ -774,9 +774,17 @@ ServiceConfig
Default attributes to forward to upstream. This typically
includes the “source.ip” and “source.uid” attributes.
-In case of a per-route override, these attributes take precedence
+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.
+
|