#include <string_view>
#include <boost/container/static_vector.hpp>
-#include <boost/crc.hpp>
+#include <boost/crc.hpp>
#include "common/sstring.hh"
#include "rgw_op.h"
RGWPutACLs_ObjStore_S3() {}
~RGWPutACLs_ObjStore_S3() override {}
- int get_policy_from_state(rgw::sal::Store* store, struct req_state *s, std::stringstream& ss) override;
+ int get_policy_from_state(rgw::sal::Driver* driver, req_state *s, std::stringstream& ss) override;
void send_response() override;
int get_params(optional_yield y) override;
};
int get_params(optional_yield y) override;
void send_status() override;
void begin_response() override;
- void send_partial_response(rgw_obj_key& key, bool delete_marker,
- const std::string& marker_version_id, int ret) override;
+ void send_partial_response(const rgw_obj_key& key, bool delete_marker,
+ const std::string& marker_version_id, int ret,
+ boost::asio::deadline_timer *formatter_flush_cond) override;
void end_response() override;
};
class RGW_Auth_S3 {
public:
static int authorize(const DoutPrefixProvider *dpp,
- rgw::sal::Store* store,
+ rgw::sal::Driver* driver,
const rgw::auth::StrategyRegistry& auth_registry,
- struct req_state *s, optional_yield y);
+ req_state *s, optional_yield y);
};
class RGWHandler_Auth_S3 : public RGWHandler_REST {
static int validate_bucket_name(const std::string& bucket);
static int validate_object_name(const std::string& bucket);
- int init(rgw::sal::Store* store,
- struct req_state *s,
+ int init(rgw::sal::Driver* driver,
+ req_state *s,
rgw::io::BasicClient *cio) override;
int authorize(const DoutPrefixProvider *dpp, optional_yield y) override {
- return RGW_Auth_S3::authorize(dpp, store, auth_registry, s, y);
+ return RGW_Auth_S3::authorize(dpp, driver, auth_registry, s, y);
}
int postauth_init(optional_yield) override { return 0; }
};
protected:
const rgw::auth::StrategyRegistry& auth_registry;
public:
- static int init_from_header(rgw::sal::Store* store, struct req_state *s, int default_formatter, bool configurable_format);
+ static int init_from_header(rgw::sal::Driver* driver, req_state *s, RGWFormat default_formatter,
+ bool configurable_format);
explicit RGWHandler_REST_S3(const rgw::auth::StrategyRegistry& auth_registry)
: RGWHandler_REST(),
}
~RGWHandler_REST_S3() override = default;
- int init(rgw::sal::Store* store,
- struct req_state *s,
+ int init(rgw::sal::Driver* driver,
+ req_state *s,
rgw::io::BasicClient *cio) override;
int authorize(const DoutPrefixProvider *dpp, optional_yield y) override;
int postauth_init(optional_yield y) override;
class RGWHandler_REST_Service_S3 : public RGWHandler_REST_S3 {
protected:
- const bool isSTSEnabled;
- const bool isIAMEnabled;
- const bool isPSEnabled;
bool is_usage_op() const {
return s->info.args.exists("usage");
}
RGWOp *op_get() override;
RGWOp *op_head() override;
- RGWOp *op_post() override;
public:
- RGWHandler_REST_Service_S3(const rgw::auth::StrategyRegistry& auth_registry,
- bool _isSTSEnabled, bool _isIAMEnabled, bool _isPSEnabled) :
- RGWHandler_REST_S3(auth_registry), isSTSEnabled(_isSTSEnabled), isIAMEnabled(_isIAMEnabled), isPSEnabled(_isPSEnabled) {}
+ RGWHandler_REST_Service_S3(const rgw::auth::StrategyRegistry& auth_registry) :
+ RGWHandler_REST_S3(auth_registry) {}
~RGWHandler_REST_Service_S3() override = default;
};
~RGWRESTMgr_S3() override = default;
- RGWHandler_REST *get_handler(rgw::sal::Store* store,
- struct req_state* s,
+ RGWHandler_REST *get_handler(rgw::sal::Driver* driver,
+ req_state* s,
const rgw::auth::StrategyRegistry& auth_registry,
const std::string& frontend_prefix) override;
};
using result_t = rgw::auth::Engine::result_t;
protected:
- rgw::sal::Store* store;
+ rgw::sal::Driver* driver;
const rgw::auth::RemoteApplier::Factory* const apl_factory;
acl_strategy_t get_acl_strategy() const;
optional_yield y) const override;
public:
LDAPEngine(CephContext* const cct,
- rgw::sal::Store* store,
+ rgw::sal::Driver* driver,
const VersionAbstractor& ver_abstractor,
const rgw::auth::RemoteApplier::Factory* const apl_factory)
: AWSEngine(cct, ver_abstractor),
- store(store),
+ driver(driver),
apl_factory(apl_factory) {
init(cct);
}
};
class LocalEngine : public AWSEngine {
- rgw::sal::Store* store;
+ rgw::sal::Driver* driver;
const rgw::auth::LocalApplier::Factory* const apl_factory;
result_t authenticate(const DoutPrefixProvider* dpp,
optional_yield y) const override;
public:
LocalEngine(CephContext* const cct,
- rgw::sal::Store* store,
+ rgw::sal::Driver* driver,
const VersionAbstractor& ver_abstractor,
const rgw::auth::LocalApplier::Factory* const apl_factory)
: AWSEngine(cct, ver_abstractor),
- store(store),
+ driver(driver),
apl_factory(apl_factory) {
}
};
class STSEngine : public AWSEngine {
- rgw::sal::Store* store;
+ rgw::sal::Driver* driver;
const rgw::auth::LocalApplier::Factory* const local_apl_factory;
const rgw::auth::RemoteApplier::Factory* const remote_apl_factory;
const rgw::auth::RoleApplier::Factory* const role_apl_factory;
int get_session_token(const DoutPrefixProvider* dpp, const std::string_view& session_token,
STS::SessionToken& token) const;
- result_t authenticate(const DoutPrefixProvider* dpp,
+ result_t authenticate(const DoutPrefixProvider* dpp,
const std::string_view& access_key_id,
const std::string_view& signature,
const std::string_view& session_token,
optional_yield y) const override;
public:
STSEngine(CephContext* const cct,
- rgw::sal::Store* store,
+ rgw::sal::Driver* driver,
const VersionAbstractor& ver_abstractor,
const rgw::auth::LocalApplier::Factory* const local_apl_factory,
const rgw::auth::RemoteApplier::Factory* const remote_apl_factory,
const rgw::auth::RoleApplier::Factory* const role_apl_factory)
: AWSEngine(cct, ver_abstractor),
- store(store),
+ driver(driver),
local_apl_factory(local_apl_factory),
remote_apl_factory(remote_apl_factory),
role_apl_factory(role_apl_factory) {