You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "guoquan (JIRA)" <ji...@apache.org> on 2015/01/23 03:51:34 UTC

[jira] [Commented] (SENTRY-563) The interface listPrivilegesByRoleName may throw thrift exception if Authorizable is empty

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

guoquan commented on SENTRY-563:
--------------------------------

+1

> 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, SENTRY-563.002.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)