summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_auth.cc
diff options
context:
space:
mode:
authorPritha Srivastava <prsrivas@redhat.com>2021-06-07 17:25:11 +0200
committerPritha Srivastava <prsrivas@redhat.com>2021-06-09 11:09:10 +0200
commitea61dd2c54377ba4a58a6c08ce9156068d36993b (patch)
tree444a94898da5b2cd687f211d03de3d72b01b34cd /src/rgw/rgw_auth.cc
parentMerge pull request #41708 from tchaikov/wip-seastore-open-coll (diff)
downloadceph-ea61dd2c54377ba4a58a6c08ce9156068d36993b.tar.xz
ceph-ea61dd2c54377ba4a58a6c08ce9156068d36993b.zip
rgw/sts: adding role name and role session to ops log.
Also adding authentication type for all ops. Fixes: https://tracker.ceph.com/issues/51152 Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
Diffstat (limited to 'src/rgw/rgw_auth.cc')
-rw-r--r--src/rgw/rgw_auth.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rgw/rgw_auth.cc b/src/rgw/rgw_auth.cc
index 9d7ce187673..03026425515 100644
--- a/src/rgw/rgw_auth.cc
+++ b/src/rgw/rgw_auth.cc
@@ -829,6 +829,8 @@ void rgw::auth::RoleApplier::modify_request_state(const DoutPrefixProvider *dpp,
s->env.emplace("aws:TokenIssueTime", token_issued_at);
s->token_claims.emplace_back("sts");
+ s->token_claims.emplace_back("role_name:" + role.tenant + "$" + role.name);
+ s->token_claims.emplace_back("role_session:" + role_session_name);
for (auto& it : token_claims) {
s->token_claims.emplace_back(it);
}