#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 31 of file DecodingKey.h.
|
inline |
Definition at line 91 of file DecodingKey.h.
|
inlinevirtual |
Definition at line 42 of file DecodingKey.h.
void cond::auth::DecodingKey::addDefaultService | ( | const std::string & | connectionString | ) |
Definition at line 287 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 291 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 190 of file DecodingKey.cc.
References CONNECTIONPREFIX(), cond::auth::ServiceCredentials::connectionString, relval_steps::gen(), dtResolutionTest_cfi::inputFile, InefficientDoubleROC::inputFileName, KEYPREFIX(), mps_splice::line, mps_check::msg, NAMEPREFIX(), OWNERPREFIX(), CalibrationSummaryClient_cfi::params, 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 252 of file DecodingKey.cc.
References Skims_PA_cff::content, cond::auth::Cipher::encrypt(), ItemSeparator, KEY_HEADER(), KEYPREFIX(), LineSeparator, mps_check::msg, NAMEPREFIX(), MillePedeFileConverter_cfg::out, L1TdeCSCTF_cfi::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 111 of file DecodingKey.cc.
References Skims_PA_cff::content, cond::auth::Cipher::decrypt(), cond::getLoginName(), recoMuon::in, ItemSeparator, KEY_HEADER(), keyFile(), KEYPREFIX(), mps_splice::line, LineSeparator, mps_check::msg, NAMEPREFIX(), OWNERPREFIX(), EcalCondDBWriter_cfi::password, SERVICEPREFIX(), str, AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().
|
inline |
Definition at line 98 of file DecodingKey.h.
void cond::auth::DecodingKey::list | ( | std::ostream & | out | ) |
Definition at line 239 of file DecodingKey.cc.
References CONNECTIONPREFIX(), KEYPREFIX(), NAMEPREFIX(), MillePedeFileConverter_cfg::out, OWNERPREFIX(), PASSWORDPREFIX(), SERVICEPREFIX(), and USERPREFIX().
|
inline |
Definition at line 100 of file DecodingKey.h.
|
inline |
Definition at line 96 of file DecodingKey.h.
|
inline |
Definition at line 94 of file DecodingKey.h.
|
inline |
Definition at line 102 of file DecodingKey.h.
|
static |
Definition at line 96 of file DecodingKey.cc.
References CONNECTIONPREFIX(), KEYPREFIX(), NAMEPREFIX(), OWNERPREFIX(), PASSWORDPREFIX(), alignCSCRings::s, SERVICEPREFIX(), and USERPREFIX().
|
staticconstexpr |
Definition at line 35 of file DecodingKey.h.
|
staticconstexpr |
Definition at line 33 of file DecodingKey.h.
|
staticconstexpr |
Definition at line 34 of file DecodingKey.h.
Referenced by cond::CredentialStore::setUpForService().
|
private |
Definition at line 70 of file DecodingKey.h.
|
private |
Definition at line 72 of file DecodingKey.h.
|
private |
Definition at line 80 of file DecodingKey.h.
|
private |
Definition at line 78 of file DecodingKey.h.
|
private |
Definition at line 76 of file DecodingKey.h.
|
private |
Definition at line 74 of file DecodingKey.h.
|
private |
Definition at line 82 of file DecodingKey.h.