1 #ifndef CondCore_CondDB_CredentialStore_h 2 #define CondCore_CondDB_CredentialStore_h 10 #include "CoralBase/MessageStream.h" 14 class AuthenticationCredentials;
15 class IAuthenticationCredentials;
33 void registerItem(
const std::string& connectionString,
41 void registerCredentials(
const std::string& connectionString,
48 void registerCredentials(
const std::string& connectionString,
59 const std::map<std::pair<std::string, std::string>, coral::AuthenticationCredentials*>&
data()
const;
65 std::map<std::pair<std::string, std::string>, coral::AuthenticationCredentials*>
m_data;
101 bool updatePrincipal(
const std::string& principal,
const std::string& principalKey,
bool setAdmin =
false);
112 bool removePrincipal(
const std::string& principal);
114 bool removeConnection(
const std::string& connectionLabel);
119 bool importForPrincipal(
const std::string& principal,
121 bool forceUpdateConnection =
false);
123 bool listPrincipals(std::vector<std::string>&
destination);
133 bool selectPermissions(
const std::string& principalName,
153 void startSession(
bool readMode);
155 void openSession(
bool readOnly =
true);
std::map< std::pair< std::string, std::string >, coral::AuthenticationCredentials * > m_data
credentials for the specific roles
std::string m_principalKey
std::string m_serviceName
static const std::string serviceName
std::string principalName
std::string connectionString
std::string schemaLabel(const std::string &serviceName, const std::string &userName)
bool closeSession(Session *&session)
static const std::string DEFAULT_DATA_SOURCE
std::shared_ptr< coral::ISession > m_session
char data[epos_bytes_allocation]
std::shared_ptr< coral::IConnection > m_connection
std::string connectionLabel
const auth::ServiceCredentials * m_serviceData
void reset(double vett[256])