fix custom sni in bootstrap clusters properly#28565
fix custom sni in bootstrap clusters properly#28565istio-testing merged 5 commits intoistio:masterfrom
Conversation
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
| tlsContext.CommonTlsContext.AlpnProtocols = util.ALPNInMeshH2 | ||
| // For ISTIO_MUTUAL if custom SNI is not provided, use the default SNI name. | ||
| if len(tls.Sni) == 0 { | ||
| tlsContext.Sni = sniName |
There was a problem hiding this comment.
why do the other types use tls.Sni but here we use sniName?
There was a problem hiding this comment.
Good catch we have to set tls.Sni if it exists and if it does not exist for ISTIO_MUTUAL we will have to set the default SNI name. This was existing implementation
There was a problem hiding this comment.
Looks like for ISTIO_MUTUAL we only honor the sniName not the ones given in tls.Sni. So the existing implementation is correct.
There was a problem hiding this comment.
Ignore the above. I corrected the code. If tls.Sni exists we use it otherwise use the default sniName. All tests are passing now. PTAL
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
|
/test integ-pilot-k8s-tests_istio |
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
|
/test integ-pilot-k8s-tests_istio |
| { | ||
| "name": "zipkin", | ||
| "transport_socket": {"name":"envoy.transport_sockets.tls","typed_config":{"@type":"type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext","common_tls_context":{"combined_validation_context":{"default_validation_context":{},"validation_context_sds_secret_config":{"name":"file-root:/etc/zipkin/ca.pem","sds_config":{"api_config_source":{"api_type":"GRPC","grpc_services":[{"envoy_grpc":{"cluster_name":"sds-grpc"}}],"transport_api_version":"V3"},"resource_api_version":"V3"}}}}}}, | ||
| "transport_socket": {"name":"envoy.transport_sockets.tls","typed_config":{"@type":"type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", "sni":"zipkin-custom-sni", "common_tls_context":{"combined_validation_context":{"default_validation_context":{},"validation_context_sds_secret_config":{"name":"file-root:/etc/zipkin/ca.pem","sds_config":{"api_config_source":{"api_type":"GRPC","grpc_services":[{"envoy_grpc":{"cluster_name":"sds-grpc"}}],"transport_api_version":"V3"},"resource_api_version":"V3"}}}}}}, |
|
@howardjohn Can you PTAL when you get chance? |
|
/test integ-pilot-k8s-tests_istio |
* fix custom sni properly Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * remove unnecessary code Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * fix istio mutual tls Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * revert istio mutual tls Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * try setting again Signed-off-by: Rama Chavali <rama.rao@salesforce.com> Co-authored-by: Rama Chavali <rama.rao@salesforce.com>
#26684 did not fix the custom sni properly. It did not add it correctly to the upstream tls settings. This PR fixes it.
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ X] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Pull Request Attributes
Please check any characteristics that apply to this pull request.
[X ] Does not have any changes that may affect Istio users.