Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-05-24 Thread Mehul Parikh

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


Ship it!




Ship It!

- Mehul Parikh


On April 21, 2021, 9:45 a.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73212/
> ---
> 
> (Updated April 21, 2021, 9:45 a.m.)
> 
> 
> Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
> Sarath Subramanian, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3195
> https://issues.apache.org/jira/browse/RANGER-3195
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Requirement :- The new requirement is to provide a way to authorize who can 
> Add/Remove/Update Classification for an entity even if the entities on which 
> classification have to be applied do not have classifications already tagged 
> to it.
> 
> Solution:-
> 
> 
>  This will require changes on Ranger Atlas service defination to introduce a 
> new resource "*classifications*" in entity authz model called classifications 
> at level 40 [4th level], with the new classifications resource ranger 
> authorizer will check the classification exist in policy for that 
> add/update/remove classification request to authorize.
> 
> 
> Diffs
> -
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
> d8331dbb4 
>   
> plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
>  79ef60465 
>   
> plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
>  c13633ad2 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 9d0cd9db2 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 1904c6847 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> 51ef67b8f 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  97ddb5df3 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> d15015009 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73212/diff/10/
> 
> 
> Testing
> ---
> 
> Tested Atlas with Ranger authorization with entities for add, update , 
> add-classification, remove-classification, update-classification events.
> 
> 
> Thanks,
> 
> Nixon Rodrigues
> 
>



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-21 Thread Nixon Rodrigues

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

(Updated April 21, 2021, 9:45 a.m.)


Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
Sarath Subramanian, and Velmurugan Periasamy.


Changes
---

Added NOT classification resource condition for default policy creation for 
lookup user and tag sync user.


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


Repository: ranger


Description
---

Requirement :- The new requirement is to provide a way to authorize who can 
Add/Remove/Update Classification for an entity even if the entities on which 
classification have to be applied do not have classifications already tagged to 
it.

Solution:-


 This will require changes on Ranger Atlas service defination to introduce a 
new resource "*classifications*" in entity authz model called classifications 
at level 40 [4th level], with the new classifications resource ranger 
authorizer will check the classification exist in policy for that 
add/update/remove classification request to authorize.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
d8331dbb4 
  
plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
 79ef60465 
  
plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
 c13633ad2 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 9d0cd9db2 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
1904c6847 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
51ef67b8f 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
97ddb5df3 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
d15015009 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/73212/diff/10/

Changes: https://reviews.apache.org/r/73212/diff/9-10/


Testing
---

Tested Atlas with Ranger authorization with entities for add, update , 
add-classification, remove-classification, update-classification events.


Thanks,

Nixon Rodrigues



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-19 Thread Nixon Rodrigues

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

(Updated April 19, 2021, 6:34 a.m.)


Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
Sarath Subramanian, and Velmurugan Periasamy.


Changes
---

resolved PMD issue by removing unused local variable.


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


Repository: ranger


Description
---

Requirement :- The new requirement is to provide a way to authorize who can 
Add/Remove/Update Classification for an entity even if the entities on which 
classification have to be applied do not have classifications already tagged to 
it.

Solution:-


 This will require changes on Ranger Atlas service defination to introduce a 
new resource "*classifications*" in entity authz model called classifications 
at level 40 [4th level], with the new classifications resource ranger 
authorizer will check the classification exist in policy for that 
add/update/remove classification request to authorize.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
d8331dbb4 
  
plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
 79ef60465 
  
plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
 c13633ad2 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 9d0cd9db2 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
1904c6847 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
51ef67b8f 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
97ddb5df3 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
d15015009 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/73212/diff/9/

Changes: https://reviews.apache.org/r/73212/diff/8-9/


Testing
---

Tested Atlas with Ranger authorization with entities for add, update , 
add-classification, remove-classification, update-classification events.


Thanks,

Nixon Rodrigues



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-16 Thread Nixon Rodrigues

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

(Updated April 16, 2021, 10:24 a.m.)


Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
Sarath Subramanian, and Velmurugan Periasamy.


Changes
---

Rebased patch, resolved merged conflicts.


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


Repository: ranger


Description
---

Requirement :- The new requirement is to provide a way to authorize who can 
Add/Remove/Update Classification for an entity even if the entities on which 
classification have to be applied do not have classifications already tagged to 
it.

Solution:-


 This will require changes on Ranger Atlas service defination to introduce a 
new resource "*classifications*" in entity authz model called classifications 
at level 40 [4th level], with the new classifications resource ranger 
authorizer will check the classification exist in policy for that 
add/update/remove classification request to authorize.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
d8331dbb4 
  
plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
 79ef60465 
  
plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
 c13633ad2 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 9d0cd9db2 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
1904c6847 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
51ef67b8f 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
97ddb5df3 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
d15015009 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/73212/diff/8/

Changes: https://reviews.apache.org/r/73212/diff/7-8/


Testing
---

Tested Atlas with Ranger authorization with entities for add, update , 
add-classification, remove-classification, update-classification events.


Thanks,

Nixon Rodrigues



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-15 Thread Madhan Neethiraj

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


Ship it!




Ship It!

- Madhan Neethiraj


On April 15, 2021, 1:27 p.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73212/
> ---
> 
> (Updated April 15, 2021, 1:27 p.m.)
> 
> 
> Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
> Sarath Subramanian, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3195
> https://issues.apache.org/jira/browse/RANGER-3195
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Requirement :- The new requirement is to provide a way to authorize who can 
> Add/Remove/Update Classification for an entity even if the entities on which 
> classification have to be applied do not have classifications already tagged 
> to it.
> 
> Solution:-
> 
> 
>  This will require changes on Ranger Atlas service defination to introduce a 
> new resource "*classifications*" in entity authz model called classifications 
> at level 40 [4th level], with the new classifications resource ranger 
> authorizer will check the classification exist in policy for that 
> add/update/remove classification request to authorize.
> 
> 
> Diffs
> -
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
> 4ce7ec991 
>   
> plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
>  79ef60465 
>   
> plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
>  c13633ad2 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 7179dc998 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 40917cdf4 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> ba9eb0157 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  371846f1e 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> 90004ec77 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73212/diff/7/
> 
> 
> Testing
> ---
> 
> Tested Atlas with Ranger authorization with entities for add, update , 
> add-classification, remove-classification, update-classification events.
> 
> 
> Thanks,
> 
> Nixon Rodrigues
> 
>



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-15 Thread Nixon Rodrigues

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

(Updated April 15, 2021, 1:27 p.m.)


Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
Sarath Subramanian, and Velmurugan Periasamy.


Changes
---

Minor refactoring and handled review review comments from Madhan N.


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


Repository: ranger


Description
---

Requirement :- The new requirement is to provide a way to authorize who can 
Add/Remove/Update Classification for an entity even if the entities on which 
classification have to be applied do not have classifications already tagged to 
it.

Solution:-


 This will require changes on Ranger Atlas service defination to introduce a 
new resource "*classifications*" in entity authz model called classifications 
at level 40 [4th level], with the new classifications resource ranger 
authorizer will check the classification exist in policy for that 
add/update/remove classification request to authorize.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
4ce7ec991 
  
plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
 79ef60465 
  
plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
 c13633ad2 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 7179dc998 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
40917cdf4 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
ba9eb0157 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
371846f1e 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
90004ec77 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/73212/diff/7/

Changes: https://reviews.apache.org/r/73212/diff/6-7/


Testing
---

Tested Atlas with Ranger authorization with entities for add, update , 
add-classification, remove-classification, update-classification events.


Thanks,

Nixon Rodrigues



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-14 Thread Madhan Neethiraj

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




security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
Lines 239 (patched)


Existing policy might be disabled; #239 will enable the copied policy. This 
is not desired. Please remove #239.



security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
Lines 251 (patched)


- isEntityClassificationResourceExist() => isEntityResource()
- this method should match only for policy-resource having hierarchy 
entity-type/entity-classification/entity. Current logic will match for 
following hierarchies as well:
-- entity-type/entity-classification/entity/entity-label
-- entity-type/entity-classification/entity/entity-business-metadata
  I suggest surrounding the 'for' loop at #253 with following 'if':
if (xPolResMap.size() == ATLAS_RESOURCE_ENTITY.size()) {
  ..
}


- Madhan Neethiraj


On April 14, 2021, 1:04 p.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73212/
> ---
> 
> (Updated April 14, 2021, 1:04 p.m.)
> 
> 
> Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
> Sarath Subramanian, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3195
> https://issues.apache.org/jira/browse/RANGER-3195
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Requirement :- The new requirement is to provide a way to authorize who can 
> Add/Remove/Update Classification for an entity even if the entities on which 
> classification have to be applied do not have classifications already tagged 
> to it.
> 
> Solution:-
> 
> 
>  This will require changes on Ranger Atlas service defination to introduce a 
> new resource "*classifications*" in entity authz model called classifications 
> at level 40 [4th level], with the new classifications resource ranger 
> authorizer will check the classification exist in policy for that 
> add/update/remove classification request to authorize.
> 
> 
> Diffs
> -
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
> 4ce7ec991 
>   
> plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
>  79ef60465 
>   
> plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
>  c13633ad2 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 7179dc998 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 40917cdf4 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> ba9eb0157 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  371846f1e 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> 90004ec77 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73212/diff/6/
> 
> 
> Testing
> ---
> 
> Tested Atlas with Ranger authorization with entities for add, update , 
> add-classification, remove-classification, update-classification events.
> 
> 
> Thanks,
> 
> Nixon Rodrigues
> 
>



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-14 Thread Nixon Rodrigues

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

(Updated April 14, 2021, 1:04 p.m.)


Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
Sarath Subramanian, and Velmurugan Periasamy.


Changes
---

Addressed review comments from Madhan N.


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


Repository: ranger


Description
---

Requirement :- The new requirement is to provide a way to authorize who can 
Add/Remove/Update Classification for an entity even if the entities on which 
classification have to be applied do not have classifications already tagged to 
it.

Solution:-


 This will require changes on Ranger Atlas service defination to introduce a 
new resource "*classifications*" in entity authz model called classifications 
at level 40 [4th level], with the new classifications resource ranger 
authorizer will check the classification exist in policy for that 
add/update/remove classification request to authorize.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
4ce7ec991 
  
plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
 79ef60465 
  
plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
 c13633ad2 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 7179dc998 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
40917cdf4 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
ba9eb0157 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
371846f1e 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
90004ec77 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
 PRE-CREATION 


Diff: https://reviews.apache.org/r/73212/diff/6/

Changes: https://reviews.apache.org/r/73212/diff/5-6/


Testing
---

Tested Atlas with Ranger authorization with entities for add, update , 
add-classification, remove-classification, update-classification events.


Thanks,

Nixon Rodrigues



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-13 Thread Madhan Neethiraj

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




agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json
Line 100 (original), 100 (patched)


Following accessTypes are not applicable to 'entity' resource anymore; they 
are only applicable to the new resource 'classification'. Please remove them 
from here.
 - entity-add-classification
 - entity-update-classification
 - entity-remove-classification



security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
Lines 217 (patched)


Only policies having following resource hierarchy need to be looked into:
 - entity-type/entity-classification/entity

Other policies can be skipped. Consider adding a check here.



security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
Lines 225 (patched)


This is a smart approach to clone the policy - good work! Please consider 
following updates:
 - policy.getName() + CLASSIFICATION: introduce a hypen as separator for 
easier readability
policy.getName() + " - " + CLASSIFICATION
 - set following policy fields to null:
   - id, guid, version, createTime, updateTime, resourceSignature
 - is resourceSignature computation (#234, #235) needed here? Doesn't 
svcStore.createPolicy() handle this?


- Madhan Neethiraj


On April 4, 2021, 5:39 p.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73212/
> ---
> 
> (Updated April 4, 2021, 5:39 p.m.)
> 
> 
> Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
> Sarath Subramanian, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3195
> https://issues.apache.org/jira/browse/RANGER-3195
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Requirement :- The new requirement is to provide a way to authorize who can 
> Add/Remove/Update Classification for an entity even if the entities on which 
> classification have to be applied do not have classifications already tagged 
> to it.
> 
> Solution:-
> 
> 
>  This will require changes on Ranger Atlas service defination to introduce a 
> new resource "*classifications*" in entity authz model called classifications 
> at level 40 [4th level], with the new classifications resource ranger 
> authorizer will check the classification exist in policy for that 
> add/update/remove classification request to authorize.
> 
> 
> Diffs
> -
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
> 4ce7ec991 
>   
> plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
>  79ef60465 
>   
> plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
>  c13633ad2 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 7179dc998 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 40917cdf4 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> ba9eb0157 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  371846f1e 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> 90004ec77 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73212/diff/5/
> 
> 
> Testing
> ---
> 
> Tested Atlas with Ranger authorization with entities for add, update , 
> add-classification, remove-classification, update-classification events.
> 
> 
> Thanks,
> 
> Nixon Rodrigues
> 
>



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-04 Thread bhavik patel

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


Ship it!




Ship It!

- bhavik patel


On April 4, 2021, 5:39 p.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73212/
> ---
> 
> (Updated April 4, 2021, 5:39 p.m.)
> 
> 
> Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
> Sarath Subramanian, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3195
> https://issues.apache.org/jira/browse/RANGER-3195
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Requirement :- The new requirement is to provide a way to authorize who can 
> Add/Remove/Update Classification for an entity even if the entities on which 
> classification have to be applied do not have classifications already tagged 
> to it.
> 
> Solution:-
> 
> 
>  This will require changes on Ranger Atlas service defination to introduce a 
> new resource "*classifications*" in entity authz model called classifications 
> at level 40 [4th level], with the new classifications resource ranger 
> authorizer will check the classification exist in policy for that 
> add/update/remove classification request to authorize.
> 
> 
> Diffs
> -
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
> 4ce7ec991 
>   
> plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
>  79ef60465 
>   
> plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
>  c13633ad2 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 7179dc998 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 40917cdf4 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> ba9eb0157 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  371846f1e 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> 90004ec77 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73212/diff/4/
> 
> 
> Testing
> ---
> 
> Tested Atlas with Ranger authorization with entities for add, update , 
> add-classification, remove-classification, update-classification events.
> 
> 
> Thanks,
> 
> Nixon Rodrigues
> 
>



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-04 Thread Nixon Rodrigues


> On March 19, 2021, 1:48 p.m., bhavik patel wrote:
> > security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql
> > Lines 1837 (patched)
> > 
> >
> > The current Ranger version is 2.2 than I think here we have to update 
> > to that.
> > 
> > @Madhan please correct me if I am thinking in wrong direction

Whatever my be version here, ranger adds own build version in x_db_version_h 
table.


- Nixon


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


On April 4, 2021, 5:39 p.m., Nixon Rodrigues wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73212/
> ---
> 
> (Updated April 4, 2021, 5:39 p.m.)
> 
> 
> Review request for ranger, Jayendra Parab, Madhan Neethiraj, Ramesh Mani, 
> Sarath Subramanian, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3195
> https://issues.apache.org/jira/browse/RANGER-3195
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Requirement :- The new requirement is to provide a way to authorize who can 
> Add/Remove/Update Classification for an entity even if the entities on which 
> classification have to be applied do not have classifications already tagged 
> to it.
> 
> Solution:-
> 
> 
>  This will require changes on Ranger Atlas service defination to introduce a 
> new resource "*classifications*" in entity authz model called classifications 
> at level 40 [4th level], with the new classifications resource ranger 
> authorizer will check the classification exist in policy for that 
> add/update/remove classification request to authorize.
> 
> 
> Diffs
> -
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
> 4ce7ec991 
>   
> plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
>  79ef60465 
>   
> plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
>  c13633ad2 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 7179dc998 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 40917cdf4 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> ba9eb0157 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  371846f1e 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> 90004ec77 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73212/diff/4/
> 
> 
> Testing
> ---
> 
> Tested Atlas with Ranger authorization with entities for add, update , 
> add-classification, remove-classification, update-classification events.
> 
> 
> Thanks,
> 
> Nixon Rodrigues
> 
>



Re: Review Request 73212: RANGER-3195 - Atlas Ranger Authorizer changes to add/update/remove classification on entities.

2021-04-04 Thread Nixon Rodrigues

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

(Updated April 4, 2021, 5:37 p.m.)


Review request for ranger, Jayendra Parab, Madhan Neethiraj, and Sarath 
Subramanian.


Changes
---

Addressed review comments from Madhan and Bhavik


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


Repository: ranger


Description
---

Requirement :- The new requirement is to provide a way to authorize who can 
Add/Remove/Update Classification for an entity even if the entities on which 
classification have to be applied do not have classifications already tagged to 
it.

Solution:-


 This will require changes on Ranger Atlas service defination to introduce a 
new resource "*classifications*" in entity authz model called classifications 
at level 40 [4th level], with the new classifications resource ranger 
authorizer will check the classification exist in policy for that 
add/update/remove classification request to authorize.


Diffs (updated)
-

  agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
4ce7ec991 
  
plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
 79ef60465 
  
plugin-atlas/src/main/java/org/apache/ranger/services/atlas/RangerServiceAtlas.java
 c13633ad2 
  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 7179dc998 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
40917cdf4 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
ba9eb0157 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
371846f1e 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
90004ec77 
  
security-admin/src/main/java/org/apache/ranger/patch/PatchAtlasForClassificationResource_J10047.java
 PRE-CREATION 


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

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


Testing
---

Tested Atlas with Ranger authorization with entities for add, update , 
add-classification, remove-classification, update-classification events.


Thanks,

Nixon Rodrigues