]> git.proxmox.com Git - ceph.git/blame - ceph/src/rgw/rgw_rest_role.h
bump version to 12.0.3-pve3
[ceph.git] / ceph / src / rgw / rgw_rest_role.h
CommitLineData
7c673cae
FG
1#ifndef CEPH_RGW_REST_ROLE_H
2#define CEPH_RGW_REST_ROLE_H
3
4class RGWRestRole : public RGWOp {
5protected:
6 string role_name;
7 string role_path;
8 string trust_policy;
9 string policy_name;
10 string perm_policy;
11 string path_prefix;
12
13public:
14 void send_response() override;
15};
16
17class RGWRoleRead : public RGWRestRole {
18public:
19 RGWRoleRead() = default;
20 int verify_permission() override;
21 uint32_t op_mask() override { return RGW_OP_TYPE_READ; }
22};
23
24class RGWRoleWrite : public RGWRestRole {
25public:
26 RGWRoleWrite() = default;
27 int verify_permission() override;
28 uint32_t op_mask() override { return RGW_OP_TYPE_WRITE; }
29};
30
31class RGWCreateRole : public RGWRoleWrite {
32public:
33 RGWCreateRole() = default;
34 void execute() override;
35 int get_params();
36 const string name() override { return "create_role"; }
37 RGWOpType get_type() override { return RGW_OP_CREATE_ROLE; }
38};
39
40class RGWDeleteRole : public RGWRoleWrite {
41public:
42 RGWDeleteRole() = default;
43 void execute() override;
44 int get_params();
45 const string name() override { return "delete_role"; }
46 RGWOpType get_type() override { return RGW_OP_DELETE_ROLE; }
47};
48
49class RGWGetRole : public RGWRoleRead {
50public:
51 RGWGetRole() = default;
52 void execute() override;
53 int get_params();
54 const string name() override { return "get_role"; }
55 RGWOpType get_type() override { return RGW_OP_GET_ROLE; }
56};
57
58class RGWModifyRole : public RGWRoleWrite {
59public:
60 RGWModifyRole() = default;
61 void execute() override;
62 int get_params();
63 const string name() override { return "modify_role"; }
64 RGWOpType get_type() override { return RGW_OP_MODIFY_ROLE; }
65};
66
67class RGWListRoles : public RGWRoleRead {
68public:
69 RGWListRoles() = default;
70 void execute() override;
71 int get_params();
72 const string name() override { return "list_roles"; }
73 RGWOpType get_type() override { return RGW_OP_LIST_ROLES; }
74};
75
76class RGWPutRolePolicy : public RGWRoleWrite {
77public:
78 RGWPutRolePolicy() = default;
79 void execute() override;
80 int get_params();
81 const string name() override { return "put_role_policy"; }
82 RGWOpType get_type() override { return RGW_OP_PUT_ROLE_POLICY; }
83};
84
85class RGWGetRolePolicy : public RGWRoleRead {
86public:
87 RGWGetRolePolicy() = default;
88 void execute() override;
89 int get_params();
90 const string name() override { return "get_role_policy"; }
91 RGWOpType get_type() override { return RGW_OP_GET_ROLE_POLICY; }
92};
93
94class RGWListRolePolicies : public RGWRoleRead {
95public:
96 RGWListRolePolicies() = default;
97 void execute() override;
98 int get_params();
99 const string name() override { return "list_role_policies"; }
100 RGWOpType get_type() override { return RGW_OP_LIST_ROLE_POLICIES; }
101};
102
103class RGWDeleteRolePolicy : public RGWRoleWrite {
104public:
105 RGWDeleteRolePolicy() = default;
106 void execute() override;
107 int get_params();
108 const string name() override { return "delete_role_policy"; }
109 RGWOpType get_type() override { return RGW_OP_DELETE_ROLE_POLICY; }
110};
111#endif /* CEPH_RGW_REST_ROLE_H */
112