Re: Review Request 73522: RANGER-3372 : ISSUE IN POLICIES SEARCH ON REPORT PAGE WITH USER HAVING MORE THAN ONE UNIX GROUPS

2021-08-23 Thread Mehul Parikh

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


Ship it!




Ship It!

- Mehul Parikh


On Aug. 20, 2021, 5:16 a.m., Mateen Mansoori wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73522/
> ---
> 
> (Updated Aug. 20, 2021, 5:16 a.m.)
> 
> 
> Review request for ranger, Dhaval Rajpara, Dhaval Shah, Abhay Kulkarni, 
> Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3372
> https://issues.apache.org/jira/browse/RANGER-3372
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> PROBLEM STATEMENT : 
> We have a user called "A"
> User A belongs to 2 Groups [Group 1 and Group 2 ]
> Group 1 is assigned to Hive Policy [Test 1 ]
> Group 2 is assigned to Hive Policy [Test 2 ]
> 
> Now while searching user "A" in Ranger Reports , We can only see 1 of the 
> Policy is listing , Expected behaviour should be : Both policy should be 
> displayed in reports.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> b9a926b33 
> 
> 
> Diff: https://reviews.apache.org/r/73522/diff/4/
> 
> 
> Testing
> ---
> 
> Ran - mvn clean compile test verify install
> Testing - Tested on local VM.
> 
> 
> Thanks,
> 
> Mateen Mansoori
> 
>



Re: Review Request 73522: RANGER-3372 : ISSUE IN POLICIES SEARCH ON REPORT PAGE WITH USER HAVING MORE THAN ONE UNIX GROUPS

2021-08-20 Thread Abhay Kulkarni

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


Ship it!




Ship It!

- Abhay Kulkarni


On Aug. 20, 2021, 5:16 a.m., Mateen Mansoori wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73522/
> ---
> 
> (Updated Aug. 20, 2021, 5:16 a.m.)
> 
> 
> Review request for ranger, Dhaval Rajpara, Dhaval Shah, Abhay Kulkarni, 
> Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3372
> https://issues.apache.org/jira/browse/RANGER-3372
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> PROBLEM STATEMENT : 
> We have a user called "A"
> User A belongs to 2 Groups [Group 1 and Group 2 ]
> Group 1 is assigned to Hive Policy [Test 1 ]
> Group 2 is assigned to Hive Policy [Test 2 ]
> 
> Now while searching user "A" in Ranger Reports , We can only see 1 of the 
> Policy is listing , Expected behaviour should be : Both policy should be 
> displayed in reports.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> b9a926b33 
> 
> 
> Diff: https://reviews.apache.org/r/73522/diff/4/
> 
> 
> Testing
> ---
> 
> Ran - mvn clean compile test verify install
> Testing - Tested on local VM.
> 
> 
> Thanks,
> 
> Mateen Mansoori
> 
>



Re: Review Request 73522: RANGER-3372 : ISSUE IN POLICIES SEARCH ON REPORT PAGE WITH USER HAVING MORE THAN ONE UNIX GROUPS

2021-08-19 Thread Abhay Kulkarni

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




security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java
Line 4851 (original), 4855 (patched)


Is this check needed? groupNames will contain at least one element viz. 
"public".


- Abhay Kulkarni


On Aug. 19, 2021, 6:08 a.m., Mateen Mansoori wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73522/
> ---
> 
> (Updated Aug. 19, 2021, 6:08 a.m.)
> 
> 
> Review request for ranger, Dhaval Rajpara, Dhaval Shah, Abhay Kulkarni, 
> Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3372
> https://issues.apache.org/jira/browse/RANGER-3372
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> PROBLEM STATEMENT : 
> We have a user called "A"
> User A belongs to 2 Groups [Group 1 and Group 2 ]
> Group 1 is assigned to Hive Policy [Test 1 ]
> Group 2 is assigned to Hive Policy [Test 2 ]
> 
> Now while searching user "A" in Ranger Reports , We can only see 1 of the 
> Policy is listing , Expected behaviour should be : Both policy should be 
> displayed in reports.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> b9a926b33 
> 
> 
> Diff: https://reviews.apache.org/r/73522/diff/3/
> 
> 
> Testing
> ---
> 
> Ran - mvn clean compile test verify install
> Testing - Tested on local VM.
> 
> 
> Thanks,
> 
> Mateen Mansoori
> 
>



Re: Review Request 73522: RANGER-3372 : ISSUE IN POLICIES SEARCH ON REPORT PAGE WITH USER HAVING MORE THAN ONE UNIX GROUPS

2021-08-19 Thread Mateen Mansoori


> On Aug. 18, 2021, 7:13 p.m., Abhay Kulkarni wrote:
> > security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java
> > Lines 4847 (patched)
> > 
> >
> > If there are no groups for given user when database query returns, will 
> > the groupNames be null (or empty set)?
> > 
> > Please consider adding public group even when the groupNames is null ( 
> > by creating a HashSet containing only "public" group and assigniing it to 
> > groupNames). Then the test on line 4851 is not required.

DB query return empty if no group(s) found for the given user, So removed null 
check.


- Mateen


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


On Aug. 19, 2021, 6:08 a.m., Mateen Mansoori wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73522/
> ---
> 
> (Updated Aug. 19, 2021, 6:08 a.m.)
> 
> 
> Review request for ranger, Dhaval Rajpara, Dhaval Shah, Abhay Kulkarni, 
> Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3372
> https://issues.apache.org/jira/browse/RANGER-3372
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> PROBLEM STATEMENT : 
> We have a user called "A"
> User A belongs to 2 Groups [Group 1 and Group 2 ]
> Group 1 is assigned to Hive Policy [Test 1 ]
> Group 2 is assigned to Hive Policy [Test 2 ]
> 
> Now while searching user "A" in Ranger Reports , We can only see 1 of the 
> Policy is listing , Expected behaviour should be : Both policy should be 
> displayed in reports.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> b9a926b33 
> 
> 
> Diff: https://reviews.apache.org/r/73522/diff/3/
> 
> 
> Testing
> ---
> 
> Ran - mvn clean compile test verify install
> Testing - Tested on local VM.
> 
> 
> Thanks,
> 
> Mateen Mansoori
> 
>



Re: Review Request 73522: RANGER-3372 : ISSUE IN POLICIES SEARCH ON REPORT PAGE WITH USER HAVING MORE THAN ONE UNIX GROUPS

2021-08-19 Thread Mateen Mansoori

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

(Updated Aug. 19, 2021, 6:08 a.m.)


Review request for ranger, Dhaval Rajpara, Dhaval Shah, Abhay Kulkarni, Madhan 
Neethiraj, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.


Changes
---

Handled review comment.


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


Repository: ranger


Description
---

PROBLEM STATEMENT : 
We have a user called "A"
User A belongs to 2 Groups [Group 1 and Group 2 ]
Group 1 is assigned to Hive Policy [Test 1 ]
Group 2 is assigned to Hive Policy [Test 2 ]

Now while searching user "A" in Ranger Reports , We can only see 1 of the 
Policy is listing , Expected behaviour should be : Both policy should be 
displayed in reports.


Diffs (updated)
-

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
b9a926b33 


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

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


Testing
---

Ran - mvn clean compile test verify install
Testing - Tested on local VM.


Thanks,

Mateen Mansoori



Re: Review Request 73522: RANGER-3372 : ISSUE IN POLICIES SEARCH ON REPORT PAGE WITH USER HAVING MORE THAN ONE UNIX GROUPS

2021-08-18 Thread Abhay Kulkarni

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




security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java
Lines 4847 (patched)


If there are no groups for given user when database query returns, will the 
groupNames be null (or empty set)?

Please consider adding public group even when the groupNames is null ( by 
creating a HashSet containing only "public" group and assigniing it to 
groupNames). Then the test on line 4851 is not required.



security-admin/src/main/java/org/apache/ranger/common/RangerConstants.java
Lines 43 (patched)


This may not be necessary. It is already defined as 
RangerPolicyEngine.USER_CURRENT


- Abhay Kulkarni


On Aug. 18, 2021, 3:52 p.m., Mateen Mansoori wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73522/
> ---
> 
> (Updated Aug. 18, 2021, 3:52 p.m.)
> 
> 
> Review request for ranger, Dhaval Rajpara, Dhaval Shah, Abhay Kulkarni, 
> Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3372
> https://issues.apache.org/jira/browse/RANGER-3372
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> PROBLEM STATEMENT : 
> We have a user called "A"
> User A belongs to 2 Groups [Group 1 and Group 2 ]
> Group 1 is assigned to Hive Policy [Test 1 ]
> Group 2 is assigned to Hive Policy [Test 2 ]
> 
> Now while searching user "A" in Ranger Reports , We can only see 1 of the 
> Policy is listing , Expected behaviour should be : Both policy should be 
> displayed in reports.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> c5add3aa2 
>   security-admin/src/main/java/org/apache/ranger/common/RangerConstants.java 
> f00ea05ca 
> 
> 
> Diff: https://reviews.apache.org/r/73522/diff/2/
> 
> 
> Testing
> ---
> 
> Ran - mvn clean compile test verify install
> Testing - Tested on local VM.
> 
> 
> Thanks,
> 
> Mateen Mansoori
> 
>



Re: Review Request 73522: RANGER-3372 : ISSUE IN POLICIES SEARCH ON REPORT PAGE WITH USER HAVING MORE THAN ONE UNIX GROUPS

2021-08-18 Thread Mateen Mansoori

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

(Updated Aug. 18, 2021, 3:52 p.m.)


Review request for ranger, Dhaval Rajpara, Dhaval Shah, Abhay Kulkarni, Madhan 
Neethiraj, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.


Changes
---

Added changes to fetch policies assinged to public group and macro user {USER} 
when searching policies for user on report page


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


Repository: ranger


Description
---

PROBLEM STATEMENT : 
We have a user called "A"
User A belongs to 2 Groups [Group 1 and Group 2 ]
Group 1 is assigned to Hive Policy [Test 1 ]
Group 2 is assigned to Hive Policy [Test 2 ]

Now while searching user "A" in Ranger Reports , We can only see 1 of the 
Policy is listing , Expected behaviour should be : Both policy should be 
displayed in reports.


Diffs (updated)
-

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
c5add3aa2 
  security-admin/src/main/java/org/apache/ranger/common/RangerConstants.java 
f00ea05ca 


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

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


Testing
---

Ran - mvn clean compile test verify install
Testing - Tested on local VM.


Thanks,

Mateen Mansoori



Review Request 73522: RANGER-3372 : ISSUE IN POLICIES SEARCH ON REPORT PAGE WITH USER HAVING MORE THAN ONE UNIX GROUPS

2021-08-17 Thread Mateen Mansoori

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

Review request for ranger, Dhaval Rajpara, Dhaval Shah, Abhay Kulkarni, Madhan 
Neethiraj, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.


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


Repository: ranger


Description
---

PROBLEM STATEMENT : 
We have a user called "A"
User A belongs to 2 Groups [Group 1 and Group 2 ]
Group 1 is assigned to Hive Policy [Test 1 ]
Group 2 is assigned to Hive Policy [Test 2 ]

Now while searching user "A" in Ranger Reports , We can only see 1 of the 
Policy is listing , Expected behaviour should be : Both policy should be 
displayed in reports.


Diffs
-

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
c5add3aa2 


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


Testing
---

Ran - mvn clean compile test verify install
Testing - Tested on local VM.


Thanks,

Mateen Mansoori