You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Mahesh Hanumant Bandal (Jira)" <ji...@apache.org> on 2021/01/19 14:32:00 UTC

[jira] [Commented] (RANGER-3135) Ranger always ponit out "User does not have permission for this operation" when user try to query a none-exist role

    [ https://issues.apache.org/jira/browse/RANGER-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17267925#comment-17267925 ] 

Mahesh Hanumant Bandal commented on RANGER-3135:
------------------------------------------------

Hi [~rujia1019], Thank you for suggesting this improvement.

I tried to access GET API [http://localhost:6080/service/roles/roles/name/]role1 with admin user and it does not return roles which already exist, whereas select * from x_role returns two roles. ie. role1, role2.
API returns following response :
{code:java}
<vxResponse>
    <msgDesc>Role with name: role1 does not exist</msgDesc>
    <statusCode>1</statusCode>
</vxResponse>
{code}
*With admin user it shows same response regardless of role's existence.*

This patch breaks current functionality of ranger. Can you please retest and confirm?

> Ranger always ponit out "User does not have permission for this operation" when user try to query a none-exist role
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-3135
>                 URL: https://issues.apache.org/jira/browse/RANGER-3135
>             Project: Ranger
>          Issue Type: Improvement
>          Components: admin
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: rujia
>            Priority: Major
>             Fix For: 3.0.0
>
>         Attachments: 0001-optimze-log-print-for-querying-roles.patch
>
>
> when i access /role/name/{name}, a Exception "User does not have permission for this operation" always been taken, even if this role doesn't exist .
> it is better to prompt user this role is not exist in this case when execute-user has admin permission.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)