1 #ifndef INCLUDE_COND_CREDENTIALSTORE_H
2 #define INCLUDE_COND_CREDENTAILSTORE_H
9 #include <boost/shared_ptr.hpp>
14 class AuthenticationCredentials;
15 class IAuthenticationCredentials;
21 namespace coral_bridge {
64 const std::map< std::pair<std::string,std::string>, coral::AuthenticationCredentials* >&
data()
const ;
70 std::map< std::pair<std::string,std::string>, coral::AuthenticationCredentials* >
m_data;
const std::string & keyPrincipalName()
std::map< std::pair< std::string, std::string >, coral::AuthenticationCredentials * > m_data
credentials for the specific roles
bool updatePrincipal(const std::string &principal, const std::string &principalKey, bool setAdmin=false)
CredentialStore()
Standard Constructor.
std::string m_principalKey
virtual ~AuthenticationCredentialSet()
Destructor.
bool removeConnection(const std::string &connectionLabel)
void openSession(const std::string &schemaName, const std::string &userName, const std::string &password, bool readMode)
AuthenticationCredentialSet()
Constructor.
bool listConnections(std::map< std::string, std::pair< std::string, std::string > > &destination)
const ServiceCredentials * m_serviceData
std::string m_serviceName
static const std::string serviceName
std::string principalName
void closeSession(bool commit=true)
void registerItem(const std::string &connectionString, const std::string &itemName, const std::string &itemValue)
std::string connectionString
const std::map< std::pair< std::string, std::string >, coral::AuthenticationCredentials * > & data() const
void startSession(bool readMode)
bool updateConnection(const std::string &connectionLabel, const std::string &userName, const std::string &password)
bool createSchema(const std::string &connectionString, const std::string &userName, const std::string &password)
bool exportAll(coral_bridge::AuthenticationCredentialSet &data)
std::string schemaLabel(const std::string &serviceName, const std::string &userName)
bool listPrincipals(std::vector< std::string > &destination)
std::string setUpForConnectionString(const std::string &connectionString, const std::string &authPath)
int addUser(const std::string &principalName, const std::string &authenticationKey, const std::string &principalKey, const std::string &adminKey)
std::string setUpForService(const std::string &serviceName, const std::string &authPath)
Sets the initialization parameters.
bool importForPrincipal(const std::string &principal, const coral_bridge::AuthenticationCredentialSet &data, bool forceUpdateConnection=false)
import data
bool setPermission(const std::string &principal, const std::string &role, const std::string &connectionString, const std::string &connectionLabel)
virtual ~CredentialStore()
Standard Destructor.
bool selectForUser(coral_bridge::AuthenticationCredentialSet &destinationData)
bool removePrincipal(const std::string &principal)
void startSuperSession(const std::string &connectionString, const std::string &userName, const std::string &password)
bool installAdmin(const std::string &userName, const std::string &password)
boost::shared_ptr< coral::ISession > m_session
bool selectPermissions(const std::string &principalName, const std::string &role, const std::string &connectionString, std::vector< Permission > &destination)
static const std::string DEFAULT_DATA_SOURCE
boost::shared_ptr< coral::IConnection > m_connection
void registerCredentials(const std::string &connectionString, const std::string &userName, const std::string &password)
std::pair< std::string, std::string > openConnection(const std::string &connectionString)
char data[epos_bytes_allocation]
bool drop(const std::string &connectionString, const std::string &userName, const std::string &password)
std::string connectionLabel
bool unsetPermission(const std::string &principal, const std::string &role, const std::string &connectionString)