Re: Review Request 47612: ATLAS-495 : Atlas Ranger Authorization Plugin

2016-05-20 Thread Nixon Rodrigues


> On May 20, 2016, 2:36 p.m., Shwetha GS wrote:
> > authorization/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java,
> >  line 30
> > 
> >
> > You should use java.nio.file.Files.readAllLines() and remove this class

Since we have some logic for parsing, for now we have only made use of 
java.nio.file.Files.readAllLines() instead of BufferedReader.


- Nixon


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


On May 20, 2016, 4:17 p.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47612/
> ---
> 
> (Updated May 20, 2016, 4:17 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Shwetha GS, Selvamohan Neethiraj, 
> and Hemanth Yamijala.
> 
> 
> Bugs: ATLAS-495
> https://issues.apache.org/jira/browse/ATLAS-495
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Patch contains following changes : 
> 
> 1) Refactoring of authorization code to authorizer module to be reused by 
> webapp, ranger plugin modules.
> 1) Default policy file path to atlas-home/conf/policy-store.txt if property 
> is not set in atlas-application.properties file.
> 2) Renamed create action instead of  write.
> 4) Added authorizer impl class in atlas properties and fall back to simple 
> authorizer if authorizer is not set in property.
> 5) AtlasAuthorizerFactory for authorizer. 
> 6) Handled changes in Test cases and in filter as per new implementation of 
> AtlasAuthorizerFactory.
> 
> 
> Diffs
> -
> 
>   authorization/pom.xml PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
>  PRE-CREATION 
>   authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizerFactory.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyDef.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyParser.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyUtil.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtilsTest.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyParserTest.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyUtilTest.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizerTest.java
>  PRE-CREATION 
>   common/pom.xml 614b3f6 
>   common/src/main/java/org/apache/atlas/utils/PropertiesUtil.java 
> PRE-CREATION 
>   common/src/main/java/org/apache/atlas/utils/XMLPropertiesUtil.java 
> PRE-CREATION 
>   distro/src/conf/atlas-application.properties e2082ef 
>   distro/src/conf/policy-store.txt 5bcc1cf 
>   distro/src/conf/users-credentials.properties 212d018 
>   pom.xml 685eb7d 
>   webapp/pom.xml 4b67ffa 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java 
> 5db9646 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessorTypes.java 
> 5f3827a 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
> 13c8b53 
>   
> webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
>  676c9f9 
>   
> webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationUtils.java 
> 14a2aac 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 
> 7c93c7a 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java 
> 14a72f1 
>   webapp/src/main/java/org/apache/atlas/authorize/PolicyDef.java 0ee39df 
>   webapp/src/main/java/org/apache/atlas/authorize/PolicyParser.java 51a6dc2 
>   webapp/src/main/java/org/apache/atlas/authorize/PolicyUtil.java a565f96 
>   webapp/src/main/java/org/apache/atlas/authorize/SimpleAtlasAuthorizer.java 
> 

Re: Review Request 47612: ATLAS-495 : Atlas Ranger Authorization Plugin

2016-05-20 Thread Nixon Rodrigues

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

(Updated May 20, 2016, 4:17 p.m.)


Review request for atlas, Madhan Neethiraj, Shwetha GS, Selvamohan Neethiraj, 
and Hemanth Yamijala.


Changes
---

Address Shwethas comments.


Bugs: ATLAS-495
https://issues.apache.org/jira/browse/ATLAS-495


Repository: atlas


Description
---

Patch contains following changes : 

1) Refactoring of authorization code to authorizer module to be reused by 
webapp, ranger plugin modules.
1) Default policy file path to atlas-home/conf/policy-store.txt if property is 
not set in atlas-application.properties file.
2) Renamed create action instead of  write.
4) Added authorizer impl class in atlas properties and fall back to simple 
authorizer if authorizer is not set in property.
5) AtlasAuthorizerFactory for authorizer. 
6) Handled changes in Test cases and in filter as per new implementation of 
AtlasAuthorizerFactory.


Diffs (updated)
-

  authorization/pom.xml PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java 
PRE-CREATION 
  authorization/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
 PRE-CREATION 
  authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizerFactory.java
 PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
 PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java
 PRE-CREATION 
  authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyDef.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyParser.java 
PRE-CREATION 
  authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyUtil.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
 PRE-CREATION 
  
authorization/src/test/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtilsTest.java
 PRE-CREATION 
  
authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyParserTest.java
 PRE-CREATION 
  
authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyUtilTest.java
 PRE-CREATION 
  
authorization/src/test/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizerTest.java
 PRE-CREATION 
  common/pom.xml 614b3f6 
  common/src/main/java/org/apache/atlas/utils/PropertiesUtil.java PRE-CREATION 
  common/src/main/java/org/apache/atlas/utils/XMLPropertiesUtil.java 
PRE-CREATION 
  distro/src/conf/atlas-application.properties e2082ef 
  distro/src/conf/policy-store.txt 5bcc1cf 
  distro/src/conf/users-credentials.properties 212d018 
  pom.xml 685eb7d 
  webapp/pom.xml 4b67ffa 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java 
5db9646 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessorTypes.java 
5f3827a 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 13c8b53 
  
webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
 676c9f9 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationUtils.java 
14a2aac 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 7c93c7a 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java 
14a72f1 
  webapp/src/main/java/org/apache/atlas/authorize/PolicyDef.java 0ee39df 
  webapp/src/main/java/org/apache/atlas/authorize/PolicyParser.java 51a6dc2 
  webapp/src/main/java/org/apache/atlas/authorize/PolicyUtil.java a565f96 
  webapp/src/main/java/org/apache/atlas/authorize/SimpleAtlasAuthorizer.java 
2a32e4e 
  webapp/src/main/java/org/apache/atlas/util/FileReaderUtil.java 22eaff9 
  webapp/src/main/java/org/apache/atlas/util/PropertiesUtil.java fef8efb 
  webapp/src/main/java/org/apache/atlas/util/XMLPropertiesUtil.java 9c4f1c7 
  
webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthorizationFilter.java 
13fc7da 
  
webapp/src/main/java/org/apache/atlas/web/security/AtlasADAuthenticationProvider.java
 9e5df45 
  
webapp/src/main/java/org/apache/atlas/web/security/AtlasLdapAuthenticationProvider.java
 e66b930 
  webapp/src/main/webapp/WEB-INF/applicationContext.xml b58952c 
  
webapp/src/test/java/org/apache/atlas/authorize/AtlasAuthorizationUtilsTest.java
 5fc4420 
  webapp/src/test/java/org/apache/atlas/authorize/PolicyParserTest.java 507d4c6 
  webapp/src/test/java/org/apache/atlas/authorize/PolicyUtilTest.java 59e88c9 
  
webapp/src/test/java/org/apache/atlas/authorize/SimpleAtlasAuthorizerTest.java 

Re: Review Request 47612: ATLAS-495 : Atlas Ranger Authorization Plugin

2016-05-20 Thread Shwetha GS

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




authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
 (line 114)


Only /types should be mapped to TYPE resource. Others should be just ENTITY 
resource



authorization/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java
 (line 30)


You should use java.nio.file.Files.readAllLines() and remove this class



authorization/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java
 (line 52)


should be in finally clause



distro/src/conf/policy-store.txt (line 6)


can we remove albert user and policy?



distro/src/conf/users-credentials.properties (line 2)


Can you keep only admin user? This conf is the default conf used in package 
and shouldn't have random users


- Shwetha GS


On May 20, 2016, 2:02 p.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47612/
> ---
> 
> (Updated May 20, 2016, 2:02 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Shwetha GS, Selvamohan Neethiraj, 
> and Hemanth Yamijala.
> 
> 
> Bugs: ATLAS-495
> https://issues.apache.org/jira/browse/ATLAS-495
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Patch contains following changes : 
> 
> 1) Refactoring of authorization code to authorizer module to be reused by 
> webapp, ranger plugin modules.
> 1) Default policy file path to atlas-home/conf/policy-store.txt if property 
> is not set in atlas-application.properties file.
> 2) Renamed create action instead of  write.
> 4) Added authorizer impl class in atlas properties and fall back to simple 
> authorizer if authorizer is not set in property.
> 5) AtlasAuthorizerFactory for authorizer. 
> 6) Handled changes in Test cases and in filter as per new implementation of 
> AtlasAuthorizerFactory.
> 
> 
> Diffs
> -
> 
>   authorization/pom.xml PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
>  PRE-CREATION 
>   authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizerFactory.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyDef.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyParser.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyUtil.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtilsTest.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyParserTest.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyUtilTest.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizerTest.java
>  PRE-CREATION 
>   common/pom.xml 614b3f6 
>   common/src/main/java/org/apache/atlas/utils/PropertiesUtil.java 
> PRE-CREATION 
>   common/src/main/java/org/apache/atlas/utils/XMLPropertiesUtil.java 
> PRE-CREATION 
>   distro/src/conf/atlas-application.properties e2082ef 
>   distro/src/conf/policy-store.txt 5bcc1cf 
>   distro/src/conf/users-credentials.properties 212d018 
>   pom.xml 685eb7d 
>   webapp/pom.xml 4b67ffa 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java 
> 5db9646 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessorTypes.java 
> 5f3827a 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
> 13c8b53 
>   
> webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
>  676c9f9 
>   
> 

Re: Review Request 47612: ATLAS-495 : Atlas Ranger Authorization Plugin

2016-05-20 Thread Nixon Rodrigues


> On May 20, 2016, 10:42 a.m., Shwetha GS wrote:
> > authorizer/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java,
> >  line 75
> > 
> >
> > Use this syntax for all log statements. It already takes care of string 
> > concatenation only if the log level is enabled. if debug enabled check is 
> > not required:
> > LOG.debug("<== AtlasAuthorizationFilter getAtlasAction HTTP Method {} 
> > mapped to AtlasAction : {}", method, action);

Will create another patch for this JIRA only and provide it as soon as possible.


- Nixon


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


On May 20, 2016, 2:02 p.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47612/
> ---
> 
> (Updated May 20, 2016, 2:02 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Shwetha GS, Selvamohan Neethiraj, 
> and Hemanth Yamijala.
> 
> 
> Bugs: ATLAS-495
> https://issues.apache.org/jira/browse/ATLAS-495
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Patch contains following changes : 
> 
> 1) Refactoring of authorization code to authorizer module to be reused by 
> webapp, ranger plugin modules.
> 1) Default policy file path to atlas-home/conf/policy-store.txt if property 
> is not set in atlas-application.properties file.
> 2) Renamed create action instead of  write.
> 4) Added authorizer impl class in atlas properties and fall back to simple 
> authorizer if authorizer is not set in property.
> 5) AtlasAuthorizerFactory for authorizer. 
> 6) Handled changes in Test cases and in filter as per new implementation of 
> AtlasAuthorizerFactory.
> 
> 
> Diffs
> -
> 
>   authorization/pom.xml PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
>  PRE-CREATION 
>   authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizerFactory.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyDef.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyParser.java
>  PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyUtil.java 
> PRE-CREATION 
>   
> authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtilsTest.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyParserTest.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyUtilTest.java
>  PRE-CREATION 
>   
> authorization/src/test/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizerTest.java
>  PRE-CREATION 
>   common/pom.xml 614b3f6 
>   common/src/main/java/org/apache/atlas/utils/PropertiesUtil.java 
> PRE-CREATION 
>   common/src/main/java/org/apache/atlas/utils/XMLPropertiesUtil.java 
> PRE-CREATION 
>   distro/src/conf/atlas-application.properties e2082ef 
>   distro/src/conf/policy-store.txt 5bcc1cf 
>   distro/src/conf/users-credentials.properties 212d018 
>   pom.xml 685eb7d 
>   webapp/pom.xml 4b67ffa 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java 
> 5db9646 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessorTypes.java 
> 5f3827a 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
> 13c8b53 
>   
> webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
>  676c9f9 
>   
> webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationUtils.java 
> 14a2aac 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 
> 7c93c7a 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java 
> 14a72f1 
>   webapp/src/main/java/org/apache/atlas/authorize/PolicyDef.java 0ee39df 
>   

Re: Review Request 47612: ATLAS-495 : Atlas Ranger Authorization Plugin

2016-05-20 Thread Nixon Rodrigues

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

(Updated May 20, 2016, 2:02 p.m.)


Review request for atlas, Madhan Neethiraj, Shwetha GS, Selvamohan Neethiraj, 
and Hemanth Yamijala.


Changes
---

Handled all comments from Madhan and also renamed module name from authorizer 
to authorization.


Bugs: ATLAS-495
https://issues.apache.org/jira/browse/ATLAS-495


Repository: atlas


Description
---

Patch contains following changes : 

1) Refactoring of authorization code to authorizer module to be reused by 
webapp, ranger plugin modules.
1) Default policy file path to atlas-home/conf/policy-store.txt if property is 
not set in atlas-application.properties file.
2) Renamed create action instead of  write.
4) Added authorizer impl class in atlas properties and fall back to simple 
authorizer if authorizer is not set in property.
5) AtlasAuthorizerFactory for authorizer. 
6) Handled changes in Test cases and in filter as per new implementation of 
AtlasAuthorizerFactory.


Diffs (updated)
-

  authorization/pom.xml PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java 
PRE-CREATION 
  authorization/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
 PRE-CREATION 
  authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/AtlasAuthorizerFactory.java
 PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
 PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java
 PRE-CREATION 
  authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyDef.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyParser.java 
PRE-CREATION 
  authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyUtil.java 
PRE-CREATION 
  
authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
 PRE-CREATION 
  
authorization/src/test/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtilsTest.java
 PRE-CREATION 
  
authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyParserTest.java
 PRE-CREATION 
  
authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyUtilTest.java
 PRE-CREATION 
  
authorization/src/test/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizerTest.java
 PRE-CREATION 
  common/pom.xml 614b3f6 
  common/src/main/java/org/apache/atlas/utils/PropertiesUtil.java PRE-CREATION 
  common/src/main/java/org/apache/atlas/utils/XMLPropertiesUtil.java 
PRE-CREATION 
  distro/src/conf/atlas-application.properties e2082ef 
  distro/src/conf/policy-store.txt 5bcc1cf 
  distro/src/conf/users-credentials.properties 212d018 
  pom.xml 685eb7d 
  webapp/pom.xml 4b67ffa 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java 
5db9646 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessorTypes.java 
5f3827a 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 13c8b53 
  
webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
 676c9f9 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationUtils.java 
14a2aac 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 7c93c7a 
  webapp/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java 
14a72f1 
  webapp/src/main/java/org/apache/atlas/authorize/PolicyDef.java 0ee39df 
  webapp/src/main/java/org/apache/atlas/authorize/PolicyParser.java 51a6dc2 
  webapp/src/main/java/org/apache/atlas/authorize/PolicyUtil.java a565f96 
  webapp/src/main/java/org/apache/atlas/authorize/SimpleAtlasAuthorizer.java 
2a32e4e 
  webapp/src/main/java/org/apache/atlas/util/FileReaderUtil.java 22eaff9 
  webapp/src/main/java/org/apache/atlas/util/PropertiesUtil.java fef8efb 
  webapp/src/main/java/org/apache/atlas/util/XMLPropertiesUtil.java 9c4f1c7 
  
webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthorizationFilter.java 
13fc7da 
  
webapp/src/main/java/org/apache/atlas/web/security/AtlasADAuthenticationProvider.java
 9e5df45 
  
webapp/src/main/java/org/apache/atlas/web/security/AtlasLdapAuthenticationProvider.java
 e66b930 
  webapp/src/main/webapp/WEB-INF/applicationContext.xml b58952c 
  
webapp/src/test/java/org/apache/atlas/authorize/AtlasAuthorizationUtilsTest.java
 5fc4420 
  webapp/src/test/java/org/apache/atlas/authorize/PolicyParserTest.java 507d4c6 
  webapp/src/test/java/org/apache/atlas/authorize/PolicyUtilTest.java 59e88c9 
  

Re: Review Request 47612: ATLAS-495 : Atlas Ranger Authorization Plugin

2016-05-20 Thread Shwetha GS

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




authorizer/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
 (line 75)


Use this syntax for all log statements. It already takes care of string 
concatenation only if the log level is enabled. if debug enabled check is not 
required:
LOG.debug("<== AtlasAuthorizationFilter getAtlasAction HTTP Method {} 
mapped to AtlasAction : {}", method, action);



pom.xml (line 466)


rename module to authorization


Please avoid un-ncessary log statements. Log only when needed

- Shwetha GS


On May 19, 2016, 6:49 p.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47612/
> ---
> 
> (Updated May 19, 2016, 6:49 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Shwetha GS, Selvamohan Neethiraj, 
> and Hemanth Yamijala.
> 
> 
> Bugs: ATLAS-495
> https://issues.apache.org/jira/browse/ATLAS-495
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Patch contains following changes : 
> 
> 1) Refactoring of authorization code to authorizer module to be reused by 
> webapp, ranger plugin modules.
> 1) Default policy file path to atlas-home/conf/policy-store.txt if property 
> is not set in atlas-application.properties file.
> 2) Renamed create action instead of  write.
> 4) Added authorizer impl class in atlas properties and fall back to simple 
> authorizer if authorizer is not set in property.
> 5) AtlasAuthorizerFactory for authorizer. 
> 6) Handled changes in Test cases and in filter as per new implementation of 
> AtlasAuthorizerFactory.
> 
> 
> Diffs
> -
> 
>   authorizer/pom.xml PRE-CREATION 
>   authorizer/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java 
> PRE-CREATION 
>   authorizer/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
> PRE-CREATION 
>   
> authorizer/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
>  PRE-CREATION 
>   authorizer/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 
> PRE-CREATION 
>   
> authorizer/src/main/java/org/apache/atlas/authorize/AtlasAuthorizerFactory.java
>  PRE-CREATION 
>   authorizer/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java 
> PRE-CREATION 
>   
> authorizer/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java
>  PRE-CREATION 
>   
> authorizer/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java
>  PRE-CREATION 
>   authorizer/src/main/java/org/apache/atlas/authorize/simple/PolicyDef.java 
> PRE-CREATION 
>   
> authorizer/src/main/java/org/apache/atlas/authorize/simple/PolicyParser.java 
> PRE-CREATION 
>   authorizer/src/main/java/org/apache/atlas/authorize/simple/PolicyUtil.java 
> PRE-CREATION 
>   
> authorizer/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
>  PRE-CREATION 
>   
> authorizer/src/test/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtilsTest.java
>  PRE-CREATION 
>   
> authorizer/src/test/java/org/apache/atlas/authorize/simple/PolicyParserTest.java
>  PRE-CREATION 
>   
> authorizer/src/test/java/org/apache/atlas/authorize/simple/PolicyUtilTest.java
>  PRE-CREATION 
>   
> authorizer/src/test/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizerTest.java
>  PRE-CREATION 
>   common/pom.xml 614b3f6 
>   common/src/main/java/org/apache/atlas/utils/PropertiesUtil.java 
> PRE-CREATION 
>   common/src/main/java/org/apache/atlas/utils/XMLPropertiesUtil.java 
> PRE-CREATION 
>   distro/src/conf/atlas-application.properties d4722fb 
>   pom.xml 30fb95a 
>   webapp/pom.xml 4b67ffa 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessRequest.java 
> 5db9646 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAccessorTypes.java 
> 5f3827a 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasActionTypes.java 
> 13c8b53 
>   
> webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationException.java
>  676c9f9 
>   
> webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizationUtils.java 
> 14a2aac 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasAuthorizer.java 
> 7c93c7a 
>   webapp/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java 
> 14a72f1 
>   webapp/src/main/java/org/apache/atlas/authorize/PolicyDef.java 0ee39df 
>   webapp/src/main/java/org/apache/atlas/authorize/PolicyParser.java 51a6dc2 
>   webapp/src/main/java/org/apache/atlas/authorize/PolicyUtil.java a565f96 
>   webapp/src/main/java/org/apache/atlas/authorize/SimpleAtlasAuthorizer.java