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

Hao Hao edited comment on SENTRY-1020 at 1/23/16 12:39 AM:
-----------------------------------------------------------

[~romainr] For solr, the action for 'all' is defined as '*'.
{noformat}
public class SearchConstants {

  public static final String ALL = "*";
  public static final String QUERY = "query";
  public static final String UPDATE = "update";
...
}
{noformat}


was (Author: hahao):
[~romainr] For solr, the action for 'all' is defined as '*'.
{noformat}
public class SearchConstants {

  public static final String ALL = "*";
  public static final String QUERY = "query";
  public static final String UPDATE = "update";
...
}
{/noformat}

> Action ALL is not recognized in the generic API
> -----------------------------------------------
>
>                 Key: SENTRY-1020
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1020
>             Project: Sentry
>          Issue Type: Bug
>            Reporter: Romain Rigaux
>            Assignee: Hao Hao
>
> {code}
> Traceback (most recent call last):
>   File "/home/romain/projects/hue/apps/security/src/security/api/sentry.py", 
> line 274, in save_privileges
>     _hive_add_privileges(request.user, role, modified_privileges, component)
>   File "/home/romain/projects/hue/apps/security/src/security/api/sentry.py", 
> line 159, in _hive_add_privileges
>     api.alter_sentry_role_grant_privilege(role['name'], 
> _to_sentry_privilege(privilege))
>   File 
> "/home/romain/projects/hue/desktop/libs/libsentry/src/libsentry/api2.py", 
> line 49, in decorator
>     raise e
> SentryException: Unknown error:can't get BitFieldAction for name:all
> [21/Jan/2016 15:07:58 -0800] thrift_util  DEBUG    Thrift call <class 
> 'sentry_generic_policy_service.SentryGenericPolicyService.Client'>.alter_sentry_role_grant_privilege
>  returned in 13ms: 
> TAlterSentryRoleGrantPrivilegeResponse(status=TSentryResponseStatus(message="Unknown
>  error:can't get BitFieldAction for name:all", 
> stack="java.lang.RuntimeException: can't get BitFieldAction for 
> name:all\n\tat 
> org.apache.sentry.provider.db.generic.service.persistent.PrivilegeOperatePersistence.getAction(PrivilegeOperatePersistence.java:409)\n\tat
>  
> org.apache.sentry.provider.db.generic.service.persistent.PrivilegeOperatePersistence.grantRolePartial(PrivilegeOperatePersistence.java:92)\n\tat
>  
> org.apache.sentry.provider.db.generic.service.persistent.PrivilegeOperatePersistence.grantPrivilege(PrivilegeOperatePersistence.java:82)\n\tat
>  
> org.apache.sentry.provider.db.generic.service.persistent.DelegateSentryStore.alterRoleGrantPrivilege(DelegateSentryStore.java:173)\n\tat
>  
> org.apache.sentry.provider.db.generic.service.thrift.SentryGenericPolicyProcessor$4.handle(SentryGenericPolicyProcessor.java:322)\n\tat
>  
> org.apache.sentry.provider.db.generic.service.thrift.SentryGenericPolicyProcessor.requestH...
> [21/Jan/2016 15:07:58 -0800] thrift_util  DEBUG    Thrift call: <class 
> 'sentry_generic_policy_service.SentryGenericPolicyService.Client'>.alter_sentry_role_grant_privilege(args=(TAlterSentryRoleGrantPrivilegeRequest(privilege=TSentryPrivilege(grantOption=0,
>  component=u'solr', serviceName=u'server1', grantorPrincipal=u'romain', 
> action=u'ALL', authorizables=[TAuthorizable(type=u'DATABASE', 
> name=u'collections'), TAuthorizable(type=u'TABLE', name=u'twitter2')], 
> createTime=0), protocol_version=2, roleName=u'intern_role', 
> component=u'solr', requestorUserName=u'romain'),), kwargs={})
> {code}



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

Reply via email to