#include <XMLAuthenticationService.h>
Public Member Functions | |
const coral::IAuthenticationCredentials & | credentials (const std::string &connectionString) const override |
const coral::IAuthenticationCredentials & | credentials (const std::string &connectionString, const std::string &role) const override |
void | setAuthenticationPath (const std::string &inputPath) |
Sets the input file name. More... | |
XMLAuthenticationService (const std::string &name) | |
Standard Constructor. More... | |
~XMLAuthenticationService () override | |
Standard Destructor. More... | |
Private Member Functions | |
bool | initialize () |
Service framework related initialization. More... | |
bool | processFile (const std::string &inputFileName) |
Parses an xml file. More... | |
void | reset () |
Reset parsed data. More... | |
std::set< std::string > | verifyFileName () |
Verifies the existence of the authentication files. More... | |
Private Attributes | |
coral::Property::CallbackID | m_callbackID |
std::map< std::string, DataSourceEntry * > | m_data |
The structure with the authentication data. More... | |
std::string | m_inputFileName |
The input file with the data. More... | |
bool | m_isInitialized |
Flag indicating whether the service has been initialized. More... | |
boost::mutex | m_mutexLock |
the mutex lock More... | |
Definition at line 78 of file XMLAuthenticationService.h.
|
explicit |
Standard Constructor.
Definition at line 77 of file XMLAuthenticationService.cc.
References cond::auth::COND_AUTH_PATH_PROPERTY, instance, m_callbackID, and setAuthenticationPath().
|
override |
Standard Destructor.
Definition at line 90 of file XMLAuthenticationService.cc.
|
override |
Returns a reference to the credentials object for a given connection string. If the connection string is not known to the service an UnknownConnectionException is thrown.
Definition at line 346 of file XMLAuthenticationService.cc.
References l1RCTOmdsFedVectorProducer_cfi::connectionString, initialize(), CommonMethods::lock(), and Skims_PA_cff::name.
|
override |
Returns a reference to the credentials object for a given connection string. If the connection string is not known to the service an UnknownConnectionException is thrown. If the role is not known to the service an UnknownRoleException is thrown.
Definition at line 359 of file XMLAuthenticationService.cc.
References l1RCTOmdsFedVectorProducer_cfi::connectionString, initialize(), CommonMethods::lock(), and Skims_PA_cff::name.
|
private |
Service framework related initialization.
Definition at line 299 of file XMLAuthenticationService.cc.
References Debug, mitigatedMETSequence_cff::inputFileNames, dqm-mbProfile::log, fetchall_from_DQM_v2::release, reset(), mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, cms::concurrency::xercesInitialize(), and cms::concurrency::xercesTerminate().
|
private |
Parses an xml file.
if(name!=XML_AUTHENTICATION_FILE){ cond::DecodingKey key; try{ key.readUserKeyString(cont); log << coral::Debug << "Decoding content of file \""<< key.dataSource()<<"""<<coral::MessageStream::endmsg; cond::FileReader dataFile; dataFile.read(key.dataSource()); cont = dataFile.content(); cont = coral::Cipher::decode(cont,key.key());
} catch (const cond::Exception& exc){ log << coral::Error << std::string(exc.what())<<coral::MessageStream::endmsg; return false; }
} else { seal::MessageStream log( this, this->name(),seal::Msg::Verbose ); log<<coral::Debug<< "Authentication file is expected standard XML."<<coral::MessageStream::endmsg; }
Definition at line 107 of file XMLAuthenticationService.cc.
References cond::XMLAuthenticationService::DataSourceEntry::appendCredentialItem(), cond::XMLAuthenticationService::DataSourceEntry::appendCredentialItemForRole(), edmScanValgrind::buffer, generateEDF::cont, Debug, dt4ml_dqm_sourceclient-live_cfg::filePath, dtResolutionTest_cfi::inputFile, InefficientDoubleROC::inputFileName, dqm-mbProfile::log, Skims_PA_cff::name, Herwig7_Dummy_ReadLHE_GEN_SIM::numberOfParameters, writedatasetfile::parser, castor_dqm_sourceclient_file_cfg::path, fetchall_from_DQM_v2::release, mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, and cms::Exception::what().
|
private |
Reset parsed data.
Definition at line 337 of file XMLAuthenticationService.cc.
Referenced by MatrixReader.MatrixReader::__init__(), data_sources.json_list::__next__(), and MatrixReader.MatrixReader::showRaw().
void cond::XMLAuthenticationService::XMLAuthenticationService::setAuthenticationPath | ( | const std::string & | inputPath | ) |
Sets the input file name.
Definition at line 97 of file XMLAuthenticationService.cc.
References SiStripCommissioningSource_FromEDM_cfg::inputPath, castor_dqm_sourceclient_file_cfg::path, reset(), and XML_AUTHENTICATION_FILE.
Referenced by XMLAuthenticationService().
|
private |
Verifies the existence of the authentication files.
Definition at line 372 of file XMLAuthenticationService.cc.
References Debug, LaserDQM_cfg::fileNames, dt4ml_dqm_sourceclient-live_cfg::filePath, contentValuesFiles::fullPath, dqm-mbProfile::log, castor_dqm_sourceclient_file_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.
|
private |
Definition at line 130 of file XMLAuthenticationService.h.
Referenced by XMLAuthenticationService().
|
private |
The structure with the authentication data.
Definition at line 125 of file XMLAuthenticationService.h.
|
private |
The input file with the data.
Definition at line 122 of file XMLAuthenticationService.h.
|
private |
Flag indicating whether the service has been initialized.
Definition at line 119 of file XMLAuthenticationService.h.
|
mutableprivate |
the mutex lock
Definition at line 128 of file XMLAuthenticationService.h.