Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit 2b0f2ff

Browse files
authored
feat: enable ALTS hard bound token in DirectPath (#3904)
1 parent 0906eac commit 2b0f2ff

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,10 @@ public GapicSpannerRpc(final SpannerOptions options) {
368368
boolean isAttemptDirectPathXds = isEnableDirectPathXdsEnv();
369369
if (isAttemptDirectPathXds) {
370370
defaultChannelProviderBuilder.setAttemptDirectPath(true);
371+
// This will let the credentials try to fetch a hard-bound access token if the runtime
372+
// environment supports it.
373+
defaultChannelProviderBuilder.setAllowHardBoundTokenTypes(
374+
Collections.singletonList(InstantiatingGrpcChannelProvider.HardBoundTokenTypes.ALTS));
371375
defaultChannelProviderBuilder.setAttemptDirectPathXds();
372376
}
373377

0 commit comments

Comments
 (0)