Go to the documentation of this file.
19 #ifndef GRPCPP_SECURITY_CREDENTIALS_IMPL_H
20 #define GRPCPP_SECURITY_CREDENTIALS_IMPL_H
47 const std::shared_ptr<ChannelCredentials>& creds,
50 namespace experimental {
53 const std::shared_ptr<ChannelCredentials>& creds,
56 std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
57 interceptor_creators);
73 const std::shared_ptr<ChannelCredentials>& channel_creds,
74 const std::shared_ptr<CallCredentials>& call_creds);
81 const std::shared_ptr<ChannelCredentials>& creds,
84 friend std::shared_ptr<Channel>
87 const std::shared_ptr<ChannelCredentials>& creds,
89 std::vector<std::unique_ptr<
91 interceptor_creators);
93 virtual std::shared_ptr<Channel> CreateChannelImpl(
98 virtual std::shared_ptr<Channel> CreateChannelWithInterceptors(
100 std::vector<std::unique_ptr<
119 return "CallCredentials did not provide a debug string";
124 const std::shared_ptr<ChannelCredentials>& channel_creds,
125 const std::shared_ptr<CallCredentials>& call_creds);
128 const std::shared_ptr<CallCredentials>& creds1,
129 const std::shared_ptr<CallCredentials>& creds2);
224 const std::shared_ptr<ChannelCredentials>& channel_creds,
225 const std::shared_ptr<CallCredentials>& call_creds);
229 const std::shared_ptr<CallCredentials>& creds1,
230 const std::shared_ptr<CallCredentials>& creds2);
245 virtual const char*
GetType()
const {
return ""; }
255 std::multimap<grpc::string, grpc::string>* metadata) = 0;
258 return "MetadataCredentialsPlugin did not provide a debug string";
263 std::unique_ptr<MetadataCredentialsPlugin> plugin);
265 namespace experimental {
332 std::unique_ptr<MetadataCredentialsPlugin> plugin,
358 #endif // GRPCPP_SECURITY_CREDENTIALS_IMPL_H
Classes that require gRPC to be initialized should inherit from this class.
Definition: grpc_library.h:38
friend std::shared_ptr< ChannelCredentials > CompositeChannelCredentials(const std::shared_ptr< ChannelCredentials > &channel_creds, const std::shared_ptr< CallCredentials > &call_creds)
Combines a channel credentials and a call credentials into a composite channel credentials.
Definition: credentials.h:77
std::shared_ptr< ChannelCredentials > InsecureChannelCredentials()
Credentials for an unencrypted, unauthenticated channel.
This class is a non owning reference to a string.
Definition: string_ref.h:41
virtual SecureChannelCredentials * AsSecureCredentials()=0
std::shared_ptr< ChannelCredentials > CompositeChannelCredentials(const std::shared_ptr< ChannelCredentials > &channel_creds, const std::shared_ptr< CallCredentials > &call_creds)
Combines a channel credentials and a call credentials into a composite channel credentials.
Definition: credentials.h:77
grpc::string actor_token_path
Definition: credentials_impl.h:280
std::shared_ptr< CallCredentials > StsCredentials(const StsCredentialsOptions &options)
std::shared_ptr< CallCredentials > AccessTokenCredentials(const grpc::string &access_token)
Builds access token credentials.
std::shared_ptr< CallCredentials > GoogleComputeEngineCredentials()
Builds credentials for use when running in GCE.
constexpr long kMaxAuthTokenLifetimeSecs
Definition: credentials_impl.h:178
std::shared_ptr< CallCredentials > MetadataCredentialsFromPlugin(std::unique_ptr< MetadataCredentialsPlugin > plugin, grpc_security_level min_security_level)
friend std::shared_ptr< Channel > CreateCustomChannelImpl(const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const ChannelArguments &args)
grpc::string subject_token_path
Definition: credentials_impl.h:278
std::shared_ptr< ChannelCredentials > TlsCredentials(const TlsCredentialsOptions &options)
Builds TLS Credentials given TLS options.
grpc::string token_exchange_service_uri
Definition: credentials_impl.h:273
std::shared_ptr< CallCredentials > GoogleRefreshTokenCredentials(const grpc::string &json_refresh_token)
Builds refresh token credentials.
grpc::string resource
Definition: credentials_impl.h:274
::grpc_impl::ChannelCredentials ChannelCredentials
Definition: credentials.h:26
std::shared_ptr< CallCredentials > MetadataCredentialsFromPlugin(std::unique_ptr< MetadataCredentialsPlugin > plugin)
std::shared_ptr<::grpc::Channel > CreateCustomChannelWithInterceptors(const grpc::string &target, const std::shared_ptr< grpc::ChannelCredentials > &creds, const ::grpc::ChannelArguments &args, std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
Create a new custom Channel pointing to target with interceptors being invoked per call.
::grpc_impl::SecureCallCredentials SecureCallCredentials
Definition: credentials.h:29
grpc::string pem_private_key
The buffer containing the PEM encoding of the client's private key.
Definition: credentials_impl.h:145
virtual SecureCallCredentials * AsSecureCredentials()=0
Did it work? If it didn't, why?
Definition: status.h:31
friend std::shared_ptr< ChannelCredentials > CompositeChannelCredentials(const std::shared_ptr< ChannelCredentials > &channel_creds, const std::shared_ptr< CallCredentials > &call_creds)
Combines a channel credentials and a call credentials into a composite channel credentials.
Definition: credentials.h:77
::grpc_impl::ChannelArguments ChannelArguments
Definition: channel_arguments.h:32
grpc::Status StsCredentialsOptionsFromEnv(StsCredentialsOptions *options)
Creates STS credentials options from the $STS_CREDENTIALS environment variable.
TLS credentials options, wrapper for grpc_tls_credentials_options.
Definition: tls_credentials_options.h:279
std::vector< grpc::string > target_service_accounts
service accounts of target endpoint that will be acceptable by the client.
Definition: credentials_impl.h:340
virtual grpc::string DebugString()
Definition: credentials_impl.h:118
Options used to build SslCredentials.
Definition: credentials_impl.h:135
std::shared_ptr< ChannelCredentials > SslCredentials(const SslCredentialsOptions &options)
Builds SSL Credentials given SSL specific options.
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:70
Options for creating STS Oauth Token Exchange credentials following the IETF draft https://tools....
Definition: credentials_impl.h:272
grpc::string scope
Definition: credentials_impl.h:276
std::shared_ptr<::grpc::Channel > CreateCustomChannelImpl(const grpc::string &target, const std::shared_ptr<::grpc::ChannelCredentials > &creds, const ::grpc::ChannelArguments &args)
Create a new custom Channel pointing to target.
Class encapsulating the Authentication Information.
Definition: auth_context.h:65
Options for channel creation.
Definition: channel_arguments_impl.h:43
friend std::shared_ptr< CallCredentials > CompositeCallCredentials(const std::shared_ptr< CallCredentials > &creds1, const std::shared_ptr< CallCredentials > &creds2)
Combines two call credentials objects into a composite call credentials.
Definition: credentials.h:84
grpc::Status StsCredentialsOptionsFromJson(const grpc::string &json_string, StsCredentialsOptions *options)
Creates STS Options from a JSON string.
Options used to build AltsCredentials.
Definition: credentials_impl.h:336
grpc_security_level
Definition: grpc_security_constants.h:114
::grpc_impl::SecureChannelCredentials SecureChannelCredentials
Definition: credentials.h:30
::grpc_impl::CallCredentials CallCredentials
Definition: credentials.h:27
std::shared_ptr< CallCredentials > CompositeCallCredentials(const std::shared_ptr< CallCredentials > &creds1, const std::shared_ptr< CallCredentials > &creds2)
Combines two call credentials objects into a composite call credentials.
Definition: credentials.h:84
Definition: client_interceptor.h:49
std::shared_ptr< CallCredentials > GoogleIAMCredentials(const grpc::string &authorization_token, const grpc::string &authority_selector)
Builds IAM credentials.
std::string string
Definition: config.h:35
grpc::string pem_root_certs
The buffer containing the PEM encoding of the server root certificates.
Definition: credentials_impl.h:141
grpc::string actor_token_type
Definition: credentials_impl.h:281
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm_impl.h:33
A channel credentials object encapsulates all the state needed by a client to authenticate with a ser...
Definition: credentials_impl.h:66
std::shared_ptr< ChannelCredentials > GoogleDefaultCredentials()
Builds credentials with reasonable defaults.
std::shared_ptr< ChannelCredentials > LocalCredentials(grpc_local_connect_type type)
Builds Local Credentials.
grpc::string audience
Definition: credentials_impl.h:275
grpc::string subject_token_type
Definition: credentials_impl.h:279
std::shared_ptr< CallCredentials > ServiceAccountJWTAccessCredentials(const grpc::string &json_key, long token_lifetime_seconds=grpc_impl::kMaxAuthTokenLifetimeSecs)
Builds Service Account JWT Access credentials.
A call credentials object encapsulates the state needed by a client to authenticate with a server for...
Definition: credentials_impl.h:111
std::shared_ptr< ChannelCredentials > AltsCredentials(const AltsCredentialsOptions &options)
Builds ALTS Credentials given ALTS specific options.
grpc::string requested_token_type
Definition: credentials_impl.h:277
grpc_local_connect_type
Type of local connections for which local channel/server credentials will be applied.
Definition: grpc_security_constants.h:140
virtual bool ApplyToCall(grpc_call *call)=0
Apply this instance's credentials to call.
grpc::string pem_cert_chain
The buffer containing the PEM encoding of the client's certificate chain.
Definition: credentials_impl.h:150