}
}
-int STSService::storeARN(const DoutPrefixProvider *dpp, string& arn, optional_yield y)
-{
- int ret = 0;
- std::unique_ptr<rgw::sal::User> user = driver->get_user(user_id);
- if ((ret = user->load_user(dpp, y)) < 0) {
- return -ERR_NO_SUCH_ENTITY;
- }
-
- user->get_info().assumed_role_arn = arn;
-
- ret = user->store_user(dpp, y, false, &user->get_info());
- if (ret < 0) {
- return -ERR_INTERNAL_ERROR;
- }
- return ret;
-}
-
AssumeRoleWithWebIdentityResponse STSService::assumeRoleWithWebIdentity(const DoutPrefixProvider *dpp, AssumeRoleWithWebIdentityRequest& req)
{
AssumeRoleWithWebIdentityResponse response;
return response;
}
- //Save ARN with the user
- string arn = response.user.getARN();
- response.retCode = storeARN(dpp, arn, y);
- if (response.retCode < 0) {
- return response;
- }
-
response.retCode = 0;
return response;
}
rgw_user user_id;
std::unique_ptr<rgw::sal::RGWRole> role;
rgw::auth::Identity* identity;
- int storeARN(const DoutPrefixProvider *dpp, std::string& arn, optional_yield y);
public:
STSService() = default;
STSService(CephContext* cct, rgw::sal::Driver* driver, rgw_user user_id,