fix: Only send mtlsEndpoint if it is non-null (#3767) · googleapis/sdk-platform-java@8f8df7b · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit 8f8df7b

Browse files
authored
fix: Only send mtlsEndpoint if it is non-null (#3767)
Temporary fix to only plumb the mtlsEndpoint to the gRPCChannelProviders if this has been set with a non-null value. Validation will still go through if it is set with bogus values. Issue reported in googleapis/java-bigtable#2565 This seems to due to how Bigtable wrappers the generated stubs. BigTable manually calls setEndpoint to for the StubSettings, but does not do the equivalent for setMtlsEndpoint. The EndpointContext is only aware of the TLS endpoint and passes a null value to the ChannelProviders. Potential longer term fix: BigTable's wrappers would need to set the mTLS Endpoint. This would be needed for BigTable to support S2A. This does not impact any of BigTable's existing functionality as the endpoint resolution for all non-S2A flows is done via `setEndpoint()`.
1 parent 406a180 commit 8f8df7b

File tree

2 files changed

+132
-41
lines changed

2 files changed

+132
-41
lines changed

gax-java/gax/src/main/java/com/google/api/gax/rpc/ClientContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public static ClientContext create(StubSettings settings) throws IOException {
223223
transportChannelProvider = transportChannelProvider.withEndpoint(endpoint);
224224
}
225225
transportChannelProvider = transportChannelProvider.withUseS2A(endpointContext.useS2A());
226-
if (transportChannelProvider.needsMtlsEndpoint()) {
226+
if (transportChannelProvider.needsMtlsEndpoint() && endpointContext.mtlsEndpoint() != null) {
227227
transportChannelProvider =
228228
transportChannelProvider.withMtlsEndpoint(endpointContext.mtlsEndpoint());
229229
}

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.