You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Anne Yu <an...@cloudera.com> on 2015/08/21 01:06:28 UTC

Review Request 37661: Add describe, show and explain select tests for column level privileges

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

Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.


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


Repository: sentry


Description
-------

Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.


Diffs
-----

  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a0 

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


Testing
-------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps

Results :

Tests run: 6, Failures: 0, Errors: 0, Skipped: 6


Thanks,

Anne Yu


Re: Review Request 37661: Add describe, show and explain select tests for column level privileges

Posted by Anne Yu <an...@cloudera.com>.

> On Aug. 25, 2015, 11:22 p.m., Li Li wrote:
> > sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java, line 151
> > <https://reviews.apache.org/r/37661/diff/2/?file=1045468#file1045468line151>
> >
> >     Shall we add some comments in jira SENTRY-846, 847, 848 and 849 to remove @Ignore line in this file?

Thanks for taking time reviewing the code. Will address these comments in the next cr, along with any more comments from other folks.


- Anne


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


On Aug. 21, 2015, 12:12 a.m., Anne Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37661/
> -----------------------------------------------------------
> 
> (Updated Aug. 21, 2015, 12:12 a.m.)
> 
> 
> Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.
> 
> 
> Bugs: SENTRY-742
>     https://issues.apache.org/jira/browse/SENTRY-742
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a0 
> 
> Diff: https://reviews.apache.org/r/37661/diff/
> 
> 
> Testing
> -------
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> 
> Results :
> 
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6
> 
> 
> Thanks,
> 
> Anne Yu
> 
>


Re: Review Request 37661: Add describe, show and explain select tests for column level privileges

Posted by Li Li <li...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37661/#review96442
-----------------------------------------------------------



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 148)
<https://reviews.apache.org/r/37661/#comment151815>

    Show -> show



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 151)
<https://reviews.apache.org/r/37661/#comment151813>

    Shall we add some comments in jira SENTRY-846, 847, 848 and 849 to remove @Ignore line in this file?


- Li Li


On Aug. 21, 2015, 12:12 a.m., Anne Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37661/
> -----------------------------------------------------------
> 
> (Updated Aug. 21, 2015, 12:12 a.m.)
> 
> 
> Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.
> 
> 
> Bugs: SENTRY-742
>     https://issues.apache.org/jira/browse/SENTRY-742
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a0 
> 
> Diff: https://reviews.apache.org/r/37661/diff/
> 
> 
> Testing
> -------
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> 
> Results :
> 
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6
> 
> 
> Thanks,
> 
> Anne Yu
> 
>


Re: Review Request 37661: Add describe, show and explain select tests for column level privileges

Posted by Anne Yu <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37661/#review99827
-----------------------------------------------------------



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 169)
<https://reviews.apache.org/r/37661/#comment156803>

    From validateColumnMetaDataWithPatterns, 
    
    Connection conneciton = context.createConnection(USER1_1);
    
    ....



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 189)
<https://reviews.apache.org/r/37661/#comment156806>

    Will change this validation. Will also change tests to ensure, show/describe (extended/formatted) requires table level privileges.



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 256)
<https://reviews.apache.org/r/37661/#comment156807>

    Test alter...add a new column and grant privilge on table, it works fine. So it's called newCol.


- Anne Yu


On Aug. 26, 2015, 10:07 p.m., Anne Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37661/
> -----------------------------------------------------------
> 
> (Updated Aug. 26, 2015, 10:07 p.m.)
> 
> 
> Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.
> 
> 
> Bugs: SENTRY-742
>     https://issues.apache.org/jira/browse/SENTRY-742
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a0 
> 
> Diff: https://reviews.apache.org/r/37661/diff/
> 
> 
> Testing
> -------
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> 
> Results :
> 
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6
> 
> 
> Thanks,
> 
> Anne Yu
> 
>


Re: Review Request 37661: Add describe, show and explain select tests for column level privileges

Posted by Sravya Tirukkovalur <sr...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37661/#review105319
-----------------------------------------------------------

Ship it!


LGTM, thanks for the update Anne!

- Sravya Tirukkovalur


On Oct. 22, 2015, 11:14 p.m., Anne Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37661/
> -----------------------------------------------------------
> 
> (Updated Oct. 22, 2015, 11:14 p.m.)
> 
> 
> Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.
> 
> 
> Bugs: SENTRY-742
>     https://issues.apache.org/jira/browse/SENTRY-742
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a0 
> 
> Diff: https://reviews.apache.org/r/37661/diff/
> 
> 
> Testing
> -------
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> 
> Results :
> 
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6
> 
> 
> Thanks,
> 
> Anne Yu
> 
>


Re: Review Request 37661: Add describe, show and explain select tests for column level privileges

Posted by Anne Yu <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37661/
-----------------------------------------------------------

(Updated Oct. 22, 2015, 11:14 p.m.)


Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.


Changes
-------

Updated with most recent patch.


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


Repository: sentry


Description
-------

Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.


Diffs (updated)
-----

  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a0 

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


Testing
-------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps

Results :

Tests run: 6, Failures: 0, Errors: 0, Skipped: 6


Thanks,

Anne Yu


Re: Review Request 37661: Add describe, show and explain select tests for column level privileges

Posted by Anne Yu <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37661/
-----------------------------------------------------------

(Updated Sept. 22, 2015, 11:57 p.m.)


Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.


Changes
-------

1. addressed Sravya's comments;
2. added negative test cases;
3. added test partitions;
4. some metadata operations require table level privileges.


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


Repository: sentry


Description
-------

Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.


Diffs (updated)
-----

  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a010762dda96e08d48a1b0c03dadffb2478 

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


Testing
-------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps

Results :

Tests run: 6, Failures: 0, Errors: 0, Skipped: 6


Thanks,

Anne Yu


Re: Review Request 37661: Add describe, show and explain select tests for column level privileges

Posted by Sravya Tirukkovalur <sr...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37661/#review98967
-----------------------------------------------------------



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 66)
<https://reviews.apache.org/r/37661/#comment155904>

    Comment on how the test data looks like



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 98)
<https://reviews.apache.org/r/37661/#comment155908>

    Comment on what validation is performed.



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 169)
<https://reviews.apache.org/r/37661/#comment155727>

    It is unclear that this function runs everything as user1. May be send the user name as a parameter? Or comment that it is being run as a user with privileges on subset of columns.
    
    show table extended should require table level privileges.



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 179)
<https://reviews.apache.org/r/37661/#comment155732>

    Show columns filters out unprivileged columns



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 189)
<https://reviews.apache.org/r/37661/#comment155734>

    See Sentry-881: basic describe returns alls columns. Whereas, formatted/extended is restricted for table level users.



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java (line 256)
<https://reviews.apache.org/r/37661/#comment155738>

    newcol?


- Sravya Tirukkovalur


On Aug. 26, 2015, 10:07 p.m., Anne Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37661/
> -----------------------------------------------------------
> 
> (Updated Aug. 26, 2015, 10:07 p.m.)
> 
> 
> Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.
> 
> 
> Bugs: SENTRY-742
>     https://issues.apache.org/jira/browse/SENTRY-742
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a0 
> 
> Diff: https://reviews.apache.org/r/37661/diff/
> 
> 
> Testing
> -------
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
> 
> Results :
> 
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 6
> 
> 
> Thanks,
> 
> Anne Yu
> 
>


Re: Review Request 37661: Add describe, show and explain select tests for column level privileges

Posted by Anne Yu <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37661/
-----------------------------------------------------------

(Updated Aug. 26, 2015, 10:07 p.m.)


Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.


Changes
-------

Addressed Lili's comments;
Relaxed valiation: only to check with select privilege, user can show/describe table;
Tested locally.


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


Repository: sentry


Description
-------

Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.


Diffs (updated)
-----

  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a0 

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


Testing
-------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps

Results :

Tests run: 6, Failures: 0, Errors: 0, Skipped: 6


Thanks,

Anne Yu


Re: Review Request 37661: Add describe, show and explain select tests for column level privileges

Posted by Anne Yu <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37661/
-----------------------------------------------------------

(Updated Aug. 21, 2015, 12:12 a.m.)


Review request for sentry, Lenni Kuff and Sravya Tirukkovalur.


Changes
-------

Minor changes: format long line, add more accurate description, corrected incorrect column names.


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


Repository: sentry


Description
-------

Add a couple of test cases to cover column level privileges when user do DESCRIBE, SHOW AND EXPLAIN SELECT cases.


Diffs (updated)
-----

  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbColumnLevelMetaDataOps.java PRE-CREATION 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/PrivilegeResultSet.java cee05a0 

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


Testing
-------

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps
Tests run: 6, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 17.789 sec - in org.apache.sentry.tests.e2e.dbprovider.TestDbColumnLevelMetaDataOps

Results :

Tests run: 6, Failures: 0, Errors: 0, Skipped: 6


Thanks,

Anne Yu