dmlite 0.6
Authn.h
Go to the documentation of this file.
1/// @file core/builtin/Authn.h
2/// @brief User and group mapping using the system's ones.
3/// @details This will be used by default when no other Authn
4/// implementeation is loaded.
5/// @author Alejandro Álvarez Ayllon <aalvarez@cern.ch>
6#ifndef BUILTIN_AUTHN_H
7#define BUILTIN_AUTHN_H
8
9#include <dmlite/cpp/authn.h>
10
11namespace dmlite {
12
13 class BuiltInAuthn: public Authn {
14 public:
15 BuiltInAuthn(const std::string&, const std::string&);
17
18 std::string getImplId(void) const throw();
19
22
23 GroupInfo newGroup (const std::string& gname) ;
24 GroupInfo getGroup (gid_t gid) ;
25 GroupInfo getGroup (const std::string& groupName) ;
26 GroupInfo getGroup (const std::string& key,
27 const boost::any& value) ;
28 void updateGroup(const GroupInfo& group) ;
29 void deleteGroup(const std::string& groupName) ;
30
31 UserInfo newUser (const std::string& uname) ;
32 UserInfo getUser (const std::string& userName) ;
33 UserInfo getUser (const std::string& userName,
34 gid_t* group) ;
35 UserInfo getUser (const std::string& key,
36 const boost::any& value) ;
37 void updateUser(const UserInfo& user) ;
38 void deleteUser(const std::string& userName) ;
39
40 std::vector<GroupInfo> getGroups(void) ;
41 std::vector<UserInfo> getUsers (void) ;
42
43 void getIdMap(const std::string& userName,
44 const std::vector<std::string>& groupNames,
45 UserInfo* user,
46 std::vector<GroupInfo>* groups) ;
47 private:
48 std::string nobody_;
49 std::string nogroup_;
50 };
51
53 public:
56
57 void configure(const std::string& key, const std::string& value) ;
58
60
61 private:
62 std::string nobody_;
63 std::string nogroup_;
64 };
65
66};
67
68#endif // BUILTIN_AUTHN_H
AuthnFactory.
Definition authn.h:217
Definition authn.h:127
Definition Authn.h:52
std::string nogroup_
Definition Authn.h:63
Authn * createAuthn(PluginManager *pm)
Instantiate a implementation of Authn.
std::string nobody_
Definition Authn.h:62
void configure(const std::string &key, const std::string &value)
Definition Authn.h:13
void deleteGroup(const std::string &groupName)
Delete a group.
UserInfo newUser(const std::string &uname)
virtual SecurityContext * createSecurityContext()
GroupInfo getGroup(gid_t gid)
BuiltInAuthn(const std::string &, const std::string &)
void getIdMap(const std::string &userName, const std::vector< std::string > &groupNames, UserInfo *user, std::vector< GroupInfo > *groups)
GroupInfo getGroup(const std::string &key, const boost::any &value)
virtual SecurityContext * createSecurityContext(const SecurityCredentials &cred)
std::string nobody_
Definition Authn.h:48
GroupInfo newGroup(const std::string &gname)
std::string getImplId(void) const
String ID of the user DB implementation.
UserInfo getUser(const std::string &userName)
std::vector< GroupInfo > getGroups(void)
Get the group list.
std::vector< UserInfo > getUsers(void)
Get the user list.
void updateUser(const UserInfo &user)
std::string nogroup_
Definition Authn.h:49
UserInfo getUser(const std::string &userName, gid_t *group)
void deleteUser(const std::string &userName)
Delete a user.
GroupInfo getGroup(const std::string &groupName)
UserInfo getUser(const std::string &key, const boost::any &value)
void updateGroup(const GroupInfo &group)
Definition authn.h:61
CatalogInterface can only be instantiated through this class.
Definition dmlite.h:42
Security context. To be created by the Authn.
Definition authn.h:73
Security credentials. To be filled by the front-end.
Definition authn.h:23
Definition authn.h:49
Authentication API. Any sort of security check is plugin-specific.
Namespace for the dmlite C++ API.
Definition authn.h:16