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

Arun Suresh commented on SENTRY-209:
------------------------------------

It looks like this is an issue with the Database Schema.

For some reason, DataNuclues does not update the 'SENTRY_ROLE_DB_PRIVILEGE_MAP' 
Join table when granting Privileges.

On further investigation, I realized that if we remove the Primary Key (this is 
actually not required in a Join table) and if we modify the package.jdo to 
properly specify the m:n join.. things start to work again

> Empty list returned when calling listPrivilegesByRoleName
> ---------------------------------------------------------
>
>                 Key: SENTRY-209
>                 URL: https://issues.apache.org/jira/browse/SENTRY-209
>             Project: Sentry
>          Issue Type: Bug
>            Reporter: Arun Suresh
>
> I tested this on a Mysql backend store.. I assume it would be the case for 
> Postgres and  Oracle too.. if the initSchema is called (and Datanucleus auto 
> create is false)
> Steps to recreate (Using the thrift RPC client):
> 1) Create role : 
> sentryClient.createRole(granter, granterGroups, adminRole);
> 2) Grant table privilege for role (I grant ALL on 100 tables) :
> sentryClient.grantTablePrivilege(granter, granterGroups, adminRole, server, 
> db, "ALL");
> 3) List all privileges for role :
> Set<TSentryPrivilege> listPrivilegesByRoleName = 
> sentryClient.listPrivilegesByRoleName(granter, granterGroups, adminRole);
> This returns an empty Set.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to