]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_rest_iam.h
0822f6f7e68932ef1d9526b0bfa5f3b47f4ba614
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 const std::string
& post_body
;
13 RGWOp
*op_post() override
;
14 void rgw_iam_parse_input();
17 static int init_from_header(struct req_state
*s
, int default_formatter
, bool configurable_format
);
19 RGWHandler_REST_IAM(const rgw::auth::StrategyRegistry
& auth_registry
,
20 const std::string
& post_body
="")
22 auth_registry(auth_registry
),
23 post_body(post_body
) {}
24 ~RGWHandler_REST_IAM() override
= default;
26 int init(rgw::sal::Store
* store
,
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(struct req_state
* const s
,
39 const std::string
& uri
,
40 std::string
* const out_uri
) override
{
44 RGWHandler_REST
* get_handler(rgw::sal::Store
* store
,
46 const rgw::auth::StrategyRegistry
&,
47 const std::string
&) override
;