]>
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"
9 class RGWHandler_REST_IAM
: public RGWHandler_REST
{
10 const rgw::auth::StrategyRegistry
& auth_registry
;
11 const string
& post_body
;
12 RGWOp
*op_post() override
;
13 void rgw_iam_parse_input();
16 static int init_from_header(struct req_state
*s
, int default_formatter
, bool configurable_format
);
18 RGWHandler_REST_IAM(const rgw::auth::StrategyRegistry
& auth_registry
, const string
& post_body
="")
20 auth_registry(auth_registry
),
21 post_body(post_body
) {}
22 ~RGWHandler_REST_IAM() override
= default;
24 int init(rgw::sal::RGWRadosStore
*store
,
26 rgw::io::BasicClient
*cio
) override
;
27 int authorize(const DoutPrefixProvider
* dpp
) override
;
28 int postauth_init() override
{ return 0; }
31 class RGWRESTMgr_IAM
: public RGWRESTMgr
{
33 RGWRESTMgr_IAM() = default;
34 ~RGWRESTMgr_IAM() override
= default;
36 RGWRESTMgr
*get_resource_mgr(struct req_state
* const s
,
37 const std::string
& uri
,
38 std::string
* const out_uri
) override
{
42 RGWHandler_REST
* get_handler(struct req_state
*,
43 const rgw::auth::StrategyRegistry
&,
44 const std::string
&) override
;