sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lenni Kuff (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SENTRY-563) The interface listPrivilegesByRoleName may throw thrift exception if Authorizable is empty
Date Mon, 08 Dec 2014 08:03:12 GMT

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

Lenni Kuff commented on SENTRY-563:
-----------------------------------

Should this be fixed in "setupSentryAuthorizable" rather than adding the isEmpty() check here?

> The interface listPrivilegesByRoleName may throw thrift exception if Authorizable is
empty
> ------------------------------------------------------------------------------------------
>
>                 Key: SENTRY-563
>                 URL: https://issues.apache.org/jira/browse/SENTRY-563
>             Project: Sentry
>          Issue Type: Bug
>            Reporter: Xiaomeng Huang
>            Assignee: Xiaomeng Huang
>         Attachments: SENTRY-563.001.patch
>
>
> {code}
> public Set<TSentryPrivilege> listPrivilegesByRoleName(String requestorUserName,
>       String roleName, List<? extends Authorizable> authorizable)
>   throws SentryUserException {
>     TListSentryPrivilegesRequest request = new TListSentryPrivilegesRequest();
>     request.setProtocol_version(ThriftConstants.TSENTRY_SERVICE_VERSION_CURRENT);
>     request.setRequestorUserName(requestorUserName);
>     request.setRoleName(roleName);
>     if (authorizable != null) {   ==> we should add check empty of authorizable here.
>       TSentryAuthorizable tSentryAuthorizable = setupSentryAuthorizable(authorizable);
>       request.setAuthorizableHierarchy(tSentryAuthorizable);
>     }
>    ...
> {code}
> Please see my test cases in this patch, before this patch, it will throw exception.
> Sentry client interface should be robustness, it also blocks SHOW GRANT DDL of V2 feature.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message