18 #include <aws/core/Aws.h> 19 #include <aws/core/auth/AWSAuthSigner.h> 20 #include <aws/core/auth/AWSCredentialsProvider.h> 21 #include <aws/core/auth/AWSCredentialsProviderChain.h> 22 #include <aws/core/utils/json/JsonSerializer.h> 62 const char * _certfile,
63 const char * _keyfile,
67 const int _connect_timeout_ms,
68 const int _total_timeout_ms)
118 const std::shared_ptr<Aws::Client::ParameterReaderInterface> & parameters);
142 AWSCredentials GetAWSCredentials()
override;
150 void SetCredentials(AWSCredentials & creds_obj);
152 bool ValidateResponse(Aws::Utils::Json::JsonValue & value);
154 bool IsTimeExpired();
static const char CFG_THING_NAME[]
Credentials provider chain for ROS AWS service integrations.
Aws::String host
Host name of the iot:CredentialProvider endpoint.
static const char CFG_TOTAL_TIMEOUT_MS[]
std::mutex creds_mutex_
Mutex to ensure only a single request is outstanding at any given time.
IotRoleConfig iot
IoT-specific configuration.
static const char CFG_CONNECT_TIMEOUT_MS[]
static const char CFG_CAFILE[]
static const long DEFAULT_AUTH_TOTAL_TIMEOUT_MS
Default number of milliseconds to wait before timing out when retrieving credentials from IoT...
static const char CFG_CERTFILE[]
long connect_timeout_ms
Number of ms to wait before timing out when connecting to the endpoint.
static const char CFG_ROLE[]
static const char CFG_KEYFILE[]
Aws::String cafile
Path to the Root CA for the endpoint.
IotRoleConfig config_
Configuration for connecting to IoT.
Auth configuration needed to retrieve AWS credentials via the IoT service.
Aws::String name
Thing name for the device.
static const long DEFAULT_AUTH_CONNECT_TIMEOUT_MS
Default number of milliseconds to wait before timing out when connecting to retrieve credentials from...
Aws::String certfile
Path to the certificate which identifies the device.
IotRoleConfig(const char *_cafile, const char *_certfile, const char *_keyfile, const char *_host, const char *_role, const char *_name, const int _connect_timeout_ms, const int _total_timeout_ms)
Aws::String role
Name of the AWS IoT Role Alias for the device.
static const char CFG_ENDPOINT[]
std::atomic< double > expiry_
Future epoch when the cached credentials will expire.
Aws::Auth::AWSCredentials cached_
Current cached credentials.
long total_timeout_ms
Total number of ms to wait for the entire connect/request/response transaction.
bool GetServiceAuthConfig(ServiceAuthConfig &config, const std::shared_ptr< Aws::Client::ParameterReaderInterface > ¶meters)
Retrieves service authorization data from a ParameterReaderInterface and populates the ServiceAuthCon...
Aws::String keyfile
Path to the related private key for the certificate.
AWSCredentialsProvider that obtains credentials using the AWS IoT Core service.
Auth configuration for ROS AWS service integration.