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




plugin-presto/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
Lines 395 (patched)
<https://reviews.apache.org/r/70394/#comment300835>

    Is it necessary to set each resource value to '{NONE}'? This require policy 
to have a matching value (like '*', '{NONE}'). If this is not intentional, 
consider setting value only for known resources.
    
    For example, to authorize schema-create, RangerPrestoResource should only 
have value for 'schema'; other resources shouldn't have any value. Policy 
engine will consider only policies that have '*' or no value for all child 
resources (in this case table and column). This will also result in a cleaner 
resource-name in audit logs i.e. catalogName/schemaName instead of 
catalogName/schemaName/{NONE}/{NONE}



plugin-presto/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
Lines 420 (patched)
<https://reviews.apache.org/r/70394/#comment300834>

    How would comma separated columnNames be used to authorize? This method is 
perhaps not used - given createResource() at line #365 creates multiple 
requests, one for each column. If this method is not used, please consider 
removing it.



ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
Lines 37 (patched)
<https://reviews.apache.org/r/70394/#comment300836>

    rangerPluginClassLoader doesn't have to be a static, given it is assigned 
in init() method for each instance of RangerSystemAccessControl. Please review 
and consider removing 'static'.



ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
Lines 38 (patched)
<https://reviews.apache.org/r/70394/#comment300837>

    - given rangerSystemAccessControl is the implementation object, consider 
renaming as systemAccessControlImpl
    - also, since rangerPluginClassLoader and rangerSystemAccessControl are 
assigned values during instance creation, consider marking both as 'final'; 
this will require moving init() method contents to the constructor


- Madhan Neethiraj


On April 12, 2019, 7:33 a.m., Bolke de Bruin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70394/
> -----------------------------------------------------------
> 
> (Updated April 12, 2019, 7:33 a.m.)
> 
> 
> Review request for ranger and Abhay Kulkarni.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/RANGER-2395
>     
> https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/RANGER-2395
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Presto Plugin for Ranger.
> 
> 
> Diffs
> -----
> 
>   agents-common/scripts/enable-agent.sh b4194a736 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
>  cbfd649c9 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-presto.json 
> PRE-CREATION 
>   plugin-presto/conf/ranger-policymgr-ssl-changes.cfg PRE-CREATION 
>   plugin-presto/conf/ranger-policymgr-ssl.xml PRE-CREATION 
>   plugin-presto/conf/ranger-presto-audit-changes.cfg PRE-CREATION 
>   plugin-presto/conf/ranger-presto-audit.xml PRE-CREATION 
>   plugin-presto/conf/ranger-presto-security-changes.cfg PRE-CREATION 
>   plugin-presto/conf/ranger-presto-security.xml PRE-CREATION 
>   plugin-presto/pom.xml PRE-CREATION 
>   plugin-presto/scripts/install.properties PRE-CREATION 
>   
> plugin-presto/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
>  PRE-CREATION 
>   
> plugin-presto/src/main/java/org/apache/ranger/services/presto/RangerServicePresto.java
>  PRE-CREATION 
>   
> plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoClient.java
>  PRE-CREATION 
>   
> plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoConnectionManager.java
>  PRE-CREATION 
>   
> plugin-presto/src/main/java/org/apache/ranger/services/presto/client/PrestoResourceManager.java
>  PRE-CREATION 
>   pom.xml 2a45f8b2d 
>   ranger-presto-plugin-shim/pom.xml PRE-CREATION 
>   
> ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/PrestoRangerPlugin.java
>  PRE-CREATION 
>   
> ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerConfig.java
>  PRE-CREATION 
>   
> ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControl.java
>  PRE-CREATION 
>   
> ranger-presto-plugin-shim/src/main/java/org/apache/ranger/authorization/presto/authorizer/RangerSystemAccessControlFactory.java
>  PRE-CREATION 
>   
> ranger-presto-plugin-shim/src/main/resources/META-INF/services/io.prestosql.spi.Plugin
>  PRE-CREATION 
>   src/main/assembly/admin-web.xml 06ba8c4f0 
>   src/main/assembly/plugin-presto.xml PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70394/diff/3/
> 
> 
> Testing
> -------
> 
> Tested in production.
> 
> https://issues.apache.org/jira/browse/RANGER-2395
> 
> 
> Thanks,
> 
> Bolke de Bruin
> 
>

Reply via email to