From 839f1468ae08c9bee8933d31d4ab6a47ec263f60 Mon Sep 17 00:00:00 2001 From: Pubudu Gunatilaka Date: Wed, 28 Feb 2024 16:53:00 +0530 Subject: [PATCH] Fix deprecate message of CertificateValidationContext --- .../internal/oasparser/envoyconf/routes_with_clusters.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/adapter/internal/oasparser/envoyconf/routes_with_clusters.go b/adapter/internal/oasparser/envoyconf/routes_with_clusters.go index fb5e5f4d30..0e4d98a9ce 100644 --- a/adapter/internal/oasparser/envoyconf/routes_with_clusters.go +++ b/adapter/internal/oasparser/envoyconf/routes_with_clusters.go @@ -334,10 +334,13 @@ func CreateRateLimitCluster() (*clusterv3.Cluster, []*corev3.Address, error) { upstreamTLSContext.CommonTlsContext.ValidationContextType = &tlsv3.CommonTlsContext_ValidationContext{ ValidationContext: &tlsv3.CertificateValidationContext{ TrustedCa: trustedCASrc, - MatchSubjectAltNames: []*envoy_type_matcherv3.StringMatcher{ + MatchTypedSubjectAltNames: []*tlsv3.SubjectAltNameMatcher{ { - MatchPattern: &envoy_type_matcherv3.StringMatcher_Exact{ - Exact: sslCertSanHostName, + SanType: tlsv3.SubjectAltNameMatcher_DNS, + Matcher: &envoy_type_matcherv3.StringMatcher{ + MatchPattern: &envoy_type_matcherv3.StringMatcher_Exact{ + Exact: sslCertSanHostName, + }, }, }, },