Skip to content

Conversation

@laz-canva
Copy link

@laz-canva laz-canva commented Oct 22, 2025

Problem

When using xDS with Istio's grpc-agent in proxyless mode, Java gRPC fails with:

LDS response Listener validation error: 
tls_certificate_provider_instance is required in downstream-tls-context

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:

  1. Field 11: tls_certificate_certificate_provider_instance (deprecated) instead of field 14 (tls_certificate_provider_instance)
  2. Field 4: validation_context_certificate_provider_instance in CombinedValidationContext (deprecated) instead of ca_certificate_provider_instance in default_validation_context

Fix

Add fallback logic to support deprecated certificate provider fields:

For identity certificates:

  1. Try current field 14 (tls_certificate_provider_instance) first
  2. Fall back to deprecated field 11 (tls_certificate_certificate_provider_instance)

For validation context in CombinedValidationContext:

  1. Try ca_certificate_provider_instance in default_validation_context first
  2. Fall back to deprecated field 4 (validation_context_certificate_provider_instance)

This matches the behavior of grpc-cpp and grpc-go implementations.

Testing

  • Added new tests for both deprecated field paths (field 11 and field 4)
  • All existing tests pass
  • Manual local testing with Istio in proxyless mode verified the compatibility fix works

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 22, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

… 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>
@laz-canva laz-canva force-pushed the istio-tls-backwards-compat branch from 0aa24a0 to f142fa1 Compare October 23, 2025 07:55
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.
@laz-canva laz-canva changed the title xds: Support deprecated tls_certificate_certificate_provider_instance field (istio compat) xds: Support deprecated xDS TLS fields for Istio compat Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants