GRPC Core
18.0.0
|
#include <grpc/support/port_platform.h>
#include "src/core/lib/security/credentials/credentials.h"
#include <string.h>
#include "absl/strings/match.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h"
#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/http/httpcli.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/security/credentials/alts/alts_credentials.h"
#include "src/core/lib/security/credentials/alts/check_gcp_environment.h"
#include "src/core/lib/security/credentials/external/external_account_credentials.h"
#include "src/core/lib/security/credentials/google_default/google_default_credentials.h"
#include "src/core/lib/security/credentials/jwt/jwt_credentials.h"
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/lib/surface/api_trace.h"
Data Structures | |
struct | metadata_server_detector |
Namespaces | |
grpc_core | |
Round Robin Policy. | |
grpc_core::internal | |
Macros | |
#define | GRPC_COMPUTE_ENGINE_DETECTION_HOST "metadata.google.internal." |
#define | GRPC_GOOGLE_CREDENTIAL_CREATION_ERROR "Failed to create Google credentials" |
Functions | |
grpc_channel_credentials * | grpc_google_default_credentials_create (grpc_call_credentials *call_credentials) |
Creates default credentials to connect to a google gRPC service. More... | |
void | grpc_core::internal::set_gce_tenancy_checker_for_testing (grpc_gce_tenancy_checker checker) |
void | grpc_core::internal::grpc_flush_cached_google_default_credentials (void) |
std::string | grpc_get_well_known_google_credentials_file_path (void) |
void | grpc_override_well_known_credentials_path_getter (grpc_well_known_credentials_path_getter getter) |
#define GRPC_COMPUTE_ENGINE_DETECTION_HOST "metadata.google.internal." |
#define GRPC_GOOGLE_CREDENTIAL_CREATION_ERROR "Failed to create Google credentials" |
std::string grpc_get_well_known_google_credentials_file_path | ( | void | ) |
grpc_channel_credentials* grpc_google_default_credentials_create | ( | grpc_call_credentials * | call_credentials | ) |
Creates default credentials to connect to a google gRPC service.
WARNING: Do NOT use this credentials to connect to a non-google service as this could result in an oauth2 token leak. The security level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY.
If specified, the supplied call credentials object will be attached to the returned channel credentials object. The call_credentials object must remain valid throughout the lifetime of the returned grpc_channel_credentials object. It is expected that the call credentials object was generated according to the Application Default Credentials mechanism and asserts the identity of the default service account of the machine. Supplying any other sort of call credential will result in undefined behavior, up to and including the sudden and unexpected failure of RPCs.
If nullptr is supplied, the returned channel credentials object will use a call credentials object based on the Application Default Credentials mechanism.
void grpc_override_well_known_credentials_path_getter | ( | grpc_well_known_credentials_path_getter | getter | ) |