34 #ifndef GRPC_GRPC_SECURITY_H
35 #define GRPC_GRPC_SECURITY_H
46 #define GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME "transport_security_type"
47 #define GRPC_SSL_TRANSPORT_SECURITY_TYPE "ssl"
49 #define GRPC_X509_CN_PROPERTY_NAME "x509_common_name"
50 #define GRPC_X509_SAN_PROPERTY_NAME "x509_subject_alternative_name"
107 const char *value,
size_t value_length);
133 #define GRPC_GOOGLE_CREDENTIALS_ENV_VAR "GOOGLE_APPLICATION_CREDENTIALS"
143 #define GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR \
144 "GRPC_DEFAULT_SSL_ROOTS_FILE_PATH"
207 const char *json_key,
gpr_timespec token_lifetime,
void *reserved);
216 const char *json_refresh_token,
void *reserved);
221 const char *access_token,
void *reserved);
225 const char *authorization_token,
const char *authority_selector,
240 void *user_data,
const grpc_metadata *creds_md,
size_t num_creds_md,
276 void (*destroy)(
void *state);
321 size_t num_key_cert_pairs,
int force_client_auth,
void *reserved);
350 void *user_data,
const grpc_metadata *consumed_md,
size_t num_consumed_md,
363 void (*destroy)(
void *state);
int grpc_auth_context_set_peer_identity_property_name(grpc_auth_context *ctx, const char *name)
void(* grpc_process_auth_metadata_done_cb)(void *user_data, const grpc_metadata *consumed_md, size_t num_consumed_md, const grpc_metadata *response_md, size_t num_response_md, grpc_status_code status, const char *error_details)
Definition: grpc_security.h:349
int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_server_credentials *creds)
size_t value_length
Definition: grpc_security.h:64
struct grpc_server_credentials grpc_server_credentials
Definition: grpc_security.h:301
grpc_call_credentials * grpc_google_compute_engine_credentials_create(void *reserved)
grpc_call_credentials * grpc_service_account_jwt_access_credentials_create(const char *json_key, gpr_timespec token_lifetime, void *reserved)
grpc_call_credentials * grpc_metadata_credentials_create_from_plugin(grpc_metadata_credentials_plugin plugin, void *reserved)
An array of arguments that can be passed around.
Definition: grpc.h:114
grpc_call_error grpc_call_set_credentials(grpc_call *call, grpc_call_credentials *creds)
char * value
Definition: grpc_security.h:63
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc.h:66
const gpr_timespec grpc_max_auth_token_lifetime
void grpc_server_credentials_set_auth_metadata_processor(grpc_server_credentials *creds, grpc_auth_metadata_processor processor)
const char * method_name
Definition: grpc_security.h:252
void grpc_auth_context_add_property(grpc_auth_context *ctx, const char *name, const char *value, size_t value_length)
void grpc_channel_credentials_release(grpc_channel_credentials *creds)
void grpc_call_credentials_release(grpc_call_credentials *creds)
grpc_call_credentials * grpc_access_token_credentials_create(const char *access_token, void *reserved)
const char * private_key
Definition: grpc_security.h:150
const grpc_auth_property * grpc_auth_property_iterator_next(grpc_auth_property_iterator *it)
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc.h:71
grpc_call_credentials * grpc_google_refresh_token_credentials_create(const char *json_refresh_token, void *reserved)
grpc_channel * grpc_secure_channel_create(grpc_channel_credentials *creds, const char *target, const grpc_channel_args *args, void *reserved)
char * name
Definition: grpc_security.h:62
void * reserved
Definition: grpc_security.h:258
const grpc_auth_context * ctx
Definition: grpc_security.h:55
const char * grpc_auth_context_peer_identity_property_name(const grpc_auth_context *ctx)
int grpc_auth_context_peer_is_authenticated(const grpc_auth_context *ctx)
const char * service_url
Definition: grpc_security.h:247
const char * name
Definition: grpc_security.h:57
grpc_call_error
Result of a grpc call.
Definition: grpc.h:176
size_t index
Definition: grpc_security.h:56
grpc_channel_credentials * grpc_composite_channel_credentials_create(grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, void *reserved)
Definition: grpc_security.h:54
void grpc_auth_context_add_cstring_property(grpc_auth_context *ctx, const char *name, const char *value)
grpc_call_credentials * grpc_google_iam_credentials_create(const char *authorization_token, const char *authority_selector, void *reserved)
struct grpc_call_credentials grpc_call_credentials
Definition: grpc_security.h:177
struct grpc_channel grpc_channel
The Channel interface allows creation of Call objects.
Definition: grpc.h:63
Definition: grpc_security.h:147
const grpc_auth_context * channel_auth_context
Definition: grpc_security.h:255
struct grpc_auth_context grpc_auth_context
Definition: grpc_security.h:52
struct grpc_auth_property_iterator grpc_auth_property_iterator
const char * cert_chain
Definition: grpc_security.h:154
grpc_auth_property_iterator grpc_auth_context_peer_identity(const grpc_auth_context *ctx)
struct grpc_channel_credentials grpc_channel_credentials
Definition: grpc_security.h:124
Definition: grpc_security.h:61
struct grpc_auth_property grpc_auth_property
grpc_server_credentials * grpc_ssl_server_credentials_create(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved)
grpc_channel_credentials * grpc_google_default_credentials_create(void)
grpc_channel_credentials * grpc_ssl_credentials_create(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, void *reserved)
grpc_auth_property_iterator grpc_auth_context_property_iterator(const grpc_auth_context *ctx)
grpc_auth_context * grpc_call_auth_context(grpc_call *call)
grpc_status_code
Definition: status.h:41
void grpc_server_credentials_release(grpc_server_credentials *creds)
void(* grpc_credentials_plugin_metadata_cb)(void *user_data, const grpc_metadata *creds_md, size_t num_creds_md, grpc_status_code status, const char *error_details)
Definition: grpc_security.h:239
grpc_auth_property_iterator grpc_auth_context_find_properties_by_name(const grpc_auth_context *ctx, const char *name)
void grpc_auth_context_release(grpc_auth_context *context)
grpc_call_credentials * grpc_composite_call_credentials_create(grpc_call_credentials *creds1, grpc_call_credentials *creds2, void *reserved)
Definition: grpc_security.h:245