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 
11 namespace dmlite {
12 
13  class BuiltInAuthn: public Authn {
14  public:
15  BuiltInAuthn(const std::string&, const std::string&);
16  ~BuiltInAuthn();
17 
18  std::string getImplId(void) const throw();
19 
21 
22  GroupInfo newGroup (const std::string& gname) throw (DmException);
23  GroupInfo getGroup (gid_t gid) throw (DmException);
24  GroupInfo getGroup (const std::string& groupName) throw (DmException);
25  GroupInfo getGroup (const std::string& key,
26  const boost::any& value) throw (DmException);
27  void updateGroup(const GroupInfo& group) throw (DmException);
28  void deleteGroup(const std::string& groupName) throw (DmException);
29 
30  UserInfo newUser (const std::string& uname) throw (DmException);
31  UserInfo getUser (const std::string& userName) throw (DmException);
32  UserInfo getUser (const std::string& userName,
33  gid_t* group) throw (DmException);
34  UserInfo getUser (const std::string& key,
35  const boost::any& value) throw (DmException);
36  void updateUser(const UserInfo& user) throw (DmException);
37  void deleteUser(const std::string& userName) throw (DmException);
38 
39  std::vector<GroupInfo> getGroups(void) throw (DmException);
40  std::vector<UserInfo> getUsers (void) throw (DmException);
41 
42  void getIdMap(const std::string& userName,
43  const std::vector<std::string>& groupNames,
44  UserInfo* user,
45  std::vector<GroupInfo>* groups) throw (DmException);
46  private:
47  std::string nobody_;
48  std::string nogroup_;
49  };
50 
52  public:
55 
56  void configure(const std::string& key, const std::string& value) throw (DmException);
57 
59 
60  private:
61  std::string nobody_;
62  std::string nogroup_;
63  };
64 
65 };
66 
67 #endif // BUILTIN_AUTHN_H
Definition: authn.h:42
UserInfo newUser(const std::string &uname)
BuiltInAuthn(const std::string &, const std::string &)
void updateUser(const UserInfo &user)
Authn * createAuthn(PluginManager *pm)
Instantiate a implementation of Authn.
Security context. To be created by the Authn.
Definition: authn.h:64
Base exception class.
Definition: exceptions.h:17
void updateGroup(const GroupInfo &group)
CatalogInterface can only be instantiated through this class.
Definition: dmlite.h:41
Definition: authn.h:87
std::string nobody_
Definition: Authn.h:61
std::string nogroup_
Definition: Authn.h:48
std::string nogroup_
Definition: Authn.h:62
AuthnFactory.
Definition: authn.h:177
Authentication API. Any sort of security check is plugin-specific.
std::vector< GroupInfo > getGroups(void)
Get the group list.
GroupInfo newGroup(const std::string &gname)
void deleteUser(const std::string &userName)
Delete a user.
Definition: Authn.h:51
Definition: authn.h:53
Definition: Authn.h:13
void getIdMap(const std::string &userName, const std::vector< std::string > &groupNames, UserInfo *user, std::vector< GroupInfo > *groups)
std::vector< UserInfo > getUsers(void)
Get the user list.
GroupInfo getGroup(gid_t gid)
std::string getImplId(void) const
String ID of the user DB implementation.
void deleteGroup(const std::string &groupName)
Delete a group.
virtual SecurityContext * createSecurityContext(void)
Security credentials. To be filled by the front-end.
Definition: authn.h:22
std::string nobody_
Definition: Authn.h:47
UserInfo getUser(const std::string &userName)
void configure(const std::string &key, const std::string &value)