You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Prasad Mujumdar <pr...@cloudera.com> on 2014/09/28 08:44:43 UTC

Review Request 26126: SENTRY-475: SHOW GRANT ROLE from Hive always report with grant option as false

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

Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.


Bugs: SENTRY-475
    https://issues.apache.org/jira/browse/SENTRY-475


Repository: sentry


Description
-------

The 'SHOW GRANT ROLE ' shows grant option as false regardless of whether the with grant enabled.
Currently Sentry's Hive authorization task has this hardcoded to false. It needs to be set according the the privilege.


Diffs
-----

  sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 6f33109 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithGrantOption.java 581350a 

Diff: https://reviews.apache.org/r/26126/diff/


Testing
-------

Added test cases to verify the grant option setting


Thanks,

Prasad Mujumdar


Re: Review Request 26126: SENTRY-475: SHOW GRANT ROLE from Hive always report with grant option as false

Posted by Lenni Kuff <ls...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26126/#review54774
-----------------------------------------------------------

Ship it!


Ship It!


sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java
<https://reviews.apache.org/r/26126/#comment95050>

    Can you simplify this by doing:
    grantOption = privilege.getGrantOption().getValue() == TSentryGrantOption.TRUE;



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithGrantOption.java
<https://reviews.apache.org/r/26126/#comment95051>

    change this back to INSERT


- Lenni Kuff


On Sept. 28, 2014, 6:44 a.m., Prasad Mujumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26126/
> -----------------------------------------------------------
> 
> (Updated Sept. 28, 2014, 6:44 a.m.)
> 
> 
> Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.
> 
> 
> Bugs: SENTRY-475
>     https://issues.apache.org/jira/browse/SENTRY-475
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> The 'SHOW GRANT ROLE ' shows grant option as false regardless of whether the with grant enabled.
> Currently Sentry's Hive authorization task has this hardcoded to false. It needs to be set according the the privilege.
> 
> 
> Diffs
> -----
> 
>   sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 6f33109 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithGrantOption.java 581350a 
> 
> Diff: https://reviews.apache.org/r/26126/diff/
> 
> 
> Testing
> -------
> 
> Added test cases to verify the grant option setting
> 
> 
> Thanks,
> 
> Prasad Mujumdar
> 
>


Re: Review Request 26126: SENTRY-475: SHOW GRANT ROLE from Hive always report with grant option as false

Posted by Prasad Mujumdar <pr...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26126/
-----------------------------------------------------------

(Updated Sept. 28, 2014, 5:52 p.m.)


Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.


Changes
-------

changes per review feedback


Bugs: SENTRY-475
    https://issues.apache.org/jira/browse/SENTRY-475


Repository: sentry


Description
-------

The 'SHOW GRANT ROLE ' shows grant option as false regardless of whether the with grant enabled.
Currently Sentry's Hive authorization task has this hardcoded to false. It needs to be set according the the privilege.


Diffs (updated)
-----

  sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 6f33109 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithGrantOption.java 581350a 

Diff: https://reviews.apache.org/r/26126/diff/


Testing
-------

Added test cases to verify the grant option setting


Thanks,

Prasad Mujumdar