[
https://issues.apache.org/jira/browse/HDDS-7920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wei-Chiu Chuang resolved HDDS-7920.
-----------------------------------
Fix Version/s: 1.4.0
Resolution: Fixed
> 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
> Labels: pull-request-available
> Fix For: 1.4.0
>
>
> Users without Admin permission got PERMISSION_DENIED when listing their
> volume.
> {code:java}
> >> kinit -kt compose/_keytabs/testuser.keytab testuser/[email protected]
> >> ozone sh volume list
> PERMISSION_DENIED User testuser/[email protected] 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: [email protected]
For additional commands, e-mail: [email protected]