#include <DecodingKey.h>
Public Member Functions | |
void | addDefaultService (const std::string &connectionString) |
void | addService (const std::string &serviceName, const std::string &connectionString, const std::string &userName, const std::string &password) |
size_t | createFromInputFile (const std::string &inputFileName, size_t generatedKeySize=0) |
DecodingKey () | |
void | flush () |
size_t | init (const std::string &keyFileName, const std::string &password, bool readMode=true) |
bool | isNominal () const |
void | list (std::ostream &out) |
const std::string & | ownerName () const |
const std::string & | principalKey () const |
const std::string & | principalName () const |
const std::map< std::string, ServiceCredentials > & | services () const |
virtual | ~DecodingKey () |
Static Public Member Functions | |
static std::string | templateFile () |
Static Public Attributes | |
static constexpr size_t | DEFAULT_KEY_SIZE = 100 |
static constexpr const char *const | FILE_NAME = "db.key" |
static constexpr const char *const | FILE_PATH = ".cms_cond/db.key" |
Private Attributes | |
std::string | m_fileName |
bool | m_mode |
std::string | m_owner |
std::string | m_principalKey |
std::string | m_principalName |
std::string | m_pwd |
std::map< std::string, ServiceCredentials > | m_services |
Definition at line 34 of file DecodingKey.h.
|
inline |
Definition at line 102 of file DecodingKey.h.
References AlCaHLTBitMon_QueryRunRegistry::string.
|
inlinevirtual |
Definition at line 48 of file DecodingKey.h.
References cond::auth::ServiceCredentials::connectionString, init, writeAntiElectronDiscrMVA_cfi::inputFileName, list(), MillePedeFileConverter_cfg::out, cond::auth::ServiceCredentials::password, serviceName, AlCaHLTBitMon_QueryRunRegistry::string, and cond::auth::ServiceCredentials::userName.
void cond::auth::DecodingKey::addDefaultService | ( | const std::string & | connectionString | ) |
Definition at line 284 of file DecodingKey.cc.
References DEFAULT_SERVICE().
void cond::auth::DecodingKey::addService | ( | const std::string & | serviceName, |
const std::string & | connectionString, | ||
const std::string & | userName, | ||
const std::string & | password | ||
) |
Definition at line 288 of file DecodingKey.cc.
size_t cond::auth::DecodingKey::createFromInputFile | ( | const std::string & | inputFileName, |
size_t | generatedKeySize = 0 |
||
) |
Definition at line 187 of file DecodingKey.cc.
References CONNECTIONPREFIX(), cond::auth::ServiceCredentials::connectionString, relval_steps::gen(), analyzePatCleaning_cfg::inputFile, KEYPREFIX(), geometryCSVtoXML::line, cond::auth::KeyGenerator::make(), mps_alisetup::msg, NAMEPREFIX(), OWNERPREFIX(), cond::parseLineForNamedParams(), cond::auth::ServiceCredentials::password, PASSWORDPREFIX(), serviceName, SERVICEPREFIX(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), cond::auth::ServiceCredentials::userName, and USERPREFIX().
void cond::auth::DecodingKey::flush | ( | ) |
Definition at line 249 of file DecodingKey.cc.
References ws_sso_content_reader::content, cond::auth::Cipher::encrypt(), ItemSeparator, KEY_HEADER(), KEYPREFIX(), LineSeparator, mps_alisetup::msg, NAMEPREFIX(), MillePedeFileConverter_cfg::out, GetRecoTauVFromDQM_MC_cff::outFile, OWNERPREFIX(), SERVICEPREFIX(), AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().
size_t cond::auth::DecodingKey::init | ( | const std::string & | keyFileName, |
const std::string & | password, | ||
bool | readMode = true |
||
) |
Definition at line 109 of file DecodingKey.cc.
References ws_sso_content_reader::content, cond::auth::Cipher::decrypt(), cond::getLoginName(), recoMuon::in, ItemSeparator, KEY_HEADER(), keyFile(), KEYPREFIX(), geometryCSVtoXML::line, LineSeparator, mps_alisetup::msg, NAMEPREFIX(), OWNERPREFIX(), SERVICEPREFIX(), harvestTrackValidationPlots::str, AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().
Referenced by cond::CredentialStore::setUpForService().
|
inline |
Definition at line 119 of file DecodingKey.h.
References m_owner, and AlCaHLTBitMon_QueryRunRegistry::string.
void cond::auth::DecodingKey::list | ( | std::ostream & | out | ) |
Definition at line 236 of file DecodingKey.cc.
References CONNECTIONPREFIX(), KEYPREFIX(), NAMEPREFIX(), OWNERPREFIX(), PASSWORDPREFIX(), SERVICEPREFIX(), and USERPREFIX().
|
inline |
|
inline |
Definition at line 113 of file DecodingKey.h.
References m_principalKey.
Referenced by cond::CredentialStore::installAdmin().
|
inline |
Definition at line 107 of file DecodingKey.h.
References m_principalName, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by cond::CredentialStore::installAdmin(), and cond::CredentialStore::keyPrincipalName().
|
inline |
Definition at line 131 of file DecodingKey.h.
References m_services.
Referenced by cond::CredentialStore::setUpForService().
|
static |
Definition at line 97 of file DecodingKey.cc.
References CONNECTIONPREFIX(), KEYPREFIX(), NAMEPREFIX(), OWNERPREFIX(), PASSWORDPREFIX(), alignCSCRings::s, SERVICEPREFIX(), and USERPREFIX().
|
static |
Definition at line 40 of file DecodingKey.h.
|
static |
Definition at line 38 of file DecodingKey.h.
|
static |
Definition at line 39 of file DecodingKey.h.
Referenced by cond::CredentialStore::setUpForService().
|
private |
Definition at line 75 of file DecodingKey.h.
|
private |
Definition at line 77 of file DecodingKey.h.
|
private |
Definition at line 85 of file DecodingKey.h.
Referenced by isNominal(), and ownerName().
|
private |
Definition at line 83 of file DecodingKey.h.
Referenced by principalKey().
|
private |
Definition at line 81 of file DecodingKey.h.
Referenced by principalName().
|
private |
Definition at line 79 of file DecodingKey.h.
|
private |
Definition at line 87 of file DecodingKey.h.
Referenced by services().