bes Updated for version 3.20.13
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.
 
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?
 
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.

Constructor & Destructor Documentation

◆ NgapS3Credentials() [1/2]

NgapS3Credentials::NgapS3Credentials ( )
inline

Definition at line 46 of file NgapS3Credentials.h.

◆ NgapS3Credentials() [2/2]

NgapS3Credentials::NgapS3Credentials ( const std::string &  credentials_endpoint,
long  refresh_margin 
)
inline

Definition at line 49 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 62 of file AccessCredentials.cc.

◆ expires()

time_t NgapS3Credentials::expires ( ) const
inline

Definition at line 54 of file NgapS3Credentials.h.

◆ 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.

◆ name() [1/2]

std::string AccessCredentials::name ( )
inlineinherited

Definition at line 45 of file AccessCredentials.h.

◆ name() [2/2]

void AccessCredentials::name ( const std::string &  name)
inlineinherited

Definition at line 47 of file AccessCredentials.h.

◆ needs_refresh()

bool NgapS3Credentials::needs_refresh ( ) const
inline

Definition at line 58 of file NgapS3Credentials.h.

◆ to_json()

string AccessCredentials::to_json ( )
inherited

Definition at line 82 of file AccessCredentials.cc.

Member Data Documentation

◆ AWS_SESSION_TOKEN

const string NgapS3Credentials::AWS_SESSION_TOKEN = "aws_session_token"
static

Definition at line 34 of file NgapS3Credentials.h.

◆ AWS_TOKEN_EXPIRATION

const string NgapS3Credentials::AWS_TOKEN_EXPIRATION = "aws_token_expiration"
static

Definition at line 35 of file NgapS3Credentials.h.

◆ BES_CONF_REFRESH_KEY

const string NgapS3Credentials::BES_CONF_REFRESH_KEY = "NGAP.S3.refresh.margin"
static

Definition at line 37 of file NgapS3Credentials.h.

◆ BES_CONF_S3_ENDPOINT_KEY

const string NgapS3Credentials::BES_CONF_S3_ENDPOINT_KEY = "NGAP.S3.distribution.endpoint.url"
static

Definition at line 36 of file NgapS3Credentials.h.

◆ BES_CONF_URL_BASE

const string NgapS3Credentials::BES_CONF_URL_BASE = "NGAP.s3.url.base"
static

Definition at line 38 of file NgapS3Credentials.h.

◆ ID_KEY

const char * AccessCredentials::ID_KEY = "id"
staticinherited

Definition at line 15 of file AccessCredentials.h.

◆ KEY_KEY

const char * AccessCredentials::KEY_KEY = "key"
staticinherited

Definition at line 16 of file AccessCredentials.h.

◆ REGION_KEY

const char * AccessCredentials::REGION_KEY = "region"
staticinherited

Definition at line 17 of file AccessCredentials.h.

◆ URL_KEY

const char * AccessCredentials::URL_KEY = "url"
staticinherited

Definition at line 18 of file AccessCredentials.h.


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