#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 |
const std::string & | version () 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" |
static constexpr const char *const | KEY_FMT_VERSION = "2.0" |
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 |
std::string | m_version |
Definition at line 31 of file DecodingKey.h.
|
inline |
Definition at line 96 of file DecodingKey.h.
|
inlinevirtual |
Definition at line 43 of file DecodingKey.h.
void cond::auth::DecodingKey::addDefaultService | ( | const std::string & | connectionString | ) |
Definition at line 299 of file DecodingKey.cc.
References FastTimer::addService(), l1RCTOmdsFedVectorProducer_cfi::connectionString, and 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 303 of file DecodingKey.cc.
References l1RCTOmdsFedVectorProducer_cfi::connectionString, EcalCondDBWriter_cfi::password, serviceName, and EcalCondDBWriter_cfi::userName.
size_t cond::auth::DecodingKey::createFromInputFile | ( | const std::string & | inputFileName, |
size_t | generatedKeySize = 0 |
||
) |
Definition at line 195 of file DecodingKey.cc.
References CONNECTIONPREFIX(), cond::auth::ServiceCredentials::connectionString, relval_steps::gen(), makeListRunsInFiles::inputFile, InefficientDoubleROC::inputFileName, KEYPREFIX(), mps_splice::line, mps_check::msg, NAMEPREFIX(), OWNERPREFIX(), submitPVValidationJobs::params, cond::parseLineForNamedParams(), cond::auth::ServiceCredentials::password, PASSWORDPREFIX(), serviceName, SERVICEPREFIX(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), cond::auth::ServiceCredentials::userName, USERPREFIX(), and VERSIONPREFIX().
void cond::auth::DecodingKey::flush | ( | ) |
Definition at line 261 of file DecodingKey.cc.
References Skims_PA_cff::content, cond::auth::Cipher::encrypt(), free(), ItemSeparator, KEY_HEADER(), KEYPREFIX(), LineSeparator, mps_check::msg, NAMEPREFIX(), MillePedeFileConverter_cfg::out, L1TdeCSCTF_cfi::outFile, OWNERPREFIX(), SERVICEPREFIX(), AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and VERSIONPREFIX().
size_t cond::auth::DecodingKey::init | ( | const std::string & | keyFileName, |
const std::string & | password, | ||
bool | readMode = true |
||
) |
Definition at line 113 of file DecodingKey.cc.
References Skims_PA_cff::content, cond::auth::Cipher::decrypt(), free(), cond::getLoginName(), recoMuon::in, ItemSeparator, KEY_HEADER(), keyFile(), KEYPREFIX(), mps_splice::line, LineSeparator, malloc(), mps_check::msg, NAMEPREFIX(), OWNERPREFIX(), EcalCondDBWriter_cfi::password, SERVICEPREFIX(), str, AlCaHLTBitMon_QueryRunRegistry::string, cond::throwException(), and VERSIONPREFIX().
|
inline |
Definition at line 112 of file DecodingKey.h.
void cond::auth::DecodingKey::list | ( | std::ostream & | out | ) |
Definition at line 247 of file DecodingKey.cc.
References CONNECTIONPREFIX(), KEYPREFIX(), NAMEPREFIX(), MillePedeFileConverter_cfg::out, OWNERPREFIX(), PASSWORDPREFIX(), SERVICEPREFIX(), USERPREFIX(), and VERSIONPREFIX().
|
inline |
Definition at line 114 of file DecodingKey.h.
|
inline |
Definition at line 110 of file DecodingKey.h.
|
inline |
Definition at line 108 of file DecodingKey.h.
|
inline |
Definition at line 116 of file DecodingKey.h.
|
static |
Definition at line 97 of file DecodingKey.cc.
References CONNECTIONPREFIX(), KEYPREFIX(), NAMEPREFIX(), OWNERPREFIX(), PASSWORDPREFIX(), alignCSCRings::s, SERVICEPREFIX(), USERPREFIX(), and VERSIONPREFIX().
|
inline |
Definition at line 106 of file DecodingKey.h.
Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().
|
static |
Definition at line 36 of file DecodingKey.h.
|
static |
Definition at line 34 of file DecodingKey.h.
|
static |
Definition at line 35 of file DecodingKey.h.
Referenced by cond::CredentialStore::setUpForService().
|
static |
Definition at line 33 of file DecodingKey.h.
|
private |
Definition at line 73 of file DecodingKey.h.
|
private |
Definition at line 77 of file DecodingKey.h.
|
private |
Definition at line 85 of file DecodingKey.h.
|
private |
Definition at line 83 of file DecodingKey.h.
|
private |
Definition at line 81 of file DecodingKey.h.
|
private |
Definition at line 79 of file DecodingKey.h.
|
private |
Definition at line 87 of file DecodingKey.h.
|
private |
Definition at line 75 of file DecodingKey.h.