Skip to content

Commit 95a75d5

Browse files
committed
enable ALTS bound token (for DirectPath) in the grpc channel provider
1 parent 971ca5d commit 95a75d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcStorageOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import com.google.api.gax.rpc.internal.QuotaProjectIdHidingCredentials;
4343
import com.google.api.pathtemplate.PathTemplate;
4444
import com.google.auth.Credentials;
45+
import com.google.auth.oauth2.ComputeEngineCredentials;
4546
import com.google.cloud.NoCredentials;
4647
import com.google.cloud.ServiceFactory;
4748
import com.google.cloud.ServiceOptions;
@@ -291,7 +292,8 @@ private Tuple<StorageSettings, Opts<UserProject>> resolveSettingsAndOpts() throw
291292
InstantiatingGrpcChannelProvider.newBuilder()
292293
.setEndpoint(endpoint)
293294
.setAllowNonDefaultServiceAccount(true)
294-
.setAttemptDirectPath(attemptDirectPath);
295+
.setAttemptDirectPath(attemptDirectPath)
296+
.setAllowHardBoundTokenTypes(Arrays.asList(InstantiatingGrpcChannelProvider.HardBoundTokenTypes.ALTS));
295297

296298
if (!NoopGrpcInterceptorProvider.INSTANCE.equals(grpcInterceptorProvider)) {
297299
channelProviderBuilder.setInterceptorProvider(grpcInterceptorProvider);

0 commit comments

Comments
 (0)