From bce782c37d65ef86a479e0a7ba79d3f0ab3b1fce Mon Sep 17 00:00:00 2001 From: Yangmin Zhu Date: Tue, 23 Oct 2018 11:35:10 -0700 Subject: [PATCH] Add mesh config to allow setting network policy fail open --- mesh/v1alpha1/config.pb.go | 152 ++++++++++++------- mesh/v1alpha1/config.proto | 7 +- mesh/v1alpha1/istio.mesh.v1alpha1.pb.html | 10 ++ python/istio_api/mesh/v1alpha1/config_pb2.py | 53 ++++--- 4 files changed, 146 insertions(+), 76 deletions(-) diff --git a/mesh/v1alpha1/config.pb.go b/mesh/v1alpha1/config.pb.go index d80c94df7c..04cfb65148 100644 --- a/mesh/v1alpha1/config.pb.go +++ b/mesh/v1alpha1/config.pb.go @@ -124,6 +124,10 @@ type MeshConfig struct { // Disable policy checks by the mixer service. Default // is false, i.e. mixer policy check is enabled by default. DisablePolicyChecks bool `protobuf:"varint,3,opt,name=disable_policy_checks,json=disablePolicyChecks,proto3" json:"disable_policy_checks,omitempty"` + // Allow all traffic in cases when the mixer policy service cannot be reached. + // Default is false which means the traffic is denied when the client is unable + // to connect to Mixer. + PolicyCheckFailOpen bool `protobuf:"varint,25,opt,name=policy_check_fail_open,json=policyCheckFailOpen,proto3" json:"policy_check_fail_open,omitempty"` // Port on which Envoy should listen for incoming connections from // other services. ProxyListenPort int32 `protobuf:"varint,4,opt,name=proxy_listen_port,json=proxyListenPort,proto3" json:"proxy_listen_port,omitempty"` @@ -199,6 +203,13 @@ func (m *MeshConfig) GetDisablePolicyChecks() bool { return false } +func (m *MeshConfig) GetPolicyCheckFailOpen() bool { + if m != nil { + return m.PolicyCheckFailOpen + } + return false +} + func (m *MeshConfig) GetProxyListenPort() int32 { if m != nil { return m.ProxyListenPort @@ -502,6 +513,18 @@ func (m *MeshConfig) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintConfig(dAtA, i, uint64(len(m.AccessLogFormat))) i += copy(dAtA[i:], m.AccessLogFormat) } + if m.PolicyCheckFailOpen { + dAtA[i] = 0xc8 + i++ + dAtA[i] = 0x1 + i++ + if m.PolicyCheckFailOpen { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } return i, nil } @@ -617,6 +640,9 @@ func (m *MeshConfig) Size() (n int) { if l > 0 { n += 2 + l + sovConfig(uint64(l)) } + if m.PolicyCheckFailOpen { + n += 3 + } return n } @@ -1132,6 +1158,26 @@ func (m *MeshConfig) Unmarshal(dAtA []byte) error { } m.AccessLogFormat = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyCheckFailOpen", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConfig + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.PolicyCheckFailOpen = bool(v != 0) default: iNdEx = preIndex skippy, err := skipConfig(dAtA[iNdEx:]) @@ -1373,56 +1419,58 @@ var ( func init() { proto.RegisterFile("mesh/v1alpha1/config.proto", fileDescriptorConfig) } var fileDescriptorConfig = []byte{ - // 814 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x5d, 0x4f, 0xe4, 0x36, - 0x14, 0xdd, 0xc0, 0x2c, 0x64, 0xef, 0x7c, 0x05, 0x4f, 0x61, 0xbd, 0x54, 0xa2, 0x53, 0xaa, 0xd2, - 0x11, 0xaa, 0x32, 0xda, 0x41, 0x7d, 0xe8, 0x23, 0x0c, 0x4b, 0x97, 0xd1, 0xb0, 0xa0, 0x24, 0xbc, - 0xf4, 0xc5, 0x0a, 0x89, 0x49, 0x2c, 0x32, 0x71, 0x64, 0x3b, 0xdb, 0xdd, 0x7f, 0xd8, 0xc7, 0xfe, - 0x84, 0x8a, 0x1f, 0xd1, 0xe7, 0x2a, 0xb6, 0x07, 0x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ff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x12, 0xda, 0x0b, 0xab, 0xb8, 0x05, 0x00, 0x00, + // 838 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xdd, 0x4e, 0x23, 0x37, + 0x18, 0xdd, 0x81, 0x2c, 0x84, 0x2f, 0x7f, 0x83, 0x53, 0x58, 0x43, 0x25, 0x9a, 0x52, 0x95, 0x46, + 0xa8, 0x9a, 0x68, 0x83, 0x7a, 0xd1, 0x4b, 0x08, 0x9b, 0x2e, 0x51, 0x58, 0xd0, 0x64, 0xb8, 0xe9, + 0x8d, 0x35, 0xcc, 0x38, 0x33, 0x16, 0x8e, 0x3d, 0x1a, 0x7b, 0xb6, 0xbb, 0xcf, 0xd4, 0x17, 0xe9, + 0x65, 0x1f, 0xa1, 0xe2, 0x49, 0xaa, 0xb1, 0x27, 0x24, 0x48, 0x91, 0xf6, 0xd2, 0xe7, 0x1c, 0xfb, + 0x3b, 0xfe, 0xce, 0x67, 0xc3, 0xf1, 0x82, 0xaa, 0x74, 0xf0, 0xf9, 0x7d, 0xc8, 0xb3, 0x34, 0x7c, + 0x3f, 0x88, 0xa4, 0x98, 0xb3, 0xc4, 0xcb, 0x72, 0xa9, 0x25, 0xea, 0x32, 0xa5, 0x99, 0xf4, 0x4a, + 0x85, 0xb7, 0x54, 0x1c, 0x9f, 0x24, 0x52, 0x26, 0x9c, 0x0e, 0x8c, 0xe4, 0xb1, 0x98, 0x0f, 0xe2, + 0x22, 0x0f, 0x35, 0x93, 0xc2, 0x6e, 0x3a, 0x3e, 0x7a, 0x7d, 0x60, 0x96, 0xcb, 0x2f, 0x5f, 0x2b, + 0xea, 0x5c, 0x50, 0xfd, 0x97, 0xcc, 0x9f, 0x98, 0x48, 0x96, 0x82, 0x8b, 0x41, 0x4c, 0x95, 0x66, + 0xc2, 0x9c, 0x40, 0xf2, 0x82, 0x53, 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x67, 0x52, 0xab, 0x37, 0xdc, 0xe6, 0xa4, 0x56, 0xef, + 0xb8, 0xee, 0xa4, 0x56, 0x77, 0xdd, 0xfd, 0x49, 0xad, 0xbe, 0xef, 0xa2, 0x49, 0xad, 0x8e, 0xdc, + 0xee, 0xa4, 0x56, 0x3f, 0x70, 0x0f, 0x4f, 0x15, 0x34, 0xd7, 0x7b, 0x87, 0x30, 0xec, 0x86, 0x71, + 0x5c, 0xda, 0xaa, 0xfe, 0xa8, 0xe5, 0x12, 0xdd, 0x40, 0x53, 0xf3, 0xf2, 0xd5, 0x69, 0xcd, 0x44, + 0xa2, 0xcc, 0x9f, 0xd4, 0x18, 0x9e, 0x55, 0x71, 0xac, 0x3e, 0xc8, 0x65, 0x28, 0x17, 0x5e, 0x30, + 0x9d, 0xcd, 0x2a, 0xb5, 0xdf, 0xd0, 0x5c, 0x2d, 0x17, 0x57, 0xfd, 0x7f, 0x9e, 0x4f, 0x9c, 0x7f, + 0x9f, 0x4f, 0x9c, 0xff, 0x9e, 0x4f, 0x9c, 0x3f, 0x8f, 0xed, 0x09, 0x4c, 0x0e, 0xc2, 0x8c, 0x0d, + 0x5e, 0x7d, 0xc2, 0x8f, 0x3b, 0xe6, 0xdb, 0xb8, 0xf8, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x5f, + 0x27, 0x27, 0xed, 0x05, 0x00, 0x00, } diff --git a/mesh/v1alpha1/config.proto b/mesh/v1alpha1/config.proto index 997669f648..4ed253bc91 100644 --- a/mesh/v1alpha1/config.proto +++ b/mesh/v1alpha1/config.proto @@ -56,6 +56,11 @@ message MeshConfig { // is false, i.e. mixer policy check is enabled by default. bool disable_policy_checks = 3; + // Allow all traffic in cases when the mixer policy service cannot be reached. + // Default is false which means the traffic is denied when the client is unable + // to connect to Mixer. + bool policy_check_fail_open = 25; + // Port on which Envoy should listen for incoming connections from // other services. int32 proxy_listen_port = 4; @@ -153,7 +158,7 @@ message MeshConfig { bool enable_sds_token_mount = 23; // $hide_from_docs - // Next available field number: 25 + // Next available field number: 26 } // ConfigSource describes information about a configuration store inside a diff --git a/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html b/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html index c8e07f12bf..c78edc388d 100644 --- a/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html +++ b/mesh/v1alpha1/istio.mesh.v1alpha1.pb.html @@ -136,6 +136,16 @@

MeshConfig

Disable policy checks by the mixer service. Default is false, i.e. mixer policy check is enabled by default.

+ + + +policyCheckFailOpen +bool + +

Allow all traffic in cases when the mixer policy service cannot be reached. +Default is false which means the traffic is denied when the client is unable +to connect to Mixer.

+ diff --git a/python/istio_api/mesh/v1alpha1/config_pb2.py b/python/istio_api/mesh/v1alpha1/config_pb2.py index 98825c8ae9..0d32c45cae 100644 --- a/python/istio_api/mesh/v1alpha1/config_pb2.py +++ b/python/istio_api/mesh/v1alpha1/config_pb2.py @@ -22,7 +22,7 @@ name='mesh/v1alpha1/config.proto', package='istio.mesh.v1alpha1', syntax='proto3', - serialized_pb=_b('\n\x1amesh/v1alpha1/config.proto\x12\x13istio.mesh.v1alpha1\x1a\x1egoogle/protobuf/duration.proto\x1a\x19mesh/v1alpha1/proxy.proto\x1a*networking/v1alpha3/destination_rule.proto\"\xc0\x06\n\nMeshConfig\x12\x1a\n\x12mixer_check_server\x18\x01 \x01(\t\x12\x1b\n\x13mixer_report_server\x18\x02 \x01(\t\x12\x1d\n\x15\x64isable_policy_checks\x18\x03 \x01(\x08\x12\x19\n\x11proxy_listen_port\x18\x04 \x01(\x05\x12\x17\n\x0fproxy_http_port\x18\x05 \x01(\x05\x12\x32\n\x0f\x63onnect_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\ringress_class\x18\x07 \x01(\t\x12\x17\n\x0fingress_service\x18\x08 \x01(\t\x12V\n\x17ingress_controller_mode\x18\t \x01(\x0e\x32\x35.istio.mesh.v1alpha1.MeshConfig.IngressControllerMode\x12\x43\n\x0b\x61uth_policy\x18\n \x01(\x0e\x32*.istio.mesh.v1alpha1.MeshConfig.AuthPolicyB\x02\x18\x01\x12\x16\n\x0e\x65nable_tracing\x18\x0c \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ss_log_file\x18\r \x01(\t\x12\x19\n\x11\x61\x63\x63\x65ss_log_format\x18\x18 \x01(\t\x12\x38\n\x0e\x64\x65\x66\x61ult_config\x18\x0e \x01(\x0b\x32 .istio.mesh.v1alpha1.ProxyConfig\x12\'\n\x1f\x65nable_client_side_policy_check\x18\x13 \x01(\x08\x12\x14\n\x0csds_uds_path\x18\x14 \x01(\t\x12\x39\n\x0e\x63onfig_sources\x18\x16 \x03(\x0b\x32!.istio.mesh.v1alpha1.ConfigSource\x12\x1e\n\x16\x65nable_sds_token_mount\x18\x17 \x01(\x08\"9\n\x15IngressControllerMode\x12\x07\n\x03OFF\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06STRICT\x10\x02\"&\n\nAuthPolicy\x12\x08\n\x04NONE\x10\x00\x12\x0e\n\nMUTUAL_TLS\x10\x01J\x04\x08\x0b\x10\x0cJ\x04\x08\x0f\x10\x10J\x04\x08\x10\x10\x11J\x04\x08\x11\x10\x12J\x04\x08\x12\x10\x13J\x04\x08\x15\x10\x16\"]\n\x0c\x43onfigSource\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12<\n\x0ctls_settings\x18\x02 \x01(\x0b\x32&.istio.networking.v1alpha3.TLSSettingsB\x1cZ\x1aistio.io/api/mesh/v1alpha1b\x06proto3') + serialized_pb=_b('\n\x1amesh/v1alpha1/config.proto\x12\x13istio.mesh.v1alpha1\x1a\x1egoogle/protobuf/duration.proto\x1a\x19mesh/v1alpha1/proxy.proto\x1a*networking/v1alpha3/destination_rule.proto\"\xe0\x06\n\nMeshConfig\x12\x1a\n\x12mixer_check_server\x18\x01 \x01(\t\x12\x1b\n\x13mixer_report_server\x18\x02 \x01(\t\x12\x1d\n\x15\x64isable_policy_checks\x18\x03 \x01(\x08\x12\x1e\n\x16policy_check_fail_open\x18\x19 \x01(\x08\x12\x19\n\x11proxy_listen_port\x18\x04 \x01(\x05\x12\x17\n\x0fproxy_http_port\x18\x05 \x01(\x05\x12\x32\n\x0f\x63onnect_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\ringress_class\x18\x07 \x01(\t\x12\x17\n\x0fingress_service\x18\x08 \x01(\t\x12V\n\x17ingress_controller_mode\x18\t \x01(\x0e\x32\x35.istio.mesh.v1alpha1.MeshConfig.IngressControllerMode\x12\x43\n\x0b\x61uth_policy\x18\n \x01(\x0e\x32*.istio.mesh.v1alpha1.MeshConfig.AuthPolicyB\x02\x18\x01\x12\x16\n\x0e\x65nable_tracing\x18\x0c \x01(\x08\x12\x17\n\x0f\x61\x63\x63\x65ss_log_file\x18\r \x01(\t\x12\x19\n\x11\x61\x63\x63\x65ss_log_format\x18\x18 \x01(\t\x12\x38\n\x0e\x64\x65\x66\x61ult_config\x18\x0e \x01(\x0b\x32 .istio.mesh.v1alpha1.ProxyConfig\x12\'\n\x1f\x65nable_client_side_policy_check\x18\x13 \x01(\x08\x12\x14\n\x0csds_uds_path\x18\x14 \x01(\t\x12\x39\n\x0e\x63onfig_sources\x18\x16 \x03(\x0b\x32!.istio.mesh.v1alpha1.ConfigSource\x12\x1e\n\x16\x65nable_sds_token_mount\x18\x17 \x01(\x08\"9\n\x15IngressControllerMode\x12\x07\n\x03OFF\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\n\n\x06STRICT\x10\x02\"&\n\nAuthPolicy\x12\x08\n\x04NONE\x10\x00\x12\x0e\n\nMUTUAL_TLS\x10\x01J\x04\x08\x0b\x10\x0cJ\x04\x08\x0f\x10\x10J\x04\x08\x10\x10\x11J\x04\x08\x11\x10\x12J\x04\x08\x12\x10\x13J\x04\x08\x15\x10\x16\"]\n\x0c\x43onfigSource\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12<\n\x0ctls_settings\x18\x02 \x01(\x0b\x32&.istio.networking.v1alpha3.TLSSettingsB\x1cZ\x1aistio.io/api/mesh/v1alpha1b\x06proto3') , dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,mesh_dot_v1alpha1_dot_proxy__pb2.DESCRIPTOR,networking_dot_v1alpha3_dot_destination__rule__pb2.DESCRIPTOR,]) @@ -49,8 +49,8 @@ ], containing_type=None, options=None, - serialized_start=854, - serialized_end=911, + serialized_start=886, + serialized_end=943, ) _sym_db.RegisterEnumDescriptor(_MESHCONFIG_INGRESSCONTROLLERMODE) @@ -71,8 +71,8 @@ ], containing_type=None, options=None, - serialized_start=913, - serialized_end=951, + serialized_start=945, + serialized_end=983, ) _sym_db.RegisterEnumDescriptor(_MESHCONFIG_AUTHPOLICY) @@ -106,105 +106,112 @@ is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='proxy_listen_port', full_name='istio.mesh.v1alpha1.MeshConfig.proxy_listen_port', index=3, + name='policy_check_fail_open', full_name='istio.mesh.v1alpha1.MeshConfig.policy_check_fail_open', index=3, + number=25, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='proxy_listen_port', full_name='istio.mesh.v1alpha1.MeshConfig.proxy_listen_port', index=4, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='proxy_http_port', full_name='istio.mesh.v1alpha1.MeshConfig.proxy_http_port', index=4, + name='proxy_http_port', full_name='istio.mesh.v1alpha1.MeshConfig.proxy_http_port', index=5, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='connect_timeout', full_name='istio.mesh.v1alpha1.MeshConfig.connect_timeout', index=5, + name='connect_timeout', full_name='istio.mesh.v1alpha1.MeshConfig.connect_timeout', index=6, number=6, 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), _descriptor.FieldDescriptor( - name='ingress_class', full_name='istio.mesh.v1alpha1.MeshConfig.ingress_class', index=6, + name='ingress_class', full_name='istio.mesh.v1alpha1.MeshConfig.ingress_class', index=7, number=7, 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='ingress_service', full_name='istio.mesh.v1alpha1.MeshConfig.ingress_service', index=7, + name='ingress_service', full_name='istio.mesh.v1alpha1.MeshConfig.ingress_service', index=8, number=8, 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='ingress_controller_mode', full_name='istio.mesh.v1alpha1.MeshConfig.ingress_controller_mode', index=8, + name='ingress_controller_mode', full_name='istio.mesh.v1alpha1.MeshConfig.ingress_controller_mode', index=9, number=9, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='auth_policy', full_name='istio.mesh.v1alpha1.MeshConfig.auth_policy', index=9, + name='auth_policy', full_name='istio.mesh.v1alpha1.MeshConfig.auth_policy', index=10, number=10, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='enable_tracing', full_name='istio.mesh.v1alpha1.MeshConfig.enable_tracing', index=10, + name='enable_tracing', full_name='istio.mesh.v1alpha1.MeshConfig.enable_tracing', index=11, number=12, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='access_log_file', full_name='istio.mesh.v1alpha1.MeshConfig.access_log_file', index=11, + name='access_log_file', full_name='istio.mesh.v1alpha1.MeshConfig.access_log_file', index=12, number=13, 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='access_log_format', full_name='istio.mesh.v1alpha1.MeshConfig.access_log_format', index=12, + name='access_log_format', full_name='istio.mesh.v1alpha1.MeshConfig.access_log_format', index=13, number=24, 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='default_config', full_name='istio.mesh.v1alpha1.MeshConfig.default_config', index=13, + name='default_config', full_name='istio.mesh.v1alpha1.MeshConfig.default_config', index=14, number=14, 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), _descriptor.FieldDescriptor( - name='enable_client_side_policy_check', full_name='istio.mesh.v1alpha1.MeshConfig.enable_client_side_policy_check', index=14, + name='enable_client_side_policy_check', full_name='istio.mesh.v1alpha1.MeshConfig.enable_client_side_policy_check', index=15, number=19, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='sds_uds_path', full_name='istio.mesh.v1alpha1.MeshConfig.sds_uds_path', index=15, + name='sds_uds_path', full_name='istio.mesh.v1alpha1.MeshConfig.sds_uds_path', index=16, number=20, 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='config_sources', full_name='istio.mesh.v1alpha1.MeshConfig.config_sources', index=16, + name='config_sources', full_name='istio.mesh.v1alpha1.MeshConfig.config_sources', index=17, number=22, 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), _descriptor.FieldDescriptor( - name='enable_sds_token_mount', full_name='istio.mesh.v1alpha1.MeshConfig.enable_sds_token_mount', index=17, + name='enable_sds_token_mount', full_name='istio.mesh.v1alpha1.MeshConfig.enable_sds_token_mount', index=18, number=23, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, @@ -225,7 +232,7 @@ oneofs=[ ], serialized_start=155, - serialized_end=987, + serialized_end=1019, ) @@ -262,8 +269,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=989, - serialized_end=1082, + serialized_start=1021, + serialized_end=1114, ) _MESHCONFIG.fields_by_name['connect_timeout'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION