From e1323e46d162b2675a8a0ef89e73e4987557e3bd Mon Sep 17 00:00:00 2001 From: Sanjay Pujare Date: Wed, 2 Oct 2019 08:32:10 -0700 Subject: [PATCH] xds: Add tlsCertificate and certificateValidationContext attributes to XdsAttributes: needed for passing those values to the SDS component --- .../main/java/io/grpc/xds/XdsAttributes.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xds/src/main/java/io/grpc/xds/XdsAttributes.java b/xds/src/main/java/io/grpc/xds/XdsAttributes.java index cca550df68..20ba4eb319 100644 --- a/xds/src/main/java/io/grpc/xds/XdsAttributes.java +++ b/xds/src/main/java/io/grpc/xds/XdsAttributes.java @@ -16,7 +16,9 @@ package io.grpc.xds; +import io.envoyproxy.envoy.api.v2.auth.CertificateValidationContext; import io.envoyproxy.envoy.api.v2.auth.SdsSecretConfig; +import io.envoyproxy.envoy.api.v2.auth.TlsCertificate; import io.grpc.Attributes; import io.grpc.Grpc; @@ -26,11 +28,24 @@ import io.grpc.Grpc; final class XdsAttributes { /** * Attribute key for SdsSecretConfig of a subchannel. - * */ @Grpc.TransportAttr public static final Attributes.Key ATTR_SDS_CONFIG = Attributes.Key.create("io.grpc.xds.XdsAttributes.sdsSecretConfig"); + /** + * Attribute key for TlsCertificate of a subchannel. + */ + @Grpc.TransportAttr + public static final Attributes.Key ATTR_TLS_CERTIFICATE = + Attributes.Key.create("io.grpc.xds.XdsAttributes.tlsCertificate"); + + /** + * Attribute key for CertificateValidationContext of a subchannel. + */ + @Grpc.TransportAttr + public static final Attributes.Key ATTR_CERT_VALIDATION_CONTEXT = + Attributes.Key.create("io.grpc.xds.XdsAttributes.certificateValidationContext"); + private XdsAttributes() {} }