return id.tenant;
}
+ void write_ops_log_entry(rgw_log_entry& entry) const override {
+ if (account) {
+ entry.account_id = account->id;
+ }
+ }
+
void to_str(std::ostream& out) const override {
out << "RGWDummyIdentityApplier(auth_id=" << id
<< ", is_admin=" << is_admin << ")";
<< ", provider_id =" << iss << ")";
}
+void rgw::auth::WebIdentityApplier::write_ops_log_entry(rgw_log_entry& entry) const
+{
+ if (account) {
+ entry.account_id = account->id;
+ }
+ entry.role_id = role_id;
+}
+
string rgw::auth::WebIdentityApplier::get_idp_url() const
{
string idp_url = this->iss;
{
entry.access_key_id = info.access_key_id;
entry.subuser = info.subuser;
+ if (account) {
+ entry.account_id = account->id;
+ }
}
/* TODO(rzarzynski): we need to handle display_name changes. */
{
entry.access_key_id = access_key_id;
entry.subuser = subuser;
+ if (account) {
+ entry.account_id = account->id;
+ }
}
ACLOwner rgw::auth::RoleApplier::get_aclowner() const
user_info.user_id = this->token_attrs.user_id;
}
+void rgw::auth::RoleApplier::write_ops_log_entry(rgw_log_entry& entry) const
+{
+ if (role.account) {
+ entry.account_id = role.account->id;
+ }
+ entry.role_id = role.id;
+}
+
void rgw::auth::RoleApplier::modify_request_state(const DoutPrefixProvider *dpp, req_state* s) const
{
// non-account identity policy is restricted to the current tenant
const std::string& get_tenant() const override {
return role_tenant;
}
+ void write_ops_log_entry(rgw_log_entry& entry) const override;
struct Factory {
virtual ~Factory() {}
std::string get_acct_name() const override { return {}; }
std::string get_subuser() const override { return {}; }
const std::string& get_tenant() const override { return role.tenant; }
+ void write_ops_log_entry(rgw_log_entry& entry) const override;
void modify_request_state(const DoutPrefixProvider* dpp, req_state* s) const override;
e->bucket_id = "10";
e->trans_id = "trans_id";
e->identity_type = TYPE_RGW;
+ e->account_id = "account_id";
+ e->role_id = "role_id";
o.push_back(e);
o.push_back(new rgw_log_entry);
}
f->dump_string("bucket_id", bucket_id);
f->dump_string("trans_id", trans_id);
f->dump_unsigned("identity_type", identity_type);
+ if (!account_id.empty()) {
+ f->dump_string("account_id", account_id);
+ }
+ if (!role_id.empty()) {
+ f->dump_string("role_id", role_id);
+ }
}
std::string subuser;
bool temp_url {false};
delete_multi_obj_op_meta delete_multi_obj_meta;
+ rgw_account_id account_id;
+ std::string role_id;
void encode(bufferlist &bl) const {
- ENCODE_START(14, 5, bl);
+ ENCODE_START(15, 5, bl);
// old object/bucket owner ids, encoded in full in v8
std::string empty_owner_id;
encode(empty_owner_id, bl);
encode(subuser, bl);
encode(temp_url, bl);
encode(delete_multi_obj_meta, bl);
+ encode(account_id, bl);
+ encode(role_id, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::const_iterator &p) {
- DECODE_START_LEGACY_COMPAT_LEN(14, 5, 5, p);
+ DECODE_START_LEGACY_COMPAT_LEN(15, 5, 5, p);
std::string object_owner_id;
std::string bucket_owner_id;
decode(object_owner_id, p);
if (struct_v >= 14) {
decode(delete_multi_obj_meta, p);
}
+ if (struct_v >= 15) {
+ decode(account_id, p);
+ decode(role_id, p);
+ }
DECODE_FINISH(p);
}
void dump(ceph::Formatter *f) const;