CMS 3D CMS Logo

Classes | Namespaces | Functions | Variables
CredentialStore.cc File Reference
#include "CondCore/CondDB/interface/CredentialStore.h"
#include "CondCore/CondDB/interface/Cipher.h"
#include "CondCore/CondDB/interface/Exception.h"
#include "CondCore/CondDB/interface/Auth.h"
#include "CoralBase/AttributeList.h"
#include "CoralBase/Attribute.h"
#include "CoralKernel/Context.h"
#include "CoralCommon/URIParser.h"
#include "RelationalAccess/AuthenticationCredentials.h"
#include "RelationalAccess/IBulkOperation.h"
#include "RelationalAccess/IConnection.h"
#include "RelationalAccess/ISession.h"
#include "RelationalAccess/IRelationalService.h"
#include "RelationalAccess/IRelationalDomain.h"
#include "RelationalAccess/ITransaction.h"
#include "RelationalAccess/ISchema.h"
#include "RelationalAccess/ITable.h"
#include "RelationalAccess/TableDescription.h"
#include "RelationalAccess/ITableDataEditor.h"
#include "RelationalAccess/ITablePrivilegeManager.h"
#include "RelationalAccess/IQuery.h"
#include "RelationalAccess/ICursor.h"
#include <sstream>
#include <fstream>
#include <boost/filesystem.hpp>

Go to the source code of this file.

Classes

struct  cond::AuthorizationData
 
struct  cond::CredentialData
 
class  cond::CSScopedSession
 
struct  cond::PrincipalData
 

Namespaces

 cond
 

Functions

void addSequence (coral::ISchema &schema, const std::string &name)
 
static const std::string ADMIN_KEY_COL ("CRED2")
 
static const std::string AUTH_ID_COL ("AUTH_ID")
 
static const std::string AUTH_KEY_COL ("CRED3")
 
static const std::string C_ID_COL ("C_ID")
 
static const std::string COND_AUTHENTICATION_TABLE ("COND_AUTHENTICATION")
 
static const std::string COND_AUTHORIZATION_TABLE ("COND_AUTHORIZATION")
 
static const std::string COND_CREDENTIAL_TABLE ("COND_CREDENTIAL")
 
static const std::string CONNECTION_ID_COL ("CONN_ID")
 
static const std::string CONNECTION_KEY_COL ("CRED7")
 
static const std::string CONNECTION_LABEL_COL ("CONN_LABEL")
 
const std::string DEFAULT_DATA_SOURCE ("Cond_Default_Authentication")
 
bool cond::getNextSequenceValue (coral::ISchema &schema, const std::string &sequenceName, int &value)
 
static const std::string P_ID_COL ("P_ID")
 
static const std::string PASSWORD_COL ("CRED5")
 
static const std::string PRINCIPAL_ID_COL ("P_ID")
 
static const std::string PRINCIPAL_KEY_COL ("CRED1")
 
static const std::string PRINCIPAL_NAME_COL ("P_NAME")
 
static const std::string ROLE_COL ("C_ROLE")
 
static const std::string SCHEMA_COL ("C_SCHEMA")
 
std::string cond::schemaLabel (const std::string &serviceName, const std::string &userName)
 
std::string cond::schemaLabelForCredentialStore (const std::string &connectionString)
 
bool cond::selectAuthorization (coral::ISchema &schema, int principalId, const std::string &role, const std::string &connectionString, AuthorizationData &destination)
 
bool cond::selectConnection (coral::ISchema &schema, const std::string &connectionLabel, CredentialData &destination)
 
bool cond::selectPrincipal (coral::ISchema &schema, const std::string &principal, PrincipalData &destination)
 
static const std::string SEQUENCE_NAME_COL ("NAME")
 
static const std::string SEQUENCE_TABLE_NAME ("COND_CREDENTIAL_SEQUENCE")
 
static const std::string SEQUENCE_VALUE_COL ("VALUE")
 
bool cond::setPermissionData (coral::ISchema &schema, int principalId, const std::string &principalKey, const std::string &role, const std::string &connectionString, int connectionId, const std::string &connectionKey)
 
std::pair< int, std::string > cond::updateConnectionData (coral::ISchema &schema, const std::string &adminKey, const std::string &connectionLabel, const std::string &userName, const std::string &password, bool forceUpdate)
 
std::pair< int, std::string > cond::updatePrincipalData (coral::ISchema &schema, const std::string &authenticationKey, const std::string &principalName, const std::string &adminKey, bool init=false)
 
static const std::string USERNAME_COL ("CRED4")
 
static const std::string VERIFICATION_COL ("CRED0")
 
static const std::string VERIFICATION_KEY_COL ("CRED6")
 

Variables

static const std::string serviceName = "CondAuthenticationService"
 

Function Documentation

void addSequence ( coral::ISchema &  schema,
const std::string &  name 
)

Definition at line 768 of file CredentialStore.cc.

References SEQUENCE_NAME_COL(), SEQUENCE_TABLE_NAME(), SEQUENCE_VALUE_COL(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by cond::CredentialStore::createSchema().

768  {
769  // Create the entry in the table
770  coral::AttributeList insertData;
771  insertData.extend<std::string>( SEQUENCE_NAME_COL );
772  insertData.extend<int>(SEQUENCE_VALUE_COL);
773  coral::AttributeList::iterator iAttribute = insertData.begin();
774  iAttribute->data< std::string >() = name;
775  ++iAttribute;
776  iAttribute->data< int >() = -1;
777  schema.tableHandle( SEQUENCE_TABLE_NAME ).dataEditor().insertRow( insertData );
778 }
static const std::string SEQUENCE_VALUE_COL("VALUE")
static const std::string SEQUENCE_TABLE_NAME("COND_CREDENTIAL_SEQUENCE")
static const std::string SEQUENCE_NAME_COL("NAME")
static const std::string ADMIN_KEY_COL ( "CRED2"  )
static
static const std::string AUTH_ID_COL ( "AUTH_ID"  )
static
static const std::string AUTH_KEY_COL ( "CRED3"  )
static
static const std::string C_ID_COL ( "C_ID"  )
static
static const std::string COND_AUTHENTICATION_TABLE ( "COND_AUTHENTICATION"  )
static
static const std::string COND_AUTHORIZATION_TABLE ( "COND_AUTHORIZATION"  )
static
static const std::string COND_CREDENTIAL_TABLE ( "COND_CREDENTIAL"  )
static
static const std::string CONNECTION_ID_COL ( "CONN_ID"  )
static
static const std::string CONNECTION_KEY_COL ( "CRED7"  )
static
static const std::string CONNECTION_LABEL_COL ( "CONN_LABEL"  )
static
const std::string DEFAULT_DATA_SOURCE ( "Cond_Default_Authentication"  )
static const std::string P_ID_COL ( "P_ID"  )
static
static const std::string PASSWORD_COL ( "CRED5"  )
static
static const std::string PRINCIPAL_ID_COL ( "P_ID"  )
static
static const std::string PRINCIPAL_KEY_COL ( "CRED1"  )
static
static const std::string PRINCIPAL_NAME_COL ( "P_NAME"  )
static
static const std::string ROLE_COL ( "C_ROLE"  )
static
static const std::string SCHEMA_COL ( "C_SCHEMA"  )
static
static const std::string SEQUENCE_NAME_COL ( "NAME"  )
static
static const std::string SEQUENCE_TABLE_NAME ( "COND_CREDENTIAL_SEQUENCE"  )
static
static const std::string SEQUENCE_VALUE_COL ( "VALUE"  )
static
static const std::string USERNAME_COL ( "CRED4"  )
static
static const std::string VERIFICATION_COL ( "CRED0"  )
static
static const std::string VERIFICATION_KEY_COL ( "CRED6"  )
static

Variable Documentation

const std::string serviceName = "CondAuthenticationService"
static