CMS 3D CMS Logo

Auth.h
Go to the documentation of this file.
1 #ifndef CondCore_CondDB_Auth_h
2 #define CondCore_CondDB_Auth_h
3 
4 #include <string>
5 #include <set>
6 
7 namespace cond {
8 
9  namespace auth {
10 
11  static constexpr const char* const COND_AUTH_PATH = "COND_AUTH_PATH";
12  static constexpr const char* const COND_AUTH_SYS = "COND_AUTH_SYS";
13 
14  static constexpr const char* const COND_ADMIN_GROUP = "COND_ADMIN_GROUP";
15 
16  static constexpr const char* const COND_DEFAULT_ROLE = "COND_DEFAULT_ROLE";
17  static constexpr const char* const COND_WRITER_ROLE = "COND_WRITER_ROLE";
18  static constexpr const char* const COND_READER_ROLE = "COND_READER_ROLE";
19  static constexpr const char* const COND_ADMIN_ROLE = "COND_ADMIN_ROLE";
20 
21  static const std::set<std::string> ROLES = {std::string(COND_DEFAULT_ROLE),
25 
26  typedef enum { DEFAULT_ROLE = 0, READER_ROLE = 1, WRITER_ROLE = 2, ADMIN_ROLE = 3 } RoleCode;
27 
28  static const std::pair<const char*, RoleCode> s_roleCodeArray[] = {std::make_pair(COND_DEFAULT_ROLE, DEFAULT_ROLE),
29  std::make_pair(COND_READER_ROLE, READER_ROLE),
30  std::make_pair(COND_WRITER_ROLE, WRITER_ROLE),
31  std::make_pair(COND_ADMIN_ROLE, ADMIN_ROLE)};
32 
33  static constexpr const char* const COND_DEFAULT_PRINCIPAL = "COND_DEFAULT_PRINCIPAL";
34 
35  static constexpr const char* const COND_KEY = "Memento";
36 
37  static constexpr unsigned int COND_AUTHENTICATION_KEY_SIZE = 30;
38  static constexpr unsigned int COND_DB_KEY_SIZE = 30;
39 
40  static constexpr size_t COND_SESSION_HASH_SIZE = 16;
41 
42  static constexpr int COND_SESSION_HASH_CODE = 4;
43  static constexpr int COND_DBKEY_CREDENTIAL_CODE = 1;
44 
45  static constexpr int COND_DBTAG_LOCK_ACCESS_CODE = 8;
46  static constexpr int COND_DBTAG_WRITE_ACCESS_CODE = 2;
47  static constexpr int COND_DBTAG_READ_ACCESS_CODE = 1;
48  static constexpr int COND_DBTAG_NO_PROTECTION_CODE = 0;
49 
50  static constexpr const char* const COND_AUTH_PATH_PROPERTY = "AuthenticationFile";
51  } // namespace auth
52 
53 } // namespace cond
54 #endif
cond::auth::COND_READER_ROLE
static constexpr const char *const COND_READER_ROLE
Definition: Auth.h:18
cond::auth::COND_ADMIN_ROLE
static constexpr const char *const COND_ADMIN_ROLE
Definition: Auth.h:19
cond::auth::COND_DBTAG_LOCK_ACCESS_CODE
static constexpr int COND_DBTAG_LOCK_ACCESS_CODE
Definition: Auth.h:45
cond::auth::READER_ROLE
Definition: Auth.h:26
cond::auth::COND_DBKEY_CREDENTIAL_CODE
static constexpr int COND_DBKEY_CREDENTIAL_CODE
Definition: Auth.h:43
cond::auth::COND_ADMIN_GROUP
static constexpr const char *const COND_ADMIN_GROUP
Definition: Auth.h:14
cond::auth::s_roleCodeArray
static const std::pair< const char *, RoleCode > s_roleCodeArray[]
Definition: Auth.h:28
cond::auth::COND_DEFAULT_PRINCIPAL
static constexpr const char *const COND_DEFAULT_PRINCIPAL
Definition: Auth.h:33
cond::auth::RoleCode
RoleCode
Definition: Auth.h:26
cond::auth::COND_WRITER_ROLE
static constexpr const char *const COND_WRITER_ROLE
Definition: Auth.h:17
cond::auth::COND_AUTH_SYS
static constexpr const char *const COND_AUTH_SYS
Definition: Auth.h:12
cond::auth::COND_SESSION_HASH_CODE
static constexpr int COND_SESSION_HASH_CODE
Definition: Auth.h:42
cond::auth::COND_DEFAULT_ROLE
static constexpr const char *const COND_DEFAULT_ROLE
Definition: Auth.h:16
cond
Definition: plugin.cc:23
cond::auth::COND_KEY
static constexpr const char *const COND_KEY
Definition: Auth.h:35
cond::auth::ADMIN_ROLE
Definition: Auth.h:26
cond::auth::COND_DBTAG_WRITE_ACCESS_CODE
static constexpr int COND_DBTAG_WRITE_ACCESS_CODE
Definition: Auth.h:46
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond::auth::COND_SESSION_HASH_SIZE
static constexpr size_t COND_SESSION_HASH_SIZE
Definition: Auth.h:40
beamvalidation.auth
auth
Definition: beamvalidation.py:383
cond::auth::COND_AUTH_PATH
static constexpr const char *const COND_AUTH_PATH
Definition: Auth.h:11
cond::auth::WRITER_ROLE
Definition: Auth.h:26
cond::auth::COND_AUTH_PATH_PROPERTY
static constexpr const char *const COND_AUTH_PATH_PROPERTY
Definition: Auth.h:50
cond::auth::DEFAULT_ROLE
Definition: Auth.h:26
cond::auth::ROLES
static const std::set< std::string > ROLES
Definition: Auth.h:21
cond::auth::COND_AUTHENTICATION_KEY_SIZE
static constexpr unsigned int COND_AUTHENTICATION_KEY_SIZE
Definition: Auth.h:37
cond::auth::COND_DBTAG_NO_PROTECTION_CODE
static constexpr int COND_DBTAG_NO_PROTECTION_CODE
Definition: Auth.h:48
cond::auth::COND_DBTAG_READ_ACCESS_CODE
static constexpr int COND_DBTAG_READ_ACCESS_CODE
Definition: Auth.h:47
cond::auth::COND_DB_KEY_SIZE
static constexpr unsigned int COND_DB_KEY_SIZE
Definition: Auth.h:38