Skip to content
Permalink
Browse files
fix: never use credentials in combination with plain text (#98)
  • Loading branch information
olavloite committed Mar 13, 2020
1 parent e96e172 commit 7eb8d49cd6c35d7f757cb89009ad16be601b77c3
Showing with 3 additions and 0 deletions.
  1. +3 −0 google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
@@ -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;
@@ -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);
}

0 comments on commit 7eb8d49

Please sign in to comment.