bes  Updated for version 3.20.8
NgapS3Credentials Class Reference
Collaboration diagram for NgapS3Credentials:
Collaboration graph

Public Member Functions

void add (const std::string &key, const std::string &value)
 Add the key and value pair. More...
 
time_t expires () const
 
std::string get (const std::string &key)
 
void get_temporary_credentials ()
 
virtual bool is_s3_cred ()
 Do the URL, ID, Key amd Region items make up an S3 Credential? More...
 
std::string name ()
 
void name (const std::string &name)
 
bool needs_refresh () const
 
 NgapS3Credentials (const std::string &credentials_endpoint, long refresh_margin)
 
std::string to_json ()
 

Static Public Attributes

static const std::string AWS_SESSION_TOKEN = "aws_session_token"
 
static const std::string AWS_TOKEN_EXPIRATION = "aws_token_expiration"
 
static const std::string BES_CONF_REFRESH_KEY = "NGAP.S3.refresh.margin"
 
static const std::string BES_CONF_S3_ENDPOINT_KEY = "NGAP.S3.distribution.endpoint.url"
 
static const std::string BES_CONF_URL_BASE = "NGAP.s3.url.base"
 
static const char * ID_KEY = "id"
 
static const char * KEY_KEY = "key"
 
static const char * REGION_KEY = "region"
 
static const char * URL_KEY = "url"
 

Detailed Description

Definition at line 30 of file NgapS3Credentials.h.

Member Function Documentation

◆ add()

void AccessCredentials::add ( const std::string &  key,
const std::string &  value 
)
inherited

Add the key and value pair.

Parameters
key
value

Definition at line 85 of file AccessCredentials.cc.

◆ get()

string NgapS3Credentials::get ( const std::string &  key)
virtual

Retrieves the value of key

Parameters
keyThe key value to retrieve
Returns
The value of the key, empty string if the key does not exist.

Reimplemented from AccessCredentials.

Definition at line 56 of file NgapS3Credentials.cc.

◆ get_temporary_credentials()

void NgapS3Credentials::get_temporary_credentials ( )

This code assumes that the credentials needed to authenticate the retrieval of the S3 credentials will be handled by the curl call via the ~/.netrc file of the BES user.

Parameters
distribution_api_endpointThe URL of the cumulus distribution api s3credentials endpoint

Definition at line 69 of file NgapS3Credentials.cc.

◆ is_s3_cred()

bool NgapS3Credentials::is_s3_cred ( )
virtual

Do the URL, ID, Key amd Region items make up an S3 Credential?

Returns
True

Reimplemented from AccessCredentials.

Definition at line 54 of file NgapS3Credentials.cc.


The documentation for this class was generated from the following files: