Skip to content

Commit aac79d0

Browse files
committed
enable ALTS bound token (for DirectPath) in the grpc channel provider
1 parent a5c27b7 commit aac79d0

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
@@ -50,6 +50,7 @@
5050
import com.google.api.gax.tracing.ApiTracerFactory;
5151
import com.google.api.pathtemplate.PathTemplate;
5252
import com.google.auth.Credentials;
53+
import com.google.auth.oauth2.ComputeEngineCredentials;
5354
import com.google.cloud.NoCredentials;
5455
import com.google.cloud.ServiceFactory;
5556
import com.google.cloud.ServiceOptions;
@@ -318,7 +319,8 @@ private Tuple<StorageSettings, Opts<UserProject>> resolveSettingsAndOpts() throw
318319
InstantiatingGrpcChannelProvider.newBuilder()
319320
.setEndpoint(endpoint)
320321
.setAllowNonDefaultServiceAccount(true)
321-
.setAttemptDirectPath(attemptDirectPath);
322+
.setAttemptDirectPath(attemptDirectPath)
323+
.setAllowHardBoundTokenTypes(Arrays.asList(InstantiatingGrpcChannelProvider.HardBoundTokenTypes.ALTS));
322324

323325
if (!NoopGrpcInterceptorProvider.INSTANCE.equals(grpcInterceptorProvider)) {
324326
channelProviderBuilder.setInterceptorProvider(grpcInterceptorProvider);

0 commit comments

Comments
 (0)