Go to the documentation of this file. 1 #ifndef CondCore_CondDB_CredentialStore_h
2 #define CondCore_CondDB_CredentialStore_h
12 #include "CoralBase/MessageStream.h"
16 class AuthenticationCredentials;
17 class IAuthenticationCredentials;
67 const std::map<std::pair<std::string, std::string>, coral::AuthenticationCredentials*>&
data()
const;
73 std::map<std::pair<std::string, std::string>, coral::AuthenticationCredentials*>
m_data;
129 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 m_authenticatedPrincipal
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
std::string to_lower(const std::string &s)
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
size_t unsetPermission(const std::string &principal, const std::string &role, const std::string &connectionString)
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
std::string principalName
void openSession(const std::string &schemaName, const std::string &userName, const std::string &password, bool readMode)