[jira] [Commented] (RANGER-2181) Code Improvement To Follow Best Practices

2018-08-07 Thread bhavik patel (JIRA)


[ 
https://issues.apache.org/jira/browse/RANGER-2181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16572707#comment-16572707
 ] 

bhavik patel commented on RANGER-2181:
--

Committed to master : 
https://github.com/apache/ranger/commit/2dfd1ea459ea27461fd2abc108a55ce84e78670a

> Code Improvement To Follow Best Practices
> -
>
> Key: RANGER-2181
> URL: https://issues.apache.org/jira/browse/RANGER-2181
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Affects Versions: 1.1.0
>Reporter: Mehul Parikh
>Assignee: bhavik patel
>Priority: Major
> Fix For: 2.0.0
>
> Attachments: 
> 0001-RANGER-2181-Code-Improvement-To-Follow-Best-Practice.patch, 
> RANGER-2181-01.patch, RANGER-2181-02.patch
>
>
> Code Improvement To Follow Best Practices for saving services. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Review Request 68186: RANGER-2181 : Code Improvement To Follow Best Practices

2018-08-07 Thread Mehul Parikh

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


Ship it!




Ship It!

- Mehul Parikh


On Aug. 7, 2018, 1:21 p.m., bhavik patel wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68186/
> ---
> 
> (Updated Aug. 7, 2018, 1:21 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Abhay Kulkarni, Madhan 
> Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, 
> and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2181
> https://issues.apache.org/jira/browse/RANGER-2181
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Code Improvement To Follow Best Practices.
> 
> 
> Diffs
> -
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/errors/ValidationErrorCode.java
>  41052dd 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
>  1893fb9 
>   
> agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerServiceValidator.java
>  64ccb7d 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
> c116ea2 
>   security-admin/src/main/webapp/scripts/models/RangerServiceDef.js 9945044 
>   security-admin/src/main/webapp/styles/xa.css db96ed2 
>   security-admin/src/main/webapp/templates/helpers/XAHelpers.js 8ace4d7 
> 
> 
> Diff: https://reviews.apache.org/r/68186/diff/3/
> 
> 
> Testing
> ---
> 
> 1. Tested Ranger Admin & Ranger KMS rest calls.
> 
> 
> Thanks,
> 
> bhavik patel
> 
>



Re: Review Request 68186: RANGER-2181 : Code Improvement To Follow Best Practices

2018-08-07 Thread Abhay Kulkarni

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


Ship it!




Ship It!

- Abhay Kulkarni


On Aug. 7, 2018, 1:21 p.m., bhavik patel wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68186/
> ---
> 
> (Updated Aug. 7, 2018, 1:21 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Abhay Kulkarni, Madhan 
> Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, 
> and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2181
> https://issues.apache.org/jira/browse/RANGER-2181
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Code Improvement To Follow Best Practices.
> 
> 
> Diffs
> -
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/errors/ValidationErrorCode.java
>  41052dd 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
>  1893fb9 
>   
> agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerServiceValidator.java
>  64ccb7d 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
> c116ea2 
>   security-admin/src/main/webapp/scripts/models/RangerServiceDef.js 9945044 
>   security-admin/src/main/webapp/styles/xa.css db96ed2 
>   security-admin/src/main/webapp/templates/helpers/XAHelpers.js 8ace4d7 
> 
> 
> Diff: https://reviews.apache.org/r/68186/diff/3/
> 
> 
> Testing
> ---
> 
> 1. Tested Ranger Admin & Ranger KMS rest calls.
> 
> 
> Thanks,
> 
> bhavik patel
> 
>



[jira] [Updated] (RANGER-2171) Unit Test cases to cover policy operations from service admin user

2018-08-07 Thread Mehul Parikh (JIRA)


 [ 
https://issues.apache.org/jira/browse/RANGER-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mehul Parikh updated RANGER-2171:
-
Attachment: RANGER-2181.2.patch

> Unit Test cases to cover policy operations from service admin user
> --
>
> Key: RANGER-2171
> URL: https://issues.apache.org/jira/browse/RANGER-2171
> Project: Ranger
>  Issue Type: Test
>  Components: Ranger
>Reporter: Pradeep Agrawal
>Assignee: Nikhil Purbhe
>Priority: Major
> Fix For: 1.0.1, 2.0.0
>
> Attachments: RANGER-2171.3.patch, RANGER-2181.2.patch
>
>
> Unit Test cases to cover policy operations from service admin 
> user(RANGER-2168)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (RANGER-2171) Unit Test cases to cover policy operations from service admin user

2018-08-07 Thread Mehul Parikh (JIRA)


 [ 
https://issues.apache.org/jira/browse/RANGER-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mehul Parikh updated RANGER-2171:
-
Attachment: RANGER-2171.3.patch

> Unit Test cases to cover policy operations from service admin user
> --
>
> Key: RANGER-2171
> URL: https://issues.apache.org/jira/browse/RANGER-2171
> Project: Ranger
>  Issue Type: Test
>  Components: Ranger
>Reporter: Pradeep Agrawal
>Assignee: Nikhil Purbhe
>Priority: Major
> Fix For: 1.0.1, 2.0.0
>
> Attachments: RANGER-2171.3.patch
>
>
> Unit Test cases to cover policy operations from service admin 
> user(RANGER-2168)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (RANGER-2184) Update RangerAtlas authorization to authorize add/update/remove of relationships

2018-08-07 Thread Nixon Rodrigues (JIRA)


 [ 
https://issues.apache.org/jira/browse/RANGER-2184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nixon Rodrigues updated RANGER-2184:

Summary: Update RangerAtlas authorization to authorize add/update/remove of 
relationships  (was: Update Atlas authorization to authorize add/update/remove 
of relationships)

> Update RangerAtlas authorization to authorize add/update/remove of 
> relationships
> 
>
> Key: RANGER-2184
> URL: https://issues.apache.org/jira/browse/RANGER-2184
> Project: Ranger
>  Issue Type: Bug
>  Components: plugins
>Affects Versions: 1.1.0
>Reporter: Nixon Rodrigues
>Assignee: Nixon Rodrigues
>Priority: Major
> Fix For: 2.0.0
>
>
> Ranger Authorization to include authorization for new Atlas relationship 
> resource.
> Actions : add-relationship, update-relationship, remove-relationship



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (RANGER-2184) Update Atlas authorization to authorize add/update/remove of relationships

2018-08-07 Thread Nixon Rodrigues (JIRA)


 [ 
https://issues.apache.org/jira/browse/RANGER-2184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nixon Rodrigues updated RANGER-2184:

Summary: Update Atlas authorization to authorize add/update/remove of 
relationships  (was: Update Atlas authorization model to authorize 
add/update/remove of relationships)

> Update Atlas authorization to authorize add/update/remove of relationships
> --
>
> Key: RANGER-2184
> URL: https://issues.apache.org/jira/browse/RANGER-2184
> Project: Ranger
>  Issue Type: Bug
>  Components: plugins
>Affects Versions: 1.1.0
>Reporter: Nixon Rodrigues
>Assignee: Nixon Rodrigues
>Priority: Major
> Fix For: 2.0.0
>
>
> Ranger Authorization to include authorization for new Atlas relationship 
> resource.
> Actions : add-relationship, update-relationship, remove-relationship



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (RANGER-2181) Code Improvement To Follow Best Practices

2018-08-07 Thread bhavik patel (JIRA)


 [ 
https://issues.apache.org/jira/browse/RANGER-2181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bhavik patel updated RANGER-2181:
-
Attachment: RANGER-2181-02.patch

> Code Improvement To Follow Best Practices
> -
>
> Key: RANGER-2181
> URL: https://issues.apache.org/jira/browse/RANGER-2181
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Affects Versions: 1.1.0
>Reporter: Mehul Parikh
>Assignee: bhavik patel
>Priority: Major
> Fix For: 2.0.0
>
> Attachments: 
> 0001-RANGER-2181-Code-Improvement-To-Follow-Best-Practice.patch, 
> RANGER-2181-01.patch, RANGER-2181-02.patch
>
>
> Code Improvement To Follow Best Practices for saving services. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Review Request 68186: RANGER-2181 : Code Improvement To Follow Best Practices

2018-08-07 Thread bhavik patel


> On Aug. 6, 2018, 8:16 p.m., Abhay Kulkarni wrote:
> > agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
> > Lines 43 (patched)
> > 
> >
> > Do we really need a hash table here? It appears that there is only one 
> > regular expression string to be compiled into Pattern. Is having a static 
> > Pattern sufficient for this validation?

Yes. Static Pattern is sufficient


> On Aug. 6, 2018, 8:16 p.m., Abhay Kulkarni wrote:
> > security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
> > Lines 638 (patched)
> > 
> >
> > Is it allowed to have service-name consisting entirely of blank 
> > characters?

Its not allowed. We will get the vaidation message "Missing service name" from 
server side.


- bhavik


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


On Aug. 7, 2018, 1:21 p.m., bhavik patel wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68186/
> ---
> 
> (Updated Aug. 7, 2018, 1:21 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Abhay Kulkarni, Madhan 
> Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, 
> and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2181
> https://issues.apache.org/jira/browse/RANGER-2181
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Code Improvement To Follow Best Practices.
> 
> 
> Diffs
> -
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/errors/ValidationErrorCode.java
>  41052dd 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
>  1893fb9 
>   
> agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerServiceValidator.java
>  64ccb7d 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
> c116ea2 
>   security-admin/src/main/webapp/scripts/models/RangerServiceDef.js 9945044 
>   security-admin/src/main/webapp/styles/xa.css db96ed2 
>   security-admin/src/main/webapp/templates/helpers/XAHelpers.js 8ace4d7 
> 
> 
> Diff: https://reviews.apache.org/r/68186/diff/3/
> 
> 
> Testing
> ---
> 
> 1. Tested Ranger Admin & Ranger KMS rest calls.
> 
> 
> Thanks,
> 
> bhavik patel
> 
>



[jira] [Created] (RANGER-2184) Update Atlas authorization model to authorize add/update/remove of relationships

2018-08-07 Thread Nixon Rodrigues (JIRA)
Nixon Rodrigues created RANGER-2184:
---

 Summary: Update Atlas authorization model to authorize 
add/update/remove of relationships
 Key: RANGER-2184
 URL: https://issues.apache.org/jira/browse/RANGER-2184
 Project: Ranger
  Issue Type: Bug
  Components: plugins
Affects Versions: 1.1.0
Reporter: Nixon Rodrigues
Assignee: Nixon Rodrigues
 Fix For: 2.0.0


Ranger Authorization to include authorization for new Atlas relationship 
resource.

Actions : add-relationship, update-relationship, remove-relationship



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Review Request 68228: Unit Test cases to cover policy operations from service admin user

2018-08-07 Thread Velmurugan Periasamy

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




security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java
Lines 1046 (patched)


Can you fix the PMD error? This is breaking the build? 

```
[INFO] --- maven-pmd-plugin:3.7:check (default) @ security-admin-web ---
[INFO] PMD Failure: org.apache.ranger.rest.TestServiceREST:1046 
Rule:UnusedLocalVariable Priority:3 Avoid unused local variables such as 'rs'..
```


- Velmurugan Periasamy


On Aug. 7, 2018, 7:26 a.m., Nikhil P wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68228/
> ---
> 
> (Updated Aug. 7, 2018, 7:26 a.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
> Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
> Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2171
> https://issues.apache.org/jira/browse/RANGER-2171
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Unit Test cases to cover policy operations from service admin 
> user(RANGER-2168)
> 
> 
> Diffs
> -
> 
>   security-admin/src/test/java/org/apache/ranger/biz/TestServiceDBStore.java 
> b0b0110 
>   security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java 
> e669c03 
> 
> 
> Diff: https://reviews.apache.org/r/68228/diff/2/
> 
> 
> Testing
> ---
> 
> Tested if unit test cases are running fine on local.
> 
> 
> File Attachments
> 
> 
> RANGER-2171_2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2018/08/07/a83485c8-19f4-428c-b145-d271a16916f8__RANGER-2171_2.patch
> RANGER-2171_2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2018/08/07/4897e7a7-d3c0-46c0-b223-92c26eda5060__RANGER-2171_2.patch
> RANGER-2171_2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2018/08/07/81cec758-8870-4ebf-89f0-3f621a862dc9__RANGER-2171_2.patch
> 
> 
> Thanks,
> 
> Nikhil P
> 
>



Re: Review Request 68186: RANGER-2181 : Code Improvement To Follow Best Practices

2018-08-07 Thread bhavik patel

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

(Updated Aug. 7, 2018, 1:21 p.m.)


Review request for ranger, Ankita Sinha, Gautam Borad, Abhay Kulkarni, Madhan 
Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, 
and Velmurugan Periasamy.


Bugs: RANGER-2181
https://issues.apache.org/jira/browse/RANGER-2181


Repository: ranger


Description
---

Code Improvement To Follow Best Practices.


Diffs (updated)
-

  
agents-common/src/main/java/org/apache/ranger/plugin/errors/ValidationErrorCode.java
 41052dd 
  
agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java
 1893fb9 
  
agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerServiceValidator.java
 64ccb7d 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java c116ea2 
  security-admin/src/main/webapp/scripts/models/RangerServiceDef.js 9945044 
  security-admin/src/main/webapp/styles/xa.css db96ed2 
  security-admin/src/main/webapp/templates/helpers/XAHelpers.js 8ace4d7 


Diff: https://reviews.apache.org/r/68186/diff/3/

Changes: https://reviews.apache.org/r/68186/diff/2-3/


Testing
---

1. Tested Ranger Admin & Ranger KMS rest calls.


Thanks,

bhavik patel



[jira] [Commented] (RANGER-1958) [HBase] Implement getUserPermissions API of AccessControlService.Interface to allow clients to access HBase permissions stored in Ranger

2018-08-07 Thread Pierre Villard (JIRA)


[ 
https://issues.apache.org/jira/browse/RANGER-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16571408#comment-16571408
 ] 

Pierre Villard commented on RANGER-1958:


Any update on this one?

> [HBase] Implement getUserPermissions API of AccessControlService.Interface to 
> allow clients to access HBase permissions stored in Ranger
> 
>
> Key: RANGER-1958
> URL: https://issues.apache.org/jira/browse/RANGER-1958
> Project: Ranger
>  Issue Type: Bug
>  Components: plugins
>Reporter: Ankit Singhal
>Assignee: Ankit Singhal
>Priority: Major
> Attachments: RANGER-1958.patch
>
>
> We have added the support of ACLs in Phoenix as part of PHOENIX-4198. 
> Currently, the implementation relies on some of the APIs provided by 
> AccessControlService.Interface to get the user permission of the table but we 
> see that the API "AccessControlService.Interface#getUserPermissions"  is not 
> yet implemented in Ranger authorization module for HBase and thus, we are 
> unable to access permissions stored for HBase Table in Phoenix.
> In class RangerAuthorizationCoprocessor
> {code}
> @Override
>   public void getUserPermissions(RpcController controller, 
> AccessControlProtos.GetUserPermissionsRequest request, 
> RpcCallback done) {
>   LOG.debug("getUserPermissions(): ");
>   }
> {code}
> If we just implement this API, we can leverage the current HBase Ranger 
> plugin for Phoenix too.
> Although the long-term solution for Ranger could be to implement the 
> coprocessor hooks for Phoenix as how it has been done for HBase so that we 
> can also authorize new entities like VIEW, SEQUENCES, FUNCTIONs  (which can 
> not be supported with native HBase ACLs) along with Table and Schema. 
> Let me know your thoughts, I can try to put up a patch soon.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Review Request 68228: Unit Test cases to cover policy operations from service admin user

2018-08-07 Thread Mehul Parikh

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


Ship it!




Ship It!

- Mehul Parikh


On Aug. 7, 2018, 7:26 a.m., Nikhil P wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68228/
> ---
> 
> (Updated Aug. 7, 2018, 7:26 a.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
> Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
> Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2171
> https://issues.apache.org/jira/browse/RANGER-2171
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Unit Test cases to cover policy operations from service admin 
> user(RANGER-2168)
> 
> 
> Diffs
> -
> 
>   security-admin/src/test/java/org/apache/ranger/biz/TestServiceDBStore.java 
> b0b0110 
>   security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java 
> e669c03 
> 
> 
> Diff: https://reviews.apache.org/r/68228/diff/2/
> 
> 
> Testing
> ---
> 
> Tested if unit test cases are running fine on local.
> 
> 
> File Attachments
> 
> 
> RANGER-2171_2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2018/08/07/a83485c8-19f4-428c-b145-d271a16916f8__RANGER-2171_2.patch
> RANGER-2171_2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2018/08/07/4897e7a7-d3c0-46c0-b223-92c26eda5060__RANGER-2171_2.patch
> RANGER-2171_2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2018/08/07/81cec758-8870-4ebf-89f0-3f621a862dc9__RANGER-2171_2.patch
> 
> 
> Thanks,
> 
> Nikhil P
> 
>



Re: Review Request 68228: Unit Test cases to cover policy operations from service admin user

2018-08-07 Thread Gautam Borad

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


Ship it!




Ship It!

- Gautam Borad


On Aug. 7, 2018, 7:26 a.m., Nikhil P wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68228/
> ---
> 
> (Updated Aug. 7, 2018, 7:26 a.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
> Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
> Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2171
> https://issues.apache.org/jira/browse/RANGER-2171
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Unit Test cases to cover policy operations from service admin 
> user(RANGER-2168)
> 
> 
> Diffs
> -
> 
>   security-admin/src/test/java/org/apache/ranger/biz/TestServiceDBStore.java 
> b0b0110 
>   security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java 
> e669c03 
> 
> 
> Diff: https://reviews.apache.org/r/68228/diff/2/
> 
> 
> Testing
> ---
> 
> Tested if unit test cases are running fine on local.
> 
> 
> File Attachments
> 
> 
> RANGER-2171_2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2018/08/07/a83485c8-19f4-428c-b145-d271a16916f8__RANGER-2171_2.patch
> RANGER-2171_2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2018/08/07/4897e7a7-d3c0-46c0-b223-92c26eda5060__RANGER-2171_2.patch
> RANGER-2171_2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2018/08/07/81cec758-8870-4ebf-89f0-3f621a862dc9__RANGER-2171_2.patch
> 
> 
> Thanks,
> 
> Nikhil P
> 
>



Re: Review Request 68211: RANGER-2157 Add NiFi Registry service definition and NiFiRegistryClient

2018-08-07 Thread Ramesh Mani

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




plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryClient.java
Lines 72 (patched)


Intialize this connectivityStatus=true and make it false with error message 
where ever condition permits

you can do something like 

if (Response.Status.OK.getStatusCode() != response.getStatus()) {
connectivityStatus = false;
errMsg = "Status Code = " + response.getStatus();
}



plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryClient.java
Lines 125 (patched)


Can this context be null, please do the null check if so.



plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryClient.java
Lines 180 (patched)


Can this hostname be null?



plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryClient.java
Lines 198 (patched)


Move this as first statement in the method and return result instead of 
return new ArrayList<>();



plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryConnectionMgr.java
Lines 64 (patched)


if (LOG.isDebugEnabled()) {


- Ramesh Mani


On Aug. 7, 2018, 6:45 a.m., ijokaruma...@gmail.com Koji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68211/
> ---
> 
> (Updated Aug. 7, 2018, 6:45 a.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2157
> https://issues.apache.org/jira/browse/RANGER-2157
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Adding NiFi Registry service. NiFi Registry is a sub-project of NiFi.
> 
> 
> Diffs
> -
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
>  5e74da85a 
>   
> agents-common/src/main/resources/service-defs/ranger-servicedef-nifi-registry.json
>  PRE-CREATION 
>   plugin-nifi-registry/.gitignore PRE-CREATION 
>   plugin-nifi-registry/pom.xml PRE-CREATION 
>   
> plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/RangerServiceNiFiRegistry.java
>  PRE-CREATION 
>   
> plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryAuthType.java
>  PRE-CREATION 
>   
> plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryClient.java
>  PRE-CREATION 
>   
> plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryConfigs.java
>  PRE-CREATION 
>   
> plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryConnectionMgr.java
>  PRE-CREATION 
>   
> plugin-nifi-registry/src/test/java/org/apache/ranger/services/nifi/registry/client/TestNiFiRegistryClient.java
>  PRE-CREATION 
>   
> plugin-nifi-registry/src/test/java/org/apache/ranger/services/nifi/registry/client/TestNiFiRegistryConnectionMgr.java
>  PRE-CREATION 
>   plugin-nifi-registry/src/test/resources/resources-response.json 
> PRE-CREATION 
>   pom.xml 19a5e71b4 
>   src/main/assembly/admin-web.xml d0f354520 
> 
> 
> Diff: https://reviews.apache.org/r/68211/diff/1/
> 
> 
> Testing
> ---
> 
> Tested on local machine.
> 
> In order to get NiFi Registry for integration tests, NiFi Registry needs to 
> be built manually as the change is not released at NiFi Registry project yet. 
> Please check [NiFi Registry Pull Request 131 for 
> NIFIREG-186](https://github.com/apache/nifi-registry/pull/131) to do so, 
> especially this 
> [README](https://github.com/apache/nifi-registry/blob/29239be99a5f6275060ecbdcb16ae9a8e7abef86/nifi-registry-extensions/nifi-registry-ranger-extension/README.md)
>  file should be a starting point.
> 
> 
> Thanks,
> 
> ijokaruma...@gmail.com Koji
> 
>



Re: Review Request 68228: Unit Test cases to cover policy operations from service admin user

2018-08-07 Thread Nikhil P

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

(Updated Aug. 7, 2018, 12:56 p.m.)


Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
Polavarapu, and Velmurugan Periasamy.


Bugs: RANGER-2171
https://issues.apache.org/jira/browse/RANGER-2171


Repository: ranger


Description
---

Unit Test cases to cover policy operations from service admin user(RANGER-2168)


Diffs (updated)
-

  security-admin/src/test/java/org/apache/ranger/biz/TestServiceDBStore.java 
b0b0110 
  security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java 
e669c03 


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

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


Testing
---

Tested if unit test cases are running fine on local.


File Attachments (updated)


RANGER-2171_2.patch
  
https://reviews.apache.org/media/uploaded/files/2018/08/07/a83485c8-19f4-428c-b145-d271a16916f8__RANGER-2171_2.patch
RANGER-2171_2.patch
  
https://reviews.apache.org/media/uploaded/files/2018/08/07/4897e7a7-d3c0-46c0-b223-92c26eda5060__RANGER-2171_2.patch
RANGER-2171_2.patch
  
https://reviews.apache.org/media/uploaded/files/2018/08/07/81cec758-8870-4ebf-89f0-3f621a862dc9__RANGER-2171_2.patch


Thanks,

Nikhil P



[jira] [Commented] (RANGER-2157) Add NiFi Registry service definition and NiFiRegistryClient

2018-08-07 Thread Koji Kawamura (JIRA)


[ 
https://issues.apache.org/jira/browse/RANGER-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16571188#comment-16571188
 ] 

Koji Kawamura commented on RANGER-2157:
---

[~vperiasamy] I've submitted a review request. Please let me know if there's 
anything I need to do to proceed review cycle. Thanks!

> Add NiFi Registry service definition and NiFiRegistryClient
> ---
>
> Key: RANGER-2157
> URL: https://issues.apache.org/jira/browse/RANGER-2157
> Project: Ranger
>  Issue Type: Improvement
>  Components: plugins
>Reporter: Koji Kawamura
>Assignee: Koji Kawamura
>Priority: Major
> Attachments: 0001-RANGER-2157-Added-NiFi-Registry-service.patch
>
>
> Apache NiFi Registry is a subproject of Apache NiFi. NiFi Registry can manage 
> versioned flow definitions so that NiFi users can version control their flows.
> Ranger already has NiFi service. This JIRA adds similar integration with NiFi 
> Registry.
> The NiFi Registry integration will be split into two parts...
> The first part will be the service definition and the NiFiRegistryClient to 
> perform resource look ups against NiFi Registry. This work will be tracked 
> with this ticket.
> The second part is the plugin that will run in NiFi Registry and this part 
> will live in the NiFi Registry codebase and is being tracked with this JIRA: 
> NIFIREG-186



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (RANGER-2157) Add NiFi Registry service definition and NiFiRegistryClient

2018-08-07 Thread Koji Kawamura (JIRA)


[ 
https://issues.apache.org/jira/browse/RANGER-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16550346#comment-16550346
 ] 

Koji Kawamura edited comment on RANGER-2157 at 8/7/18 6:55 AM:
---

Attaching the first pass of a patch for NiFi Registry service def and resource 
lookup.

 In order to test this against a real NiFi Registry instance, you can do the 
following:

Build this branch with "mvn clean install -Pinclude-ranger"
https://github.com/ijokarumawak/nifi-registry/tree/nifireg-186

The NiFi Registry distribution will be in nifi-registry-assembly/target, copy 
the tar.gz somewhere and extract it.

Refer [NiFi Registry Ranger extension 
README.md|https://github.com/apache/nifi-registry/blob/29239be99a5f6275060ecbdcb16ae9a8e7abef86/nifi-registry-extensions/nifi-registry-ranger-extension/README.md]
 for configuration details.

In order for NiFi Registry to perform authorization, it needs to be secured, 
this is done by configuring conf/nifi-registry.properties to use HTTPS. Also, 
conf/authorizers.xml should be configured to use RangerAuthorizer. Example 
configurations are available here:
https://github.com/ijokarumawak/nifi-registry-ranger/tree/master/nifi-registry/conf

To start NiFi Registry, execute 'bin/nifi-registry.sh start'.
Navigate to https://localhost:18443/nifi-registry

You will need a client certificate loaded in your browser to authenticate, or 
configure NiFi Registry to use LDAP.


was (Author: ijokarumawak):
Attaching the first pass of a patch for NiFi Registry service def and resource 
lookup.

 In order to test this against a real NiFi Registry instance, you can do the 
following:

Build this branch with "mvn clean install"
https://github.com/ijokarumawak/nifi-registry/tree/nifireg-186

The NiFi Registry distribution will be in nifi-registry-assembly/target, copy 
the tar.gz somewhere and extract it.

Also, you will need to build the ranger plug-in at NiFi Registry side by:
{code}
mvn -f nifi-registry-ranger install
mkdir -p ${NIFI_REG_HOME}/ranger/lib/
cp -rp nifi-registry-ranger/target/lib/* ${NIFI_REG_HOME}/ranger/lib/
{code}

In order for NiFi Registry to perform authorization, it needs to be secured, 
this is done by configuring conf/nifi-registry.properties to use HTTPS. Also, 
conf/authorizers.xml should be configured to use RangerAuthorizer. Example 
configurations are available here:
https://github.com/ijokarumawak/nifi-registry-ranger/tree/master/nifi-registry/conf

To start NiFi Registry, execute 'bin/nifi-registry.sh start'.
Navigate to https://localhost:18443/nifi-registry

You will need a client certificate loaded in your browser to authenticate, or 
configure NiFi Registry to use LDAP.

> Add NiFi Registry service definition and NiFiRegistryClient
> ---
>
> Key: RANGER-2157
> URL: https://issues.apache.org/jira/browse/RANGER-2157
> Project: Ranger
>  Issue Type: Improvement
>  Components: plugins
>Reporter: Koji Kawamura
>Assignee: Koji Kawamura
>Priority: Major
> Attachments: 0001-RANGER-2157-Added-NiFi-Registry-service.patch
>
>
> Apache NiFi Registry is a subproject of Apache NiFi. NiFi Registry can manage 
> versioned flow definitions so that NiFi users can version control their flows.
> Ranger already has NiFi service. This JIRA adds similar integration with NiFi 
> Registry.
> The NiFi Registry integration will be split into two parts...
> The first part will be the service definition and the NiFiRegistryClient to 
> perform resource look ups against NiFi Registry. This work will be tracked 
> with this ticket.
> The second part is the plugin that will run in NiFi Registry and this part 
> will live in the NiFi Registry codebase and is being tracked with this JIRA: 
> NIFIREG-186



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Review Request 68211: RANGER-2157 Add NiFi Registry service definition and NiFiRegistryClient

2018-08-07 Thread ijokaruma...@gmail.com Koji

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

Review request for ranger.


Bugs: RANGER-2157
https://issues.apache.org/jira/browse/RANGER-2157


Repository: ranger


Description
---

Adding NiFi Registry service. NiFi Registry is a sub-project of NiFi.


Diffs
-

  
agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java
 5e74da85a 
  
agents-common/src/main/resources/service-defs/ranger-servicedef-nifi-registry.json
 PRE-CREATION 
  plugin-nifi-registry/.gitignore PRE-CREATION 
  plugin-nifi-registry/pom.xml PRE-CREATION 
  
plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/RangerServiceNiFiRegistry.java
 PRE-CREATION 
  
plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryAuthType.java
 PRE-CREATION 
  
plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryClient.java
 PRE-CREATION 
  
plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryConfigs.java
 PRE-CREATION 
  
plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryConnectionMgr.java
 PRE-CREATION 
  
plugin-nifi-registry/src/test/java/org/apache/ranger/services/nifi/registry/client/TestNiFiRegistryClient.java
 PRE-CREATION 
  
plugin-nifi-registry/src/test/java/org/apache/ranger/services/nifi/registry/client/TestNiFiRegistryConnectionMgr.java
 PRE-CREATION 
  plugin-nifi-registry/src/test/resources/resources-response.json PRE-CREATION 
  pom.xml 19a5e71b4 
  src/main/assembly/admin-web.xml d0f354520 


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


Testing
---

Tested on local machine.

In order to get NiFi Registry for integration tests, NiFi Registry needs to be 
built manually as the change is not released at NiFi Registry project yet. 
Please check [NiFi Registry Pull Request 131 for 
NIFIREG-186](https://github.com/apache/nifi-registry/pull/131) to do so, 
especially this 
[README](https://github.com/apache/nifi-registry/blob/29239be99a5f6275060ecbdcb16ae9a8e7abef86/nifi-registry-extensions/nifi-registry-ranger-extension/README.md)
 file should be a starting point.


Thanks,

ijokaruma...@gmail.com Koji