Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
src/core/lib/security/credentials/credentials.h File Reference
#include <grpc/support/port_platform.h>
#include <string>
#include <utility>
#include <vector>
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
#include <grpc/grpc_security_constants.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/log.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/promise/arena_promise.h"
#include "src/core/lib/security/security_connector/security_connector.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/transport/transport.h"
Include dependency graph for src/core/lib/security/credentials/credentials.h:

Go to the source code of this file.

Classes

struct  grpc_call_credentials::GetRequestMetadataArgs
 
struct  grpc_call_credentials
 
struct  grpc_channel_credentials
 
struct  grpc_server_credentials
 

Namespaces

 grpc_core
 

Macros

#define GRPC_ARG_CHANNEL_CREDENTIALS   "grpc.internal.channel_credentials"
 
#define GRPC_AUTHORIZATION_METADATA_KEY   "authorization"
 
#define GRPC_COMPUTE_ENGINE_METADATA_HOST   "metadata.google.internal."
 
#define GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH   "/computeMetadata/v1/instance/service-accounts/default/token"
 
#define GRPC_FAKE_TRANSPORT_SECURITY_TYPE   "fake"
 
#define GRPC_GOOGLE_OAUTH2_SERVICE_HOST   "oauth2.googleapis.com"
 
#define GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH   "/token"
 
#define GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY   "x-goog-iam-authority-selector"
 
#define GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY   "x-goog-iam-authorization-token"
 
#define GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING   "client_id=%s&client_secret=%s&refresh_token=%s&grant_type=refresh_token"
 
#define GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS   60
 
#define GRPC_SERVER_CREDENTIALS_ARG   "grpc.server_credentials"
 
#define GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX
 

Typedefs

using grpc_core::CredentialsMetadataArray = std::vector< std::pair< Slice, Slice > >
 
typedef std::string(* grpc_well_known_credentials_path_getter) (void)
 

Enumerations

enum  grpc_credentials_status { GRPC_CREDENTIALS_OK = 0, GRPC_CREDENTIALS_ERROR }
 

Functions

grpc_channel_credentialsgrpc_channel_credentials_find_in_args (const grpc_channel_args *args)
 
grpc_channel_credentialsgrpc_channel_credentials_from_arg (const grpc_arg *arg)
 
grpc_arg grpc_channel_credentials_to_arg (grpc_channel_credentials *credentials)
 
grpc_server_credentialsgrpc_find_server_credentials_in_args (const grpc_channel_args *args)
 
std::string grpc_get_well_known_google_credentials_file_path (void)
 
std::string grpc_get_well_known_google_credentials_file_path_impl (void)
 
grpc_call_credentialsgrpc_md_only_test_credentials_create (const char *md_key, const char *md_value)
 
void grpc_override_well_known_credentials_path_getter (grpc_well_known_credentials_path_getter getter)
 
grpc_server_credentialsgrpc_server_credentials_from_arg (const grpc_arg *arg)
 
grpc_arg grpc_server_credentials_to_arg (grpc_server_credentials *c)
 

Macro Definition Documentation

◆ GRPC_ARG_CHANNEL_CREDENTIALS

#define GRPC_ARG_CHANNEL_CREDENTIALS   "grpc.internal.channel_credentials"

◆ GRPC_AUTHORIZATION_METADATA_KEY

#define GRPC_AUTHORIZATION_METADATA_KEY   "authorization"

◆ GRPC_COMPUTE_ENGINE_METADATA_HOST

#define GRPC_COMPUTE_ENGINE_METADATA_HOST   "metadata.google.internal."

◆ GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH

#define GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH   "/computeMetadata/v1/instance/service-accounts/default/token"

◆ GRPC_FAKE_TRANSPORT_SECURITY_TYPE

#define GRPC_FAKE_TRANSPORT_SECURITY_TYPE   "fake"

◆ GRPC_GOOGLE_OAUTH2_SERVICE_HOST

#define GRPC_GOOGLE_OAUTH2_SERVICE_HOST   "oauth2.googleapis.com"

◆ GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH

#define GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH   "/token"

◆ GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY

#define GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY   "x-goog-iam-authority-selector"

◆ GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY

#define GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY   "x-goog-iam-authorization-token"

◆ GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING

#define GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING   "client_id=%s&client_secret=%s&refresh_token=%s&grant_type=refresh_token"

◆ GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS

#define GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS   60

◆ GRPC_SERVER_CREDENTIALS_ARG

#define GRPC_SERVER_CREDENTIALS_ARG   "grpc.server_credentials"

◆ GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX

#define GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX
Value:
"grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&" \
"assertion="

Definition at line 69 of file src/core/lib/security/credentials/credentials.h.

Typedef Documentation

◆ grpc_well_known_credentials_path_getter

typedef std::string(* grpc_well_known_credentials_path_getter) (void)

Enumeration Type Documentation

◆ grpc_credentials_status

Enumerator
GRPC_CREDENTIALS_OK 
GRPC_CREDENTIALS_ERROR 

Definition at line 48 of file src/core/lib/security/credentials/credentials.h.

Function Documentation

◆ grpc_channel_credentials_find_in_args()

grpc_channel_credentials* grpc_channel_credentials_find_in_args ( const grpc_channel_args args)

Definition at line 83 of file credentials.cc.

◆ grpc_channel_credentials_from_arg()

grpc_channel_credentials* grpc_channel_credentials_from_arg ( const grpc_arg arg)

Definition at line 72 of file credentials.cc.

◆ grpc_channel_credentials_to_arg()

grpc_arg grpc_channel_credentials_to_arg ( grpc_channel_credentials credentials)

Definition at line 65 of file credentials.cc.

◆ grpc_find_server_credentials_in_args()

grpc_server_credentials* grpc_find_server_credentials_in_args ( const grpc_channel_args args)

Definition at line 149 of file credentials.cc.

◆ grpc_get_well_known_google_credentials_file_path()

std::string grpc_get_well_known_google_credentials_file_path ( void  )

Definition at line 489 of file google_default_credentials.cc.

◆ grpc_get_well_known_google_credentials_file_path_impl()

std::string grpc_get_well_known_google_credentials_file_path_impl ( void  )

Definition at line 32 of file credentials_generic.cc.

◆ grpc_md_only_test_credentials_create()

grpc_call_credentials* grpc_md_only_test_credentials_create ( const char *  md_key,
const char *  md_value 
)

Definition at line 118 of file fake_credentials.cc.

◆ grpc_override_well_known_credentials_path_getter()

void grpc_override_well_known_credentials_path_getter ( grpc_well_known_credentials_path_getter  getter)

Definition at line 494 of file google_default_credentials.cc.

◆ grpc_server_credentials_from_arg()

grpc_server_credentials* grpc_server_credentials_from_arg ( const grpc_arg arg)

Definition at line 139 of file credentials.cc.

◆ grpc_server_credentials_to_arg()

grpc_arg grpc_server_credentials_to_arg ( grpc_server_credentials c)

Definition at line 134 of file credentials.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:09