- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.9k
xds: Support deprecated xDS TLS fields for Istio compat #12435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… field Add backward compatibility for deprecated certificate provider field 11 (tls_certificate_certificate_provider_instance) by falling back to it when field 14 (tls_certificate_provider_instance) is not present. This matches the behavior of grpc-go and grpc-cpp, enabling compatibility with Istio which sends the deprecated field for backward compatibility with older Envoy versions. Amp-Thread-ID: https://ampcode.com/threads/T-a71beee4-6f09-48fb-a8f8-9f2e09c1623f Co-authored-by: Amp <amp@ampcode.com>
0aa24a0    to
    f142fa1      
    Compare
  
            
          
                ...src/main/java/io/grpc/xds/internal/security/certprovider/CertProviderSslContextProvider.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
      Add @SuppressWarnings("deprecation") to test helper that intentionally uses deprecated field to verify backward compatibility.
Add fallback to deprecated validation_context_certificate_provider_instance (field 4) in CombinedValidationContext for Istio compatibility.
| 
 Why isn't the fix here "send both the old and new fields in Istio"? Just because older Envoys need it doesn't mean you can't include the newer field. I think these fields were removed in 65d0bb8 . Basically, these should never have been used in production in gRPC. The only reason to add them back is to give time for Istio to update their fields. Is that happening? | 
Problem
When using xDS with Istio's grpc-agent in proxyless mode, Java gRPC fails with:
Root Cause:
Istio sends deprecated certificate provider fields for backward compatibility with older Envoy versions. Java gRPC currently only reads the current fields, causing validation failures.
Specifically, Istio uses these deprecated fields:
tls_certificate_certificate_provider_instance(deprecated) instead of field 14 (tls_certificate_provider_instance)validation_context_certificate_provider_instanceinCombinedValidationContext(deprecated) instead ofca_certificate_provider_instanceindefault_validation_contextFix
Add fallback logic to support deprecated certificate provider fields:
For identity certificates:
tls_certificate_provider_instance) firsttls_certificate_certificate_provider_instance)For validation context in CombinedValidationContext:
ca_certificate_provider_instanceindefault_validation_contextfirstvalidation_context_certificate_provider_instance)This matches the behavior of grpc-cpp and grpc-go implementations.
Testing