Skip to content

Commit

Permalink
fix: never use credentials in combination with plain text (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Mar 13, 2020
1 parent e96e172 commit 7eb8d49
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -20,6 +20,7 @@
import com.google.api.gax.grpc.GrpcInterceptorProvider;
import com.google.api.gax.retrying.RetrySettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.cloud.NoCredentials;
import com.google.cloud.ServiceDefaults;
import com.google.cloud.ServiceOptions;
import com.google.cloud.ServiceRpc;
Expand Down Expand Up @@ -518,6 +519,8 @@ public ManagedChannelBuilder apply(ManagedChannelBuilder builder) {
return builder.usePlaintext();
}
});
// As we are using plain text, we should never send any credentials.
this.setCredentials(NoCredentials.getInstance());
}
return new SpannerOptions(this);
}
Expand Down

0 comments on commit 7eb8d49

Please sign in to comment.