Since multisite now delegates permission checks for source objects
to the source zone (
a3f40b4), we need to avoid allowing system-level
overrides when the request is impersonating another identity.
SysReqApplier should only grant override permission if the request
is truly system-authenticated and not acting on behalf of another
user or role (i.e., no rgwx-perm-check-uid or rgwx-perm-check-role
in the request).
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
std::swap(span, s->trace);
}
if (ret < 0) {
- if (s->system_request) {
- dout(2) << "overriding permissions due to system operation" << dendl;
- } else if (s->auth.identity->is_admin_of(s->user->get_id())) {
+ // system requests may impersonate another user/role for permission checks
+ // so only rely on is_admin_of() to override permissions
+ if (s->auth.identity->is_admin_of(s->user->get_id())) {
dout(2) << "overriding permissions due to admin operation" << dendl;
} else {
return ret;