You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Hao Hao <ha...@cloudera.com> on 2016/04/06 03:30:58 UTC

Review Request 45793: SENTRY-1175: Improve usability of URI privileges when granting URIs

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

Review request for sentry.


Repository: sentry


Description
-------

SENTRY-1175: Improve usability of URI privileges when granting URIs

If URI has no scheme and authority when granting URI privileges, e.g GRANT ALL ON URI '/path/to/table'. Sentry should automatically handle it with default scheme and authority based on the Hadoop configs Sentry has been given.
There are two places could be changed to support it:
- When grant the URI privileges
- When check the URI privileges

However, when granting the URI privileges, the URI path does not necessary needs to be presented in the filesystem, thus choose to make the URI fully qualified during the privileges checking time.


Diffs
-----

  sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/utils/PathUtils.java c7002e0e45074351c761ba225716ab2cb3d5c71a 
  sentry-core/sentry-core-model-db/src/main/java/org/apache/sentry/core/model/db/AccessURI.java 600a82f1694aafdca1e85f94cf75966429689991 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java 4799d36f55308abb2c78e03e4807fa4ee8d0a79a 

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


Testing
-------

Test done in TestHDFSIntegration.testURIsWithoutSchemeandAuthority.


Thanks,

Hao Hao


Re: Review Request 45793: SENTRY-1175: Improve usability of URI privileges when granting URIs

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


Ship it!




Ship It!

- Sravya Tirukkovalur


On April 6, 2016, 1:30 a.m., Hao Hao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45793/
> -----------------------------------------------------------
> 
> (Updated April 6, 2016, 1:30 a.m.)
> 
> 
> Review request for sentry.
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> SENTRY-1175: Improve usability of URI privileges when granting URIs
> 
> If URI has no scheme and authority when granting URI privileges, e.g GRANT ALL ON URI '/path/to/table'. Sentry should automatically handle it with default scheme and authority based on the Hadoop configs Sentry has been given.
> There are two places could be changed to support it:
> - When grant the URI privileges
> - When check the URI privileges
> 
> However, when granting the URI privileges, the URI path does not necessary needs to be presented in the filesystem, thus choose to make the URI fully qualified during the privileges checking time.
> 
> 
> Diffs
> -----
> 
>   sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/utils/PathUtils.java c7002e0e45074351c761ba225716ab2cb3d5c71a 
>   sentry-core/sentry-core-model-db/src/main/java/org/apache/sentry/core/model/db/AccessURI.java 600a82f1694aafdca1e85f94cf75966429689991 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java 4799d36f55308abb2c78e03e4807fa4ee8d0a79a 
> 
> Diff: https://reviews.apache.org/r/45793/diff/
> 
> 
> Testing
> -------
> 
> Test done in TestHDFSIntegration.testURIsWithoutSchemeandAuthority.
> 
> 
> Thanks,
> 
> Hao Hao
> 
>