sentry-commits mailing list archives

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

     [ https://issues.apache.org/jira/browse/SENTRY-563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xiaomeng Huang updated SENTRY-563:
----------------------------------
    Description: 
{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.
This bug also blocks SHOW GRANT DDL of V2 feature.

  was:
{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}

This bug also blocks SHOW GRANT DDL of V2 feature.


> 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.
> This bug also blocks SHOW GRANT DDL of V2 feature.



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

Mime
View raw message