Re: Review Request 72687: RANGER-2913 Import policy fails when policy with same name present in multiple service

2020-07-20 Thread Madhan Neethiraj

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


Ship it!




Ship It!

- Madhan Neethiraj


On July 21, 2020, 4:45 a.m., Dineshkumar Yadav wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72687/
> ---
> 
> (Updated July 21, 2020, 4:45 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, 
> Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Import policy failing when more than one policies present with same name.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/db/XXPolicyDao.java 
> abd8aa6a3 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
> c795525f2 
>   security-admin/src/main/resources/META-INF/jpa_named_queries.xml 22e71e549 
> 
> 
> Diff: https://reviews.apache.org/r/72687/diff/2/
> 
> 
> Testing
> ---
> 
> Tested with my patch 
> Import policy now getting success even after more than one policies present 
> with same name.
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>



[jira] [Updated] (RANGER-2919) Source policies gets deleted after importing policy with deleteifexists parameter

2020-07-20 Thread Dineshkumar Yadav (Jira)


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

Dineshkumar Yadav updated RANGER-2919:
--
Description: 
Steps to Reproduce: 
1. Create 2 Hbase service i.e. hbase1 and hbase2, 
2. Create some policies in service - hbase1
3. perform policy import from source service - hbase1 to target service - hbase2
4. Policies from service - hbase1 gets successfully imported to service - 
hbase2 as per deleteifexist parameter feature
5. After import, Policies from source service - hbase1 also gets deleted


> Source policies gets deleted after importing policy with deleteifexists 
> parameter
> -
>
> Key: RANGER-2919
> URL: https://issues.apache.org/jira/browse/RANGER-2919
> Project: Ranger
>  Issue Type: Bug
>  Components: Ranger
>Reporter: Dineshkumar Yadav
>Priority: Major
>
> Steps to Reproduce: 
> 1. Create 2 Hbase service i.e. hbase1 and hbase2, 
> 2. Create some policies in service - hbase1
> 3. perform policy import from source service - hbase1 to target service - 
> hbase2
> 4. Policies from service - hbase1 gets successfully imported to service - 
> hbase2 as per deleteifexist parameter feature
> 5. After import, Policies from source service - hbase1 also gets deleted



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (RANGER-2919) Source policies gets deleted after importing policy with deleteifexists parameter

2020-07-20 Thread Dineshkumar Yadav (Jira)


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

Dineshkumar Yadav reassigned RANGER-2919:
-

Assignee: Dineshkumar Yadav

> Source policies gets deleted after importing policy with deleteifexists 
> parameter
> -
>
> Key: RANGER-2919
> URL: https://issues.apache.org/jira/browse/RANGER-2919
> Project: Ranger
>  Issue Type: Bug
>  Components: Ranger
>Reporter: Dineshkumar Yadav
>Assignee: Dineshkumar Yadav
>Priority: Major
>
> Steps to Reproduce: 
> 1. Create 2 Hbase service i.e. hbase1 and hbase2, 
> 2. Create some policies in service - hbase1
> 3. perform policy import from source service - hbase1 to target service - 
> hbase2
> 4. Policies from service - hbase1 gets successfully imported to service - 
> hbase2 as per deleteifexist parameter feature
> 5. After import, Policies from source service - hbase1 also gets deleted



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (RANGER-2919) Source policies gets deleted after importing policy with deleteifexists parameter

2020-07-20 Thread Dineshkumar Yadav (Jira)
Dineshkumar Yadav created RANGER-2919:
-

 Summary: Source policies gets deleted after importing policy with 
deleteifexists parameter
 Key: RANGER-2919
 URL: https://issues.apache.org/jira/browse/RANGER-2919
 Project: Ranger
  Issue Type: Bug
  Components: Ranger
Reporter: Dineshkumar Yadav






--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: Review Request 72687: RANGER-2913 Import policy fails when policy with same name present in multiple service

2020-07-20 Thread Dineshkumar Yadav

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

(Updated July 21, 2020, 4:45 a.m.)


Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, 
Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.


Repository: ranger


Description
---

Import policy failing when more than one policies present with same name.


Diffs (updated)
-

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyDao.java abd8aa6a3 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
c795525f2 
  security-admin/src/main/resources/META-INF/jpa_named_queries.xml 22e71e549 


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

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


Testing
---

Tested with my patch 
Import policy now getting success even after more than one policies present 
with same name.


Thanks,

Dineshkumar Yadav



[jira] [Commented] (RANGER-2895) Replace c3p0 connection pool with HikariCP, upgrading MySQL connector

2020-07-20 Thread Pradeep Agrawal (Jira)


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

Pradeep Agrawal commented on RANGER-2895:
-

[~RickyMa] : We will not take this patch for 2.1.0 release as its testing is 
not possible in available time frame. We will revisit this later.

> Replace c3p0 connection pool with HikariCP, upgrading MySQL connector
> -
>
> Key: RANGER-2895
> URL: https://issues.apache.org/jira/browse/RANGER-2895
> Project: Ranger
>  Issue Type: Improvement
>  Components: admin, Ranger
>Reporter: RickyMa
>Priority: Major
> Attachments: 
> 0001-RANGER-2895-Replace-c3p0-connection-pool-with-Hikari.patch
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> We should replace c3p0 with 
> [HikariCP|[https://github.com/brettwooldridge/HikariCP]]. HikariCP is much 
> faster and less error prone. HikariCP is more popular with 13.2k+ stars on 
> its github. There were no more new commits since Nov 18, 2019 in 
> [c3p0|[https://github.com/swaldman/c3p0/commits/master]].
> [MySQL connector|[https://github.com/mysql/mysql-connector-j]] should be 
> upgraded to the latest stable versions as well to include many essential 
> bugfixes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: Review Request 72684: RANGER-2911: ES plugin missing implemention for some ES request

2020-07-20 Thread Pradeep Agrawal

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




ranger-elasticsearch-plugin-shim/src/main/java/org/apache/ranger/authorization/elasticsearch/plugin/utils/RequestUtils.java
Lines 160 (patched)


Not mandatory but please review below suggestion if possible: 

may be we should use elseif and have single return statement at the end. 
in that case you might have to replace statements like 
return Arrays.asList(((GetMappingsRequest) 
request).indices());

with 

indexs = Arrays.asList(((GetMappingsRequest) 
request).indices());

the last statement : indexs.add("*") => can go to last else block.


- Pradeep Agrawal


On July 15, 2020, 9:03 a.m., ru jia wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72684/
> ---
> 
> (Updated July 15, 2020, 9:03 a.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2911
> https://issues.apache.org/jira/browse/RANGER-2911
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Add missing impls for some ES requests to resolve that users who have right 
> permission will be denied.
> 
> 
> Diffs
> -
> 
>   
> ranger-elasticsearch-plugin-shim/src/main/java/org/apache/ranger/authorization/elasticsearch/plugin/utils/RequestUtils.java
>  d07d08e 
> 
> 
> Diff: https://reviews.apache.org/r/72684/diff/1/
> 
> 
> Testing
> ---
> 
> 1. Compilation ok
> 2. Already used in production environment
> 
> 
> Thanks,
> 
> ru jia
> 
>



Re: Review Request 72687: RANGER-2913 Import policy fails when policy with same name present in multiple service

2020-07-20 Thread Madhan Neethiraj

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




security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
Lines 4295 (patched)


Instead retrieving List for the given service-name, 
policy-name and zone-name, (by calling getPolicies(SearchFilter)), consider 
retrieving a XXPolicy object - it will be quicker. If necessary, add following 
method in XXPolicyDao:
  XXPolicy findPolicy(String serviceName, String policyName, String 
zoneName);

Also, XXPolicyDao.findByPolicyName(String policyName) doesn't look a valid 
method, as it implies a single policy for a given name. Consider removing this 
method.


- Madhan Neethiraj


On July 17, 2020, 1:36 p.m., Dineshkumar Yadav wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72687/
> ---
> 
> (Updated July 17, 2020, 1:36 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, 
> Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Import policy failing when more than one policies present with same name.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
> c795525f2 
> 
> 
> Diff: https://reviews.apache.org/r/72687/diff/1/
> 
> 
> Testing
> ---
> 
> Tested with my patch 
> Import policy now getting success even after more than one policies present 
> with same name.
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>