Google Cloud C++ Client
2.2.1
C++ Client Library for Google Cloud Platform
|
The public interface for Google's Unified Auth Client (GUAC) library. More...
#include <google/cloud/credentials.h>
Public Member Functions | |
virtual | ~Credentials ()=0 |
The public interface for Google's Unified Auth Client (GUAC) library.
The Unified Auth Client library allows C++ applications to configure authentication for both REST-based and gRPC-based client libraries. The library public interface is (intentionally) very narrow. Applications describe the type of authentication they want, the libraries used this description to initialize the internal components used in the authentication flows.
A complete overview of authentication and authorization for Google Cloud is outside the scope of this reference guide. We recommend the IAM overview instead. The following brief introduction may help as you read the reference documentation for components related to authentication:
Credentials
class and the factory functions that create std::shared_ptr<Credentials>
objects are related to authentication. That is they allow you to define what principal is making RPCs to GCP.GoogleDefaultCredentials()
. This allows your administrator to configure the service account used in your workload by setting the default service account in the GCP environment where your application is deployed (e.g. GCE, GKE, or Cloud Run).GoogleDefaultCredentials()
uses the GOOGLE_APPLICATION_CREDENTIALS
environment variable to load an alternative service account key. The value of this environment variable is the full path of a file which contains the service account key.GOOGLE_APPLICATION_CREDENTIALS
is not set then GoogleDefaultCredentials()
will use the account configured via gcloud auth application-default login
. This can be either a service account or a Google Account, such as the developer's account.google auth application-default
nor GOOGLE_APPLICATION_CREDENTIALS
are recommended for production workloads.Definition at line 94 of file credentials.h.
|
pure virtual |