CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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

◆ addSequence()

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

Definition at line 728 of file CredentialStore.cc.

728  {
729  // Create the entry in the table
730  coral::AttributeList insertData;
731  insertData.extend<std::string>(SEQUENCE_NAME_COL);
732  insertData.extend<int>(SEQUENCE_VALUE_COL);
733  coral::AttributeList::iterator iAttribute = insertData.begin();
734  iAttribute->data<std::string>() = name;
735  ++iAttribute;
736  iAttribute->data<int>() = -1;
737  schema.tableHandle(SEQUENCE_TABLE_NAME).dataEditor().insertRow(insertData);
738 }

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

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

◆ ADMIN_KEY_COL()

static const std::string ADMIN_KEY_COL ( "CRED2"  )
static

◆ AUTH_ID_COL()

static const std::string AUTH_ID_COL ( "AUTH_ID"  )
static

◆ AUTH_KEY_COL()

static const std::string AUTH_KEY_COL ( "CRED3"  )
static

◆ C_ID_COL()

static const std::string C_ID_COL ( "C_ID"  )
static

◆ COND_AUTHENTICATION_TABLE()

static const std::string COND_AUTHENTICATION_TABLE ( "COND_AUTHENTICATION"  )
static

◆ COND_AUTHORIZATION_TABLE()

static const std::string COND_AUTHORIZATION_TABLE ( "COND_AUTHORIZATION"  )
static

◆ COND_CREDENTIAL_TABLE()

static const std::string COND_CREDENTIAL_TABLE ( "COND_CREDENTIAL"  )
static

◆ CONNECTION_ID_COL()

static const std::string CONNECTION_ID_COL ( "CONN_ID"  )
static

◆ CONNECTION_KEY_COL()

static const std::string CONNECTION_KEY_COL ( "CRED7"  )
static

◆ CONNECTION_LABEL_COL()

static const std::string CONNECTION_LABEL_COL ( "CONN_LABEL"  )
static

◆ DEFAULT_DATA_SOURCE()

const std::string DEFAULT_DATA_SOURCE ( "Cond_Default_Authentication"  )

◆ P_ID_COL()

static const std::string P_ID_COL ( "P_ID"  )
static

◆ PASSWORD_COL()

static const std::string PASSWORD_COL ( "CRED5"  )
static

◆ PRINCIPAL_ID_COL()

static const std::string PRINCIPAL_ID_COL ( "P_ID"  )
static

◆ PRINCIPAL_KEY_COL()

static const std::string PRINCIPAL_KEY_COL ( "CRED1"  )
static

◆ PRINCIPAL_NAME_COL()

static const std::string PRINCIPAL_NAME_COL ( "P_NAME"  )
static

◆ ROLE_COL()

static const std::string ROLE_COL ( "C_ROLE"  )
static

◆ SCHEMA_COL()

static const std::string SCHEMA_COL ( "C_SCHEMA"  )
static

◆ SEQUENCE_NAME_COL()

static const std::string SEQUENCE_NAME_COL ( "NAME"  )
static

◆ SEQUENCE_TABLE_NAME()

static const std::string SEQUENCE_TABLE_NAME ( "COND_CREDENTIAL_SEQUENCE"  )
static

◆ SEQUENCE_VALUE_COL()

static const std::string SEQUENCE_VALUE_COL ( "VALUE"  )
static

◆ USERNAME_COL()

static const std::string USERNAME_COL ( "CRED4"  )
static

◆ VERIFICATION_COL()

static const std::string VERIFICATION_COL ( "CRED0"  )
static

◆ VERIFICATION_KEY_COL()

static const std::string VERIFICATION_KEY_COL ( "CRED6"  )
static

Variable Documentation

◆ serviceName

const std::string serviceName = "CondAuthenticationService"
static
SEQUENCE_NAME_COL
static const std::string SEQUENCE_NAME_COL("NAME")
SEQUENCE_TABLE_NAME
static const std::string SEQUENCE_TABLE_NAME("COND_CREDENTIAL_SEQUENCE")
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
SEQUENCE_VALUE_COL
static const std::string SEQUENCE_VALUE_COL("VALUE")