summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_auth_s3.h
diff options
context:
space:
mode:
authorCory Snyder <csnyder@iland.com>2022-06-01 11:04:24 +0200
committerCory Snyder <csnyder@iland.com>2022-06-06 10:05:52 +0200
commitebf4209fa74e6cfa56aa364e8164304b86fca0b3 (patch)
tree034521cd40fa65eddf4ec861aa080b1ee7c81978 /src/rgw/rgw_auth_s3.h
parentMerge pull request #46367 from 0xavi0/dbstore-default-dbdir-rgw-data (diff)
downloadceph-ebf4209fa74e6cfa56aa364e8164304b86fca0b3.tar.xz
ceph-ebf4209fa74e6cfa56aa364e8164304b86fca0b3.zip
rgw: log identity applier metadata in ops logs
As relevant, logs the access key id, subuser, and whether a request was made via a temp_url in the ops logs for auditing purposes. Fixes: https://tracker.ceph.com/issues/53367 Signed-off-by: Cory Snyder <csnyder@iland.com>
Diffstat (limited to 'src/rgw/rgw_auth_s3.h')
-rw-r--r--src/rgw/rgw_auth_s3.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/rgw/rgw_auth_s3.h b/src/rgw/rgw_auth_s3.h
index edec31a3c6b..944d708191d 100644
--- a/src/rgw/rgw_auth_s3.h
+++ b/src/rgw/rgw_auth_s3.h
@@ -43,8 +43,7 @@ class STSAuthStrategy : public rgw::auth::Strategy,
aplptr_t create_apl_remote(CephContext* const cct,
const req_state* const s,
rgw::auth::RemoteApplier::acl_strategy_t&& acl_alg,
- const rgw::auth::RemoteApplier::AuthInfo &info
- ) const override {
+ const rgw::auth::RemoteApplier::AuthInfo &info) const override {
auto apl = rgw::auth::add_sysreq(cct, store, s,
rgw::auth::RemoteApplier(cct, store, std::move(acl_alg), info,
implicit_tenant_context,
@@ -56,9 +55,10 @@ class STSAuthStrategy : public rgw::auth::Strategy,
const req_state* const s,
const RGWUserInfo& user_info,
const std::string& subuser,
- const std::optional<uint32_t>& perm_mask) const override {
+ const std::optional<uint32_t>& perm_mask,
+ const std::string& access_key_id) const override {
auto apl = rgw::auth::add_sysreq(cct, store, s,
- rgw::auth::LocalApplier(cct, user_info, subuser, perm_mask));
+ rgw::auth::LocalApplier(cct, user_info, subuser, perm_mask, access_key_id));
return aplptr_t(new decltype(apl)(std::move(apl)));
}
@@ -109,8 +109,7 @@ class ExternalAuthStrategy : public rgw::auth::Strategy,
aplptr_t create_apl_remote(CephContext* const cct,
const req_state* const s,
rgw::auth::RemoteApplier::acl_strategy_t&& acl_alg,
- const rgw::auth::RemoteApplier::AuthInfo &info
- ) const override {
+ const rgw::auth::RemoteApplier::AuthInfo &info) const override {
auto apl = rgw::auth::add_sysreq(cct, store, s,
rgw::auth::RemoteApplier(cct, store, std::move(acl_alg), info,
implicit_tenant_context,
@@ -174,9 +173,10 @@ class AWSAuthStrategy : public rgw::auth::Strategy,
const req_state* const s,
const RGWUserInfo& user_info,
const std::string& subuser,
- const std::optional<uint32_t>& perm_mask) const override {
+ const std::optional<uint32_t>& perm_mask,
+ const std::string& access_key_id) const override {
auto apl = rgw::auth::add_sysreq(cct, store, s,
- rgw::auth::LocalApplier(cct, user_info, subuser, perm_mask));
+ rgw::auth::LocalApplier(cct, user_info, subuser, perm_mask, access_key_id));
/* TODO(rzarzynski): replace with static_ptr. */
return aplptr_t(new decltype(apl)(std::move(apl)));
}