Re: Review Request 68488: SENTRY-2367: Implement subsystem to allow for pluggable attribute providers and transports

2018-09-07 Thread Na Li via Review Board

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


Ship it!




Ship It!

- Na Li


On Aug. 31, 2018, 4:03 p.m., Brian Towles wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68488/
> ---
> 
> (Updated Aug. 31, 2018, 4:03 p.m.)
> 
> 
> Review request for sentry, Anthony Young-Garner, kalyan kumar kalvagadda, Na 
> Li, Steve Moist, and Sergio Pena.
> 
> 
> Bugs: SENTRY-2367
> https://issues.apache.org/jira/browse/SENTRY-2367
> 
> 
> Repository: sentry
> 
> 
> Description
> ---
> 
> Basic implementation of the Java SPI. Abstracted to provide Factory 
> configuration for
> instances of Service defined.
> 
> Currently stand alone module.  Will be built used by MDCM in future commits.
> 
> 
> Diffs
> -
> 
>   pom.xml fb9950d0feca18f7f49531c6c38bb7357b565e5b 
>   sentry-spi/pom.xml PRE-CREATION 
>   sentry-spi/src/main/java/org/apache/sentry/spi/DefaultProviderLoader.java 
> PRE-CREATION 
>   sentry-spi/src/main/java/org/apache/sentry/spi/Provider.java PRE-CREATION 
>   sentry-spi/src/main/java/org/apache/sentry/spi/ProviderFactory.java 
> PRE-CREATION 
>   sentry-spi/src/main/java/org/apache/sentry/spi/ProviderLoader.java 
> PRE-CREATION 
>   sentry-spi/src/main/java/org/apache/sentry/spi/ProviderManager.java 
> PRE-CREATION 
>   sentry-spi/src/main/java/org/apache/sentry/spi/Spi.java PRE-CREATION 
>   sentry-spi/src/main/java/org/apache/sentry/spi/package-info.java 
> PRE-CREATION 
>   sentry-spi/src/test/java/org/apache/sentry/spi/SomeTestProvider.java 
> PRE-CREATION 
>   sentry-spi/src/test/java/org/apache/sentry/spi/SomeTestProviderFactory.java 
> PRE-CREATION 
>   sentry-spi/src/test/java/org/apache/sentry/spi/SomeTestProviderImplA.java 
> PRE-CREATION 
>   sentry-spi/src/test/java/org/apache/sentry/spi/SomeTestProviderImplB.java 
> PRE-CREATION 
>   
> sentry-spi/src/test/java/org/apache/sentry/spi/SomeTestProviderImplNotLoaded.java
>  PRE-CREATION 
>   sentry-spi/src/test/java/org/apache/sentry/spi/SomeTestSpi.java 
> PRE-CREATION 
>   sentry-spi/src/test/java/org/apache/sentry/spi/TestProviderManager.java 
> PRE-CREATION 
>   
> sentry-spi/src/test/resources/META-INF/services/org.apache.sentry.spi.SomeTestProviderFactory
>  PRE-CREATION 
>   sentry-spi/src/test/resources/META-INF/services/org.apache.sentry.spi.Spi 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/68488/diff/3/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> 
> Thanks,
> 
> Brian Towles
> 
>



Re: Review Request 68669: SENTRY-2395: ALTER VIEW AS SELECT is asking for CREATE privileges instead of ALTER

2018-09-07 Thread Sergio Pena via Review Board

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




sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
Lines 152 (patched)


Then I will need to repeat code on the TOK_ALTERVIEW case. The 
isAlterViewAsOperation() checks the tree is correct the same way it does it in 
this switch. The logic is the same.



sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
Lines 302 (patched)


The isAlterViewAs is set on the preAnalyze where we can check if the tree 
has such operation. The postAnalyze uses CREATEVIEW which the only way to know 
it as an ALTERVIEW_AS was by setting the boolean value in the preAnalyze.


- Sergio Pena


On Sept. 7, 2018, 5:01 p.m., Sergio Pena wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68669/
> ---
> 
> (Updated Sept. 7, 2018, 5:01 p.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-2395
> https://issues.apache.org/jira/browse/SENTRY-2395
> 
> 
> Repository: sentry
> 
> 
> Description
> ---
> 
> This patch checks in the pre-analyze if the operation will be an ALTER VIEW 
> AS SELECT, and it then switches the CREATEVIEW for ALTERVIEW_AS in the 
> post-analyze.
> It also adds the new required privilege for the ALTERVIEW_AS operation.
> 
> 
> Diffs
> -
> 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
>  0ab636a97cf158cf0a219f1b0f1da35b332441a4 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzBindingHookBase.java
>  0973e9832b334b83f4acb3013dc35583e5c0173a 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzPrivilegesMap.java
>  feb77ad6e925b5df3e06cbadbda260e01e5e94c5 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestOperationsPart1.java
>  42971d846f9344282f434b9cb720c7c74c592135 
> 
> 
> Diff: https://reviews.apache.org/r/68669/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>



Re: Review Request 68669: SENTRY-2395: ALTER VIEW AS SELECT is asking for CREATE privileges instead of ALTER

2018-09-07 Thread kalyan kumar kalvagadda via Review Board

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




sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
Lines 152 (patched)


I don't think this logic is applicable for all the above cases. We should 
consider limiting this code to cases that are relavent.



sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
Lines 302 (patched)


I'm consufed. This comment says ALTER VIEW AS SELECT to CREATEVIEW but the 
API "isAlterViewAsOperation" is not invoked for case where 
ast.getToken().getType() is equals to HiveParser.TOK_CREATEVIEW.

Could you clarify?


- kalyan kumar kalvagadda


On Sept. 7, 2018, 5:01 p.m., Sergio Pena wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68669/
> ---
> 
> (Updated Sept. 7, 2018, 5:01 p.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-2395
> https://issues.apache.org/jira/browse/SENTRY-2395
> 
> 
> Repository: sentry
> 
> 
> Description
> ---
> 
> This patch checks in the pre-analyze if the operation will be an ALTER VIEW 
> AS SELECT, and it then switches the CREATEVIEW for ALTERVIEW_AS in the 
> post-analyze.
> It also adds the new required privilege for the ALTERVIEW_AS operation.
> 
> 
> Diffs
> -
> 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
>  0ab636a97cf158cf0a219f1b0f1da35b332441a4 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzBindingHookBase.java
>  0973e9832b334b83f4acb3013dc35583e5c0173a 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzPrivilegesMap.java
>  feb77ad6e925b5df3e06cbadbda260e01e5e94c5 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestOperationsPart1.java
>  42971d846f9344282f434b9cb720c7c74c592135 
> 
> 
> Diff: https://reviews.apache.org/r/68669/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>



Review Request 68669: SENTRY-2395: ALTER VIEW AS SELECT is asking for CREATE privileges instead of ALTER

2018-09-07 Thread Sergio Pena via Review Board

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

Review request for sentry.


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


Repository: sentry


Description
---

This patch checks in the pre-analyze if the operation will be an ALTER VIEW AS 
SELECT, and it then switches the CREATEVIEW for ALTERVIEW_AS in the 
post-analyze.
It also adds the new required privilege for the ALTERVIEW_AS operation.


Diffs
-

  
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
 0ab636a97cf158cf0a219f1b0f1da35b332441a4 
  
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzBindingHookBase.java
 0973e9832b334b83f4acb3013dc35583e5c0173a 
  
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzPrivilegesMap.java
 feb77ad6e925b5df3e06cbadbda260e01e5e94c5 
  
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestOperationsPart1.java
 42971d846f9344282f434b9cb720c7c74c592135 


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


Testing
---


Thanks,

Sergio Pena



Re: Review Request 68573: SENTRY-2311 Intellij is broken by shaded jars

2018-09-07 Thread Steve Moist via Review Board

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

(Updated Sept. 7, 2018, 4:52 p.m.)


Review request for sentry.


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


Repository: sentry


Description
---

Removed the shading from the individual projects and put it at the end.  This 
avoids Intellij issues and allows us to still shade the offending jars.  It 
then excludes the dependencies and adds them at the end.


Diffs (updated)
-

  pom.xml d5f9dc6f5 
  sentry-dist/pom.xml 6291e4f1c 
  sentry-dist/src/main/assembly/bin.xml fc012c671 
  
sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/PathDeltaRetriever.java
 0d39300fe 
  
sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/PathImageRetriever.java
 2b1618134 
  
sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/PermDeltaRetriever.java
 b9405ccd2 
  
sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/PermImageRetriever.java
 f3a2d5028 
  
sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/SentryHDFSServiceProcessor.java
 5e2d5c5ee 
  
sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/SentryHdfsMetricsUtil.java
 f299825ba 
  sentry-provider/sentry-provider-db/pom.xml 9f89ca30a 
  sentry-service/sentry-service-server/pom.xml 8315358fc 
  sentry-thirdparty/pom.xml PRE-CREATION 
  sentry-thirdparty/sentry-shaded/pom.xml PRE-CREATION 


Diff: https://reviews.apache.org/r/68573/diff/2/

Changes: https://reviews.apache.org/r/68573/diff/1-2/


Testing
---

Unpacked the provided jars and ran it in a cluster.


Thanks,

Steve Moist



Re: Review Request 68661: SENTRY-2394: Fixed typo in sentry-site.xml.service.template

2018-09-07 Thread Sergio Pena via Review Board

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


Ship it!




Ship It!

- Sergio Pena


On Sept. 6, 2018, 10:02 p.m., Morio Ramdenbourg wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68661/
> ---
> 
> (Updated Sept. 6, 2018, 10:02 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, Steve Moist, and Sergio Pena.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/SENTRY-2394
> 
> https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/SENTRY-2394
> 
> 
> Repository: sentry
> 
> 
> Description
> ---
> 
> [SENTRY-2394](https://issues.apache.org/jira/browse/SENTRY-2394): Fixed typo 
> in sentry-site.xml.service.template
> 
> 
> Diffs
> -
> 
>   conf/sentry-site.xml.service.template 
> e4916600a9a8f182cf50ac57a19099224926f93b 
> 
> 
> Diff: https://reviews.apache.org/r/68661/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Morio Ramdenbourg
> 
>