bes
Updated for version 3.20.10
|
Public Member Functions | |
void | add (const std::string &url, AccessCredentials *ac) |
void | clear () |
AccessCredentials * | get (std::shared_ptr< http::url > &url) |
bool | hasNgapS3Credentials () |
void | load_credentials () |
unsigned int | size () |
~CredentialsManager () | |
Static Public Member Functions | |
static CredentialsManager * | theCM () |
Returns the singleton instance of the CrednetialsManager. More... | |
Static Public Attributes | |
static const char * | ENV_ACCESS_KEY = "CMAC_ACCESS_KEY" |
static const char * | ENV_BUCKET_KEY = "CMAC_BUCKET" |
static const char * | ENV_ID_KEY = "CMAC_ID" |
static const char * | ENV_REGION_KEY = "CMAC_REGION" |
static const char * | ENV_URL_KEY = "CMAC_URL" |
static CredentialsManager * | theMngr = nullptr |
static const char * | USE_ENV_CREDS_KEY_VALUE = "ENV_CREDS" |
Definition at line 40 of file CredentialsManager.h.
CredentialsManager::~CredentialsManager | ( | ) |
Destructo
Definition at line 158 of file CredentialsManager.cc.
void CredentialsManager::add | ( | const std::string & | key, |
AccessCredentials * | ac | ||
) |
Add the passed set of AccessCredentials to the collection, filed under key.
key | The key (URL) to associated with these credentials |
ac | The credentials to use for access. |
Definition at line 182 of file CredentialsManager.cc.
AccessCredentials * CredentialsManager::get | ( | std::shared_ptr< http::url > & | url | ) |
Retrieve the AccessCredentials, if any, associated with the passed url (key).
url | The URL for which AccessCredentials are desired |
Definition at line 198 of file CredentialsManager.cc.
void CredentialsManager::load_credentials | ( | ) |
This method loads credentials from a special file identified in the bes.conf chain by the key "CredentialsManager.config". If the key is missing from the bes.conf chain the method will return and no credentials will be loaded.
The credentials are stored as a map of maps where the key is the human readable name of the credentials. The map of maps is accomplished by the following formatting:
cloudydap=url:https://s3.amazonaws.com/cloudydap/ cloudydap+=id:------------------------— cloudydap+=key:************************** cloudydap+=region:us-east-1 cloudydap+=bucket:cloudydap
cloudyopendap=url:https://s3.amazonaws.com/cloudyopendap/ cloudyopendap+=id:------------------------— cloudyopendap+=key:************************** cloudyopendap+=region:us-east-1 cloudyopendap+=bucket:cloudyopendap
cname_02=url:https://ssotherone.org/login cname_02+=id:------------------------— cname_02+=key:************************** cname_02+=region:us-east-1 cname_02+=bucket:cloudyotherdap
BESInternalError | if the file specified by the "CredentialsManager.config" key is missing. |
Definition at line 305 of file CredentialsManager.cc.
|
static |
Returns the singleton instance of the CrednetialsManager.
Definition at line 129 of file CredentialsManager.cc.
|
static |
Our singleton instance
Definition at line 65 of file CredentialsManager.h.