You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Duong (Jira)" <ji...@apache.org> on 2023/02/08 00:53:00 UTC
[jira] [Updated] (HDDS-7920) User cannot list their own volumes without access to root volume /
[ https://issues.apache.org/jira/browse/HDDS-7920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Duong updated HDDS-7920:
------------------------
Summary: User cannot list their own volumes without access to root volume / (was: User cannot list their volumes without access to root volume /)
> User cannot list their own volumes without access to root volume /
> ------------------------------------------------------------------
>
> Key: HDDS-7920
> URL: https://issues.apache.org/jira/browse/HDDS-7920
> Project: Apache Ozone
> Issue Type: Bug
> Components: OM
> Affects Versions: 1.3.0
> Reporter: Duong
> Assignee: Duong
> Priority: Major
>
> Users without Admin permission got PERMISSION_DENIED when listing their volume.
> {code:java}
> >> ozone sh volume list
> PERMISSION_DENIED User hrt_1@ROOT.HWX.SITE doesn't have LIST permission to access volume Volume:/ {code}
>
> This is a regression from HDDS-7498, which adds a check to *listVolumeByUser* API.
> {code:java}
> // if not admin nor list my own volumes, check ACL.
> String remoteUserName = remoteUserUgi.getShortUserName();
> if (!remoteUserName.equals(userName) && !isAdmin(remoteUserUgi)) {
> checkAcls(ResourceType.VOLUME, StoreType.OZONE, ACLType.LIST,
> OzoneConsts.OZONE_ROOT, null, null);
> } {code}
> The check for the same user uses {_}UserGroupInformation.getShortUserName{_}, while on the client side (CLI), when _--user_ is not specified, _UserGroupInformation.getUserName_ is used.
> {code:java}
> if (userName == null) {
> userName = UserGroupInformation.getCurrentUser().getUserName();
> }{code}
> This results in a situation in which any user with shortName different from userName will need access to the `/` volume.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org