Go to the documentation of this file. 1 #ifndef CondCore_CondDB_CredentialStore_h
2 #define CondCore_CondDB_CredentialStore_h
11 #include "CoralBase/MessageStream.h"
15 class AuthenticationCredentials;
16 class IAuthenticationCredentials;
60 const std::map<std::pair<std::string, std::string>, coral::AuthenticationCredentials*>&
data()
const;
66 std::map<std::pair<std::string, std::string>, coral::AuthenticationCredentials*>
m_data;
122 bool forceUpdateConnection =
false);
std::shared_ptr< coral::ISession > m_session
const std::string & keyPrincipalName()
bool updatePrincipal(const std::string &principal, const std::string &principalKey, bool setAdmin=false)
const auth::ServiceCredentials * m_serviceData
std::string m_serviceName
std::pair< std::string, std::string > openConnection(const std::string &connectionString)
std::string connectionString
const coral::IAuthenticationCredentials * get(const std::string &connectionString) const
static const std::string serviceName
const std::map< std::pair< std::string, std::string >, coral::AuthenticationCredentials * > & data() const
void startSession(bool readMode)
bool selectForUser(coral_bridge::AuthenticationCredentialSet &destinationData)
bool listConnections(std::map< std::string, std::pair< std::string, std::string > > &destination)
void registerItem(const std::string &connectionString, const std::string &itemName, const std::string &itemValue)
std::string setUpForConnectionString(const std::string &connectionString, const std::string &authPath)
virtual ~CredentialStore()
Standard Destructor.
void closeSession(bool commit=true)
bool removePrincipal(const std::string &principal)
std::string setUpForService(const std::string &serviceName, const std::string &authPath)
Sets the initialization parameters.
AuthenticationCredentialSet()
Constructor.
bool drop(const std::string &connectionString, const std::string &userName, const std::string &password)
virtual ~AuthenticationCredentialSet()
Destructor.
bool createSchema(const std::string &connectionString, const std::string &userName, const std::string &password)
const std::string & serviceName()
std::pair< std::string, std::string > getUserCredentials(const std::string &connectionString, const std::string &role)
void startSuperSession(const std::string &connectionString, const std::string &userName, const std::string &password)
bool listPrincipals(std::vector< std::string > &destination)
void registerCredentials(const std::string &connectionString, const std::string &userName, const std::string &password)
bool importForPrincipal(const std::string &principal, const coral_bridge::AuthenticationCredentialSet &data, bool forceUpdateConnection=false)
import data
bool updateConnection(const std::string &connectionLabel, const std::string &userName, const std::string &password)
bool removeConnection(const std::string &connectionLabel)
bool exportAll(coral_bridge::AuthenticationCredentialSet &data)
std::string connectionLabel
std::string m_principalKey
std::map< std::pair< std::string, std::string >, coral::AuthenticationCredentials * > m_data
credentials for the specific roles
CredentialStore()
Standard Constructor.
char data[epos_bytes_allocation]
bool resetAdmin(const std::string &userName, const std::string &password)
bool selectPermissions(const std::string &principalName, const std::string &role, const std::string &connectionString, std::vector< Permission > &destination)
std::string schemaLabel(const std::string &serviceName, const std::string &userName)
std::shared_ptr< coral::IConnection > m_connection
bool setPermission(const std::string &principal, const std::string &role, const std::string &connectionString, const std::string &connectionLabel)
static const std::string DEFAULT_DATA_SOURCE
bool unsetPermission(const std::string &principal, const std::string &role, const std::string &connectionString)
std::string principalName
void openSession(const std::string &schemaName, const std::string &userName, const std::string &password, bool readMode)