]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_rest_iam.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
7 #include "rgw_auth_filters.h"
10 class RGWHandler_REST_IAM
: public RGWHandler_REST
{
11 const rgw::auth::StrategyRegistry
& auth_registry
;
12 bufferlist bl_post_body
;
13 RGWOp
*op_post() override
;
17 static bool action_exists(const req_state
* s
);
19 RGWHandler_REST_IAM(const rgw::auth::StrategyRegistry
& auth_registry
,
20 bufferlist
& bl_post_body
)
22 auth_registry(auth_registry
),
23 bl_post_body(bl_post_body
) {}
24 ~RGWHandler_REST_IAM() override
= default;
26 int init(rgw::sal::Driver
* driver
,
28 rgw::io::BasicClient
*cio
) override
;
29 int authorize(const DoutPrefixProvider
* dpp
, optional_yield y
) override
;
30 int postauth_init(optional_yield y
) override
{ return 0; }
33 class RGWRESTMgr_IAM
: public RGWRESTMgr
{
35 RGWRESTMgr_IAM() = default;
36 ~RGWRESTMgr_IAM() override
= default;
38 RGWRESTMgr
*get_resource_mgr(req_state
* const s
,
39 const std::string
& uri
,
40 std::string
* const out_uri
) override
{
44 RGWHandler_REST
* get_handler(rgw::sal::Driver
* driver
,
46 const rgw::auth::StrategyRegistry
&,
47 const std::string
&) override
;