bes
Updated for version 3.20.6
|
Public Member Functions | |
void | add (const std::string &url, AccessCredentials *ac) |
AccessCredentials * | get (const std::string &url) |
unsigned int | size () |
~CredentialsManager () | |
Static Public Member Functions | |
static void | clear () |
static void | load_credentials () |
static CredentialsManager * | theCM () |
Static Public Attributes | |
static const std::string | ENV_ACCESS_KEY ="CMAC_ACCESS_KEY" |
static const std::string | ENV_BUCKET_KEY ="CMAC_BUCKET" |
static const std::string | ENV_CREDS_KEY_VALUE ="ENV_CREDS" |
static const std::string | ENV_ID_KEY ="CMAC_ID" |
static const std::string | ENV_REGION_KEY ="CMAC_REGION" |
static const std::string | ENV_URL_KEY ="CMAC_URL" |
static CredentialsManager * | theMngr =0 |
Definition at line 63 of file CredentialsManager.h.
CredentialsManager::~CredentialsManager | ( | ) |
Destructo
Definition at line 114 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 154 of file CredentialsManager.cc.
AccessCredentials * CredentialsManager::get | ( | const std::string & | url | ) |
Retrieve the AccessCredentials, if any, associated with the passed url (key).
url | The URL for which AccessCredentials are desired |
Definition at line 166 of file CredentialsManager.cc.
|
static |
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 269 of file CredentialsManager.cc.
|
static |
Our singleton instance
Definition at line 81 of file CredentialsManager.h.