You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Na Li via Review Board <no...@reviews.apache.org> on 2018/10/18 20:24:30 UTC

Review Request 69074: SENTRY-2429: Transfer database owner drops table owner

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69074/
-----------------------------------------------------------

Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.


Bugs: sentry-2429
    https://issues.apache.org/jira/browse/sentry-2429


Repository: sentry


Description
-------

1) What is the problem?
When changing owner of a database, the owners of all tables belonging to this database are removed.

2) For example:
2.1) user_A is owner of DB1, user_B is owner of DB1.TABLE1, and user_D is owner of DB1.TABLE2.
2.2) admin with" ALL with grant option" changes the owner of DB1 from user_A to user_C through command "ALTER DATABASE DB1 SET OWNER USER user_C".
2.3) Now, user_C is owner of DB1, there is no owner on DB1.TABLE1, and no owner on DB1.TABLE2.. In other words, the owners of DB1.TABLE1 and DB1.TABLE2 are removed when changing owner of their database.


Diffs
-----

  sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java 29f83a8 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestOwnerPrivileges.java 880fa94 


Diff: https://reviews.apache.org/r/69074/diff/1/


Testing
-------

add new test cases and verified the fix in e2e test


Thanks,

Na Li


Re: Review Request 69074: SENTRY-2429: Transfer database owner drops table owner

Posted by Sergio Pena via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69074/#review209759
-----------------------------------------------------------


Ship it!




Ship It!

- Sergio Pena


On Oct. 18, 2018, 8:24 p.m., Na Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69074/
> -----------------------------------------------------------
> 
> (Updated Oct. 18, 2018, 8:24 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio Pena.
> 
> 
> Bugs: sentry-2429
>     https://issues.apache.org/jira/browse/sentry-2429
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> 1) What is the problem?
> When changing owner of a database, the owners of all tables belonging to this database are removed.
> 
> 2) For example:
> 2.1) user_A is owner of DB1, user_B is owner of DB1.TABLE1, and user_D is owner of DB1.TABLE2.
> 2.2) admin with" ALL with grant option" changes the owner of DB1 from user_A to user_C through command "ALTER DATABASE DB1 SET OWNER USER user_C".
> 2.3) Now, user_C is owner of DB1, there is no owner on DB1.TABLE1, and no owner on DB1.TABLE2.. In other words, the owners of DB1.TABLE1 and DB1.TABLE2 are removed when changing owner of their database.
> 
> 
> Diffs
> -----
> 
>   sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java 29f83a8 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestOwnerPrivileges.java 880fa94 
> 
> 
> Diff: https://reviews.apache.org/r/69074/diff/1/
> 
> 
> Testing
> -------
> 
> add new test cases and verified the fix in e2e test
> 
> 
> Thanks,
> 
> Na Li
> 
>