From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/rgw/rgw_rest_iam.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/rgw/rgw_rest_iam.h (limited to 'src/rgw/rgw_rest_iam.h') diff --git a/src/rgw/rgw_rest_iam.h b/src/rgw/rgw_rest_iam.h new file mode 100644 index 00000000..e9dbfcd0 --- /dev/null +++ b/src/rgw/rgw_rest_iam.h @@ -0,0 +1,49 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + +#ifndef CEPH_RGW_REST_IAM_H +#define CEPH_RGW_REST_IAM_H + +#include "rgw_auth.h" +#include "rgw_auth_filters.h" + +class RGWHandler_REST_IAM : public RGWHandler_REST { + const rgw::auth::StrategyRegistry& auth_registry; + const string& post_body; + RGWOp *op_post() override; + void rgw_iam_parse_input(); +public: + + static int init_from_header(struct req_state *s, int default_formatter, bool configurable_format); + + RGWHandler_REST_IAM(const rgw::auth::StrategyRegistry& auth_registry, const string& post_body="") + : RGWHandler_REST(), + auth_registry(auth_registry), + post_body(post_body) {} + ~RGWHandler_REST_IAM() override = default; + + int init(RGWRados *store, + struct req_state *s, + rgw::io::BasicClient *cio) override; + int authorize(const DoutPrefixProvider* dpp) override; + int postauth_init() override { return 0; } +}; + +class RGWRESTMgr_IAM : public RGWRESTMgr { +public: + RGWRESTMgr_IAM() = default; + ~RGWRESTMgr_IAM() override = default; + + RGWRESTMgr *get_resource_mgr(struct req_state* const s, + const std::string& uri, + std::string* const out_uri) override { + return this; + } + + RGWHandler_REST* get_handler(struct req_state*, + const rgw::auth::StrategyRegistry&, + const std::string&) override; +}; + +#endif /* CEPH_RGW_REST_STS_H */ + -- cgit v1.2.3