Kinetic C/C++ Client
 All Classes Functions Variables Pages
acls.h
1 /*
2  * kinetic-cpp-client
3  * Copyright (C) 2014 Seagate Technology.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  */
20 
21 #ifndef KINETIC_CPP_CLIENT_ACLS_H_
22 #define KINETIC_CPP_CLIENT_ACLS_H_
23 
24 #include <string>
25 #include <list>
26 
27 namespace kinetic {
28 
29 typedef enum { READ, WRITE, DELETE, RANGE, SETUP, P2POP, GETLOG, SECURITY } Permission;
30 
34 typedef struct {
35  int64_t offset;
36  std::string value;
37 
39  std::list<Permission> permissions;
40 } Scope;
41 
42 typedef struct {
44  int64_t identity;
45 
47  std::string hmac_key;
48 
51  std::list<Scope> scopes;
52 } ACL;
53 
54 } // namespace kinetic
55 
56 #endif // KINETIC_CPP_CLIENT_ACLS_H_
int64_t identity
User ID.
Definition: acls.h:44
std::string hmac_key
Key to use for authenticating requests.
Definition: acls.h:47
The permissions apply to keys that have value at offset. For example, if offset is 0 and value is "lo...
Definition: acls.h:34
std::list< Scope > scopes
List of scopes the user can operate in. For instance, a user might only have permission to write to a...
Definition: acls.h:51
std::list< Permission > permissions
The operations the user can perform on the specified key range.
Definition: acls.h:39