Merge pull request #16024 from apolcyn/gcd_interop

Allow choosing google default credentials in the C++ interop clients
pull/16029/head
apolcyn 6 years ago committed by GitHub
commit 5fec6640e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/cpp/util/test_credentials_provider.cc
  2. 1
      test/cpp/util/test_credentials_provider.h

@ -63,6 +63,8 @@ class DefaultCredentialsProvider : public CredentialsProvider {
SslCredentialsOptions ssl_opts = {test_root_cert, "", ""};
args->SetSslTargetNameOverride("foo.test.google.fr");
return SslCredentials(ssl_opts);
} else if (type == grpc::testing::kGoogleDefaultCredentialsType) {
return grpc::GoogleDefaultCredentials();
} else {
std::unique_lock<std::mutex> lock(mu_);
auto it(std::find(added_secure_type_names_.begin(),

@ -33,6 +33,7 @@ const char kInsecureCredentialsType[] = "INSECURE_CREDENTIALS";
// property "transport_security_type".
const char kTlsCredentialsType[] = "ssl";
const char kAltsCredentialsType[] = "alts";
const char kGoogleDefaultCredentialsType[] = "google_default_credentials";
// Provide test credentials of a particular type.
class CredentialTypeProvider {

Loading…
Cancel
Save