[jira] [Updated] (RANGER-4692) Sorting on the Ranger Admin - Plugin Status page by event(Download,Activation)

2024-03-05 Thread Rakesh Gupta (Jira)


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

Rakesh Gupta updated RANGER-4692:
-
Description: 
Currently there are different type like (Policy, Role, Tag, UserStore and GDS) 
on plugin status.

when we have plugins(large enough to accommodate in single page), It will be 
helpful to identify any out-of-sync plugins based on download times, sorting 
them by policyDownloadTime, tagDownloadTime, roleDownloadTime, 
userstoreDownloadTime and gdsDownloadTime.

*Design Approach*
# Update ranger table x_plugin_info by adding below new columns to handle 
sorting of plugin status.
{code:java}
policy_download_time bigint(20) DEFAULT NULL 
policy_activation_time bigint(20) DEFAULT NULL 
tag_download_time bigint(20) DEFAULT NULL
tag_activation_time bigint(20) DEFAULT NULL
gds_download_time bigint(20) DEFAULT NULL 
gds_activation_time bigint(20) DEFAULT NULL
role_download_time bigint(20) DEFAULT NULL 
role_activation_time bigint(20) DEFAULT NULL
userstore_download_time bigint(20) DEFAULT NULL 
userstore_activation_time bigint(20) DEFAULT NULL
cluster_name varchar(255) DEFAULT NULL
{code}
# create indexing for each new column.
# create a view vx_plugin_info table to capture all plugins status details.
# vx_plugin_info will fetch plugin info data from x_plugin_info, 
x_service_version_info, x_service_def table.

*Ranger changes*
 # For Upgrade, we will provide DB and Java Patches.
 # DB Patches will add a new column to the x_plugin_info table and add indexes 
on each newly added column of the x_plugin_info table to optimize query 
performance.
 # After adding the new columns to the x_plugin_info table, will create a view 
table (vx_plugin_info) that fetches data from multiple tables (x_plugin_info, 
x_service_version_info, x_service_def).
 # After the database is updated, Java patches will update values into the new 
column of the x_plugin_info table.

*API changes*
1.Plugin Status GET APIs for Sorting:
{code:java}
/service/plugins/info?sortType=desc=policyDownloadTime
/service/plugins/info?sortType=desc=policyActivationTime
/service/plugins/info?sortType=desc=lastPolicyUpdateTime
/service/plugins/info?sortType=desc=tagDownloadTime
/service/plugins/info?sortType=desc=tagActivationTime
/service/plugins/info?sortType=desc=lasttagUpdateTime
/service/plugins/info?sortType=desc=gdsDownloadTime
/service/plugins/info?sortType=desc=gdsActivationTime
/service/plugins/info?sortType=desc=lastgdsUpdateTime
/service/plugins/info?sortType=desc=roleDownloadTime
/service/plugins/info?sortType=desc=roleActivationTime
/service/plugins/info?sortType=desc=lastroleUpdateTime
/service/plugins/info?sortType=desc=userstoreDownloadTime
/service/plugins/info?sortType=desc=userstoreActivationTime
/service/plugins/info?sortType=desc=clusterName
/service/plugins/info?sortType=desc=serviceType
/service/plugins/info?sortType=desc=pluginIpAddress
{code}
2.Plugin Status GET APIs for Searching:
{code:java}
/service/plugins/info?serviceType={serviceTypeName}
/service/plugins/info?clusterName={clusterName}
{code}

  was:
Currently there are different type like (Policy, Role, Tag, UserStore and GDS) 
on plugin status.

when we have plugins(large enough to accommodate in single page), It will be 
helpful to identify any out-of-sync plugins based on download times, sorting 
them by policyDownloadTime, tagDownloadTime, roleDownloadTime, 
userstoreDownloadTime and gdsDownloadTime.


> Sorting on the Ranger Admin - Plugin Status page by event(Download,Activation)
> --
>
> Key: RANGER-4692
> URL: https://issues.apache.org/jira/browse/RANGER-4692
> Project: Ranger
>  Issue Type: New Feature
>  Components: Ranger
>Reporter: Rakesh Gupta
>Assignee: Rakesh Gupta
>Priority: Major
>
> Currently there are different type like (Policy, Role, Tag, UserStore and 
> GDS) on plugin status.
> when we have plugins(large enough to accommodate in single page), It will be 
> helpful to identify any out-of-sync plugins based on download times, sorting 
> them by policyDownloadTime, tagDownloadTime, roleDownloadTime, 
> userstoreDownloadTime and gdsDownloadTime.
> *Design Approach*
> # Update ranger table x_plugin_info by adding below new columns to handle 
> sorting of plugin status.
> {code:java}
> policy_download_time bigint(20) DEFAULT NULL 
> policy_activation_time bigint(20) DEFAULT NULL 
> tag_download_time bigint(20) DEFAULT NULL
> tag_activation_time bigint(20) DEFAULT NULL
> gds_download_time bigint(20) DEFAULT NULL 
> gds_activation_time bigint(20) DEFAULT NULL
> role_download_time bigint(20) DEFAULT NULL 
> role_activation_time bigint(20) DEFAULT NULL
> userstore_download_time bigint(20) DEFAULT NULL 
> userstore_activation_time bigint(20) DEFAULT NULL
> cluster_name varchar(255) 

Re: Review Request 74926: RANGER-4076: Support Java 17 for build and runtime

2024-03-05 Thread Kishor Gollapalliwar

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




pom.xml
Lines 428 (patched)


Are we planning to make changes in this class later to support build, if 
not instead of skipping class, shouldn't we remove it ?


- Kishor Gollapalliwar


On March 5, 2024, 7:10 a.m., Rakesh Gupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74926/
> ---
> 
> (Updated March 5, 2024, 7:10 a.m.)
> 
> 
> Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Abhay 
> Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, 
> sanket shelar, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4076
> https://issues.apache.org/jira/browse/RANGER-4076
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Currently only Java 8 and 11 are supported.  Java 17 is a major LTS version 
> of Java and adding support would modernize our Java version support.
> 
> This patch enables manual and Docker-based build of Apache Ranger. It ensures 
> compatibility with Java 8, Java 11, and Java 17 for both build and runtime 
> environments.
> (I encountered a TestCase Failure in the KnoxRangerTest class, so currently I 
> had excluded that class from jdk17 build)
> 
> 
> Diffs
> -
> 
>   agents-common/pom.xml 12e093f78 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/util/GraalScriptEngineCreator.java
>  512d8d3ca 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/util/NashornScriptEngineCreator.java
>  db620df92 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/util/ScriptEngineUtil.java
>  8d76c1d81 
>   dev-support/ranger-docker/.env 60bc4a9f2 
>   dev-support/ranger-docker/Dockerfile.ranger-build 9a192f152 
>   dev-support/ranger-docker/docker-compose.ranger-build.yml 3dd4a4a06 
>   distro/src/main/assembly/admin-web.xml 245d9ca09 
>   docs/src/site/resources/index.js bb876f28d 
>   hdfs-agent/pom.xml dece8f46f 
>   kms/pom.xml 2739bb81a 
>   kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java 
> 7188b19b2 
>   kms/src/main/java/org/apache/hadoop/crypto/key/RangerMasterKey.java 
> b6fc32950 
>   plugin-nestedstructure/pom.xml 0e208f99c 
>   
> plugin-nestedstructure/src/main/java/org/apache/ranger/authorization/nestedstructure/authorizer/RecordFilterJavaScript.java
>  77767767c 
>   
> plugin-nestedstructure/src/test/java/org/apache/ranger/authorization/nestedstructure/authorizer/TestRecordFilterJavaScript.java
>  9cb161b8d 
>   pom.xml cec2390f2 
>   ranger-tools/pom.xml cac8d7ba3 
>   
> ranger-tools/src/test/java/org/apache/ranger/policyengine/RangerPolicyEnginePerformanceTest.java
>  187d20227 
>   security-admin/pom.xml fc59287d0 
> 
> 
> Diff: https://reviews.apache.org/r/74926/diff/1/
> 
> 
> Testing
> ---
> 
> This patch has been successfully tested and verified with Java versions 8, 
> 11, and 17. The verification process included both manual and Docker setup. 
> Now we are able to build and run on same jdk.
> 
> 
> Thanks,
> 
> Rakesh Gupta
> 
>



Re: Review Request 74884: RANGER-4692: Sorting on the Ranger Admin - Plugin Status page by event(Download, Activation)

2024-03-05 Thread Rakesh Gupta


> On March 5, 2024, 10:11 p.m., Madhan Neethiraj wrote:
> > Rakesh - thank you for this enhancement. Ability to sort based on various 
> > timestamps will be of big help in troubleshooting. I see that you discarded 
> > this review; are you planning any further updates to this patch?

Hi Madhan,
Currently I am working on new design approach, I will share the approach on 
Jira.


- Rakesh


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


On Feb. 20, 2024, 9:02 a.m., Rakesh Gupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74884/
> ---
> 
> (Updated Feb. 20, 2024, 9:02 a.m.)
> 
> 
> Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Abhay 
> Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, 
> sanket shelar, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4692
> https://issues.apache.org/jira/browse/RANGER-4692
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Currently there are different type like (Policy, Role, Tag, UserStore and 
> GDS) on plugin status.
> 
> when we have plugins(large enough to accommodate in single page), It will be 
> helpful to identify any out-of-sync plugins based on download times, sorting 
> them by policyDownloadTime, tagDownloadTime, roleDownloadTime, 
> userstoreDownloadTime and gdsDownloadTime.
> 
> 
> Diffs
> -
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPluginInfo.java
>  6d3d17d9e 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> fa72ef2ea 
>   security-admin/db/mysql/patches/073-create-view-plugin-info.sql 
> PRE-CREATION 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 772514610 
>   security-admin/db/oracle/patches/067-create-view-plugin-info.sql 
> PRE-CREATION 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> e177d44d7 
>   security-admin/db/postgres/patches/073-create-view-plugin-info.sql 
> PRE-CREATION 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  32cfed7ae 
>   security-admin/db/sqlanywhere/patches/067-create-view-plugin-info.sql 
> PRE-CREATION 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> 831aad66d 
>   security-admin/db/sqlserver/patches/067-create-view-plugin-info.sql 
> PRE-CREATION 
>   security-admin/src/main/java/org/apache/ranger/entity/XXPluginInfo.java 
> a15d8d056 
>   
> security-admin/src/main/java/org/apache/ranger/service/RangerPluginInfoService.java
>  9dc26ceb7 
> 
> 
> Diff: https://reviews.apache.org/r/74884/diff/2/
> 
> 
> Testing
> ---
> 
> I have verified that new columns have been successfully added to the 
> x_plugin_info table(for fresh installment), through which we can now sort by 
> event(Download,Activation).
> I have tested and confirmed that data can be inserted into these new columns 
> in upgrade scenario, through which we can now use them for sorting the data 
> based on events(Download,Activation).
> 
> 
> Thanks,
> 
> Rakesh Gupta
> 
>



Re: Review Request 74926: RANGER-4076: Support Java 17 for build and runtime

2024-03-05 Thread Kishor Gollapalliwar

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




plugin-nestedstructure/src/test/java/org/apache/ranger/authorization/nestedstructure/authorizer/TestRecordFilterJavaScript.java
Line 59 (original), 62 (patched)


Will this break backword compatibility. If a older setup is using Scripts 
(compatible with Nashorm), will they need to update ?



pom.xml
Line 1007 (original), 1100 (patched)


Why we need DEBUG logging ?


- Kishor Gollapalliwar


On March 5, 2024, 7:10 a.m., Rakesh Gupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74926/
> ---
> 
> (Updated March 5, 2024, 7:10 a.m.)
> 
> 
> Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Abhay 
> Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, 
> sanket shelar, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4076
> https://issues.apache.org/jira/browse/RANGER-4076
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Currently only Java 8 and 11 are supported.  Java 17 is a major LTS version 
> of Java and adding support would modernize our Java version support.
> 
> This patch enables manual and Docker-based build of Apache Ranger. It ensures 
> compatibility with Java 8, Java 11, and Java 17 for both build and runtime 
> environments.
> (I encountered a TestCase Failure in the KnoxRangerTest class, so currently I 
> had excluded that class from jdk17 build)
> 
> 
> Diffs
> -
> 
>   agents-common/pom.xml 12e093f78 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/util/GraalScriptEngineCreator.java
>  512d8d3ca 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/util/NashornScriptEngineCreator.java
>  db620df92 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/util/ScriptEngineUtil.java
>  8d76c1d81 
>   dev-support/ranger-docker/.env 60bc4a9f2 
>   dev-support/ranger-docker/Dockerfile.ranger-build 9a192f152 
>   dev-support/ranger-docker/docker-compose.ranger-build.yml 3dd4a4a06 
>   distro/src/main/assembly/admin-web.xml 245d9ca09 
>   docs/src/site/resources/index.js bb876f28d 
>   hdfs-agent/pom.xml dece8f46f 
>   kms/pom.xml 2739bb81a 
>   kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java 
> 7188b19b2 
>   kms/src/main/java/org/apache/hadoop/crypto/key/RangerMasterKey.java 
> b6fc32950 
>   plugin-nestedstructure/pom.xml 0e208f99c 
>   
> plugin-nestedstructure/src/main/java/org/apache/ranger/authorization/nestedstructure/authorizer/RecordFilterJavaScript.java
>  77767767c 
>   
> plugin-nestedstructure/src/test/java/org/apache/ranger/authorization/nestedstructure/authorizer/TestRecordFilterJavaScript.java
>  9cb161b8d 
>   pom.xml cec2390f2 
>   ranger-tools/pom.xml cac8d7ba3 
>   
> ranger-tools/src/test/java/org/apache/ranger/policyengine/RangerPolicyEnginePerformanceTest.java
>  187d20227 
>   security-admin/pom.xml fc59287d0 
> 
> 
> Diff: https://reviews.apache.org/r/74926/diff/1/
> 
> 
> Testing
> ---
> 
> This patch has been successfully tested and verified with Java versions 8, 
> 11, and 17. The verification process included both manual and Docker setup. 
> Now we are able to build and run on same jdk.
> 
> 
> Thanks,
> 
> Rakesh Gupta
> 
>



Re: Review Request 74927: RANGER-4727: When tagDef delete fails, error message is not returned

2024-03-05 Thread Madhan Neethiraj

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


Ship it!




Ship It!

- Madhan Neethiraj


On March 5, 2024, 7:32 a.m., Subhrat Chaudhary wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74927/
> ---
> 
> (Updated March 5, 2024, 7:32 a.m.)
> 
> 
> Review request for ranger, Anand Nadar, Asit Vadhavkar, Madhan Neethiraj, 
> Monika Kachhadiya, and Siddhesh Phatak.
> 
> 
> Bugs: RANGER-4727
> https://issues.apache.org/jira/browse/RANGER-4727
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> When tagDef and a linked tag is created, and delete of the tagDef is 
> attempted with DELETE API - /service/tags/tagdef/{tagDefId}, it fails with 
> 400 and no error message is returned.
> This is fixed by adding a check and throw excpetion with proper message - if 
> the linked tag exists.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/TagDBStore.java 
> fb912d4f8 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java 
> ed3ed5eca 
> 
> 
> Diff: https://reviews.apache.org/r/74927/diff/1/
> 
> 
> Testing
> ---
> 
> Validated the the API with curl for the tagDef - PII_LOCATION (linked tag is 
> exists), the error response contains message:
> {"statusCode":0,"msgDesc":"Cannot delete tag: PII_LOCATION, please delete 
> linked resources first"}
> 
> Validated existing JUnits are passing
> 
> 
> Thanks,
> 
> Subhrat Chaudhary
> 
>



Re: Review Request 74927: RANGER-4727: When tagDef delete fails, error message is not returned

2024-03-05 Thread Kishor Gollapalliwar

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


Ship it!




Ship It!

- Kishor Gollapalliwar


On March 5, 2024, 7:32 a.m., Subhrat Chaudhary wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74927/
> ---
> 
> (Updated March 5, 2024, 7:32 a.m.)
> 
> 
> Review request for ranger, Anand Nadar, Asit Vadhavkar, Madhan Neethiraj, 
> Monika Kachhadiya, and Siddhesh Phatak.
> 
> 
> Bugs: RANGER-4727
> https://issues.apache.org/jira/browse/RANGER-4727
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> When tagDef and a linked tag is created, and delete of the tagDef is 
> attempted with DELETE API - /service/tags/tagdef/{tagDefId}, it fails with 
> 400 and no error message is returned.
> This is fixed by adding a check and throw excpetion with proper message - if 
> the linked tag exists.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/TagDBStore.java 
> fb912d4f8 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java 
> ed3ed5eca 
> 
> 
> Diff: https://reviews.apache.org/r/74927/diff/1/
> 
> 
> Testing
> ---
> 
> Validated the the API with curl for the tagDef - PII_LOCATION (linked tag is 
> exists), the error response contains message:
> {"statusCode":0,"msgDesc":"Cannot delete tag: PII_LOCATION, please delete 
> linked resources first"}
> 
> Validated existing JUnits are passing
> 
> 
> Thanks,
> 
> Subhrat Chaudhary
> 
>



Re: Review Request 74884: RANGER-4692: Sorting on the Ranger Admin - Plugin Status page by event(Download, Activation)

2024-03-05 Thread Madhan Neethiraj

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



Rakesh - thank you for this enhancement. Ability to sort based on various 
timestamps will be of big help in troubleshooting. I see that you discarded 
this review; are you planning any further updates to this patch?

- Madhan Neethiraj


On Feb. 20, 2024, 9:02 a.m., Rakesh Gupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74884/
> ---
> 
> (Updated Feb. 20, 2024, 9:02 a.m.)
> 
> 
> Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Abhay 
> Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, 
> sanket shelar, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4692
> https://issues.apache.org/jira/browse/RANGER-4692
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Currently there are different type like (Policy, Role, Tag, UserStore and 
> GDS) on plugin status.
> 
> when we have plugins(large enough to accommodate in single page), It will be 
> helpful to identify any out-of-sync plugins based on download times, sorting 
> them by policyDownloadTime, tagDownloadTime, roleDownloadTime, 
> userstoreDownloadTime and gdsDownloadTime.
> 
> 
> Diffs
> -
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPluginInfo.java
>  6d3d17d9e 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> fa72ef2ea 
>   security-admin/db/mysql/patches/073-create-view-plugin-info.sql 
> PRE-CREATION 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 772514610 
>   security-admin/db/oracle/patches/067-create-view-plugin-info.sql 
> PRE-CREATION 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> e177d44d7 
>   security-admin/db/postgres/patches/073-create-view-plugin-info.sql 
> PRE-CREATION 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  32cfed7ae 
>   security-admin/db/sqlanywhere/patches/067-create-view-plugin-info.sql 
> PRE-CREATION 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> 831aad66d 
>   security-admin/db/sqlserver/patches/067-create-view-plugin-info.sql 
> PRE-CREATION 
>   security-admin/src/main/java/org/apache/ranger/entity/XXPluginInfo.java 
> a15d8d056 
>   
> security-admin/src/main/java/org/apache/ranger/service/RangerPluginInfoService.java
>  9dc26ceb7 
> 
> 
> Diff: https://reviews.apache.org/r/74884/diff/2/
> 
> 
> Testing
> ---
> 
> I have verified that new columns have been successfully added to the 
> x_plugin_info table(for fresh installment), through which we can now sort by 
> event(Download,Activation).
> I have tested and confirmed that data can be inserted into these new columns 
> in upgrade scenario, through which we can now use them for sorting the data 
> based on events(Download,Activation).
> 
> 
> Thanks,
> 
> Rakesh Gupta
> 
>



[jira] [Created] (RANGER-4737) The inactivityTimeout is getting reset when user updates its profile from UserProfile page

2024-03-05 Thread Mugdha Varadkar (Jira)
Mugdha Varadkar created RANGER-4737:
---

 Summary: The inactivityTimeout is getting reset when user updates 
its profile from UserProfile page
 Key: RANGER-4737
 URL: https://issues.apache.org/jira/browse/RANGER-4737
 Project: Ranger
  Issue Type: Bug
  Components: Ranger
Reporter: Mugdha Varadkar
Assignee: Mugdha Varadkar


In Ranger Admin with React JS, the inactivityTimeout is getting reset to 
default value of 15 mins only when user updates its profile from UserProfile 
page.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (RANGER-4736) Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

2024-03-05 Thread Anand Nadar (Jira)


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

Anand Nadar resolved RANGER-4736.
-
Resolution: Invalid

> Tag Def creation api does not throw duplicate error when Tag Def with 
> existing name is being created
> 
>
> Key: RANGER-4736
> URL: https://issues.apache.org/jira/browse/RANGER-4736
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Reporter: Anand Nadar
>Assignee: Anand Nadar
>Priority: Major
>
> API being used POST - service/tags/tagdefs
> Case:
> 1. There is an existing tagDef with name as SSN with no attributes.
> Payload -
> {code:java}
> {"name":"SSN","attributeDefs":[]} {code}
> 2. Now we are trying to create another tagDef with same name SSN but with 
> attributes - name: expires_one, type: dateTime
> Payload -
> {code:java}
> {"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]} 
> {code}
> *Actual Behaviour:*
> The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
> also not updated with attributes which are added in 2nd step.
> *Expected behaviour:*
> Since this is a POST api, an exception with duplicate object should be thrown 
> indicating that a tagDef with name as SSN already exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4736) Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

2024-03-05 Thread Anand Nadar (Jira)


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

Anand Nadar commented on RANGER-4736:
-

This will be resolved if we pass updateIfExists in the queryParams as false

> Tag Def creation api does not throw duplicate error when Tag Def with 
> existing name is being created
> 
>
> Key: RANGER-4736
> URL: https://issues.apache.org/jira/browse/RANGER-4736
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Reporter: Anand Nadar
>Assignee: Anand Nadar
>Priority: Major
>
> API being used POST - service/tags/tagdefs
> Case:
> 1. There is an existing tagDef with name as SSN with no attributes.
> Payload -
> {code:java}
> {"name":"SSN","attributeDefs":[]} {code}
> 2. Now we are trying to create another tagDef with same name SSN but with 
> attributes - name: expires_one, type: dateTime
> Payload -
> {code:java}
> {"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]} 
> {code}
> *Actual Behaviour:*
> The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
> also not updated with attributes which are added in 2nd step.
> *Expected behaviour:*
> Since this is a POST api, an exception with duplicate object should be thrown 
> indicating that a tagDef with name as SSN already exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (RANGER-4736) Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

2024-03-05 Thread Anand Nadar (Jira)


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

Anand Nadar reassigned RANGER-4736:
---

Assignee: Anand Nadar

> Tag Def creation api does not throw duplicate error when Tag Def with 
> existing name is being created
> 
>
> Key: RANGER-4736
> URL: https://issues.apache.org/jira/browse/RANGER-4736
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Reporter: Anand Nadar
>Assignee: Anand Nadar
>Priority: Major
>
> API being used POST - service/tags/tagdefs
> Case:
> 1. There is an existing tagDef with name as SSN with no attributes.
> Payload -
> {code:java}
> {"name":"SSN","attributeDefs":[]} {code}
> 2. Now we are trying to create another tagDef with same name SSN but with 
> attributes - name: expires_one, type: dateTime
> Payload -
> {code:java}
> {"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]} 
> {code}
> *Actual Behaviour:*
> The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
> also not updated with attributes which are added in 2nd step.
> *Expected behaviour:*
> Since this is a POST api, an exception with duplicate object should be thrown 
> indicating that a tagDef with name as SSN already exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (RANGER-4736) Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

2024-03-05 Thread Anand Nadar (Jira)


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

Anand Nadar updated RANGER-4736:

Description: 
API being used POST - service/tags/tagdefs

Case:
1. There is an existing tagDef with name as SSN with no attributes.
Payload -
{code:java}
{"name":"SSN","attributeDefs":[]} {code}
2. Now we are trying to create another tagDef with same name SSN but with 
attributes - name: expires_one, type: dateTime
Payload -
{code:java}
{"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]} {code}
*Actual Behaviour:*
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.
*Expected behaviour:*
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.

  was:
API being used POST - service/tags/tagdefs

Case:
1. There is an existing tagDef with name as SSN with no attributes.
Payload -

{"name":"SSN","attributeDefs":[]}

2. Now we are trying to create another tagDef with same name SSN but with 
attributes - name: expires_one, type: dateTime
Payload -

{"name":"SSN","attributeDefs":[ \{"name":"expires_on","type":"dateTime"}]}

*Actual Behaviour:*
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.
*Expected behaviour:*
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.


> Tag Def creation api does not throw duplicate error when Tag Def with 
> existing name is being created
> 
>
> Key: RANGER-4736
> URL: https://issues.apache.org/jira/browse/RANGER-4736
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Reporter: Anand Nadar
>Priority: Major
>
> API being used POST - service/tags/tagdefs
> Case:
> 1. There is an existing tagDef with name as SSN with no attributes.
> Payload -
> {code:java}
> {"name":"SSN","attributeDefs":[]} {code}
> 2. Now we are trying to create another tagDef with same name SSN but with 
> attributes - name: expires_one, type: dateTime
> Payload -
> {code:java}
> {"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]} 
> {code}
> *Actual Behaviour:*
> The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
> also not updated with attributes which are added in 2nd step.
> *Expected behaviour:*
> Since this is a POST api, an exception with duplicate object should be thrown 
> indicating that a tagDef with name as SSN already exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (RANGER-4736) Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

2024-03-05 Thread Anand Nadar (Jira)


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

Anand Nadar updated RANGER-4736:

Description: 
API being used POST - service/tags/tagdefs

Case:
1. There is an existing tagDef with name as SSN with no attributes.
Payload - 
{"name":"SSN","attributeDefs":[]}
2. Now we are trying to create another tagDef with same name SSN but with 
attributes - name: expires_one, type: dateTime
Payload - 
{"name":"SSN","attributeDefs":[ \{"name":"expires_on","type":"dateTime"} ]}

*Actual Behaviour:*
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.
*Expected behaviour:*
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.

  was:
API being used POST - service/tags/tagdefs

Case:
1. There is an existing tagDef with name as SSN with no attributes.
Payload - \{"name":"SSN","attributeDefs":[]}
2. Now we are trying to create another tagDef with same name SSN but with 
attributes - name: expires_one, type: dateTime
Payload - 
\{"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]}


*Actual Behaviour:*
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.
*Expected behaviour:*
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.


> Tag Def creation api does not throw duplicate error when Tag Def with 
> existing name is being created
> 
>
> Key: RANGER-4736
> URL: https://issues.apache.org/jira/browse/RANGER-4736
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Reporter: Anand Nadar
>Priority: Major
>
> API being used POST - service/tags/tagdefs
> Case:
> 1. There is an existing tagDef with name as SSN with no attributes.
> Payload - 
> {"name":"SSN","attributeDefs":[]}
> 2. Now we are trying to create another tagDef with same name SSN but with 
> attributes - name: expires_one, type: dateTime
> Payload - 
> {"name":"SSN","attributeDefs":[ \{"name":"expires_on","type":"dateTime"} ]}
> *Actual Behaviour:*
> The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
> also not updated with attributes which are added in 2nd step.
> *Expected behaviour:*
> Since this is a POST api, an exception with duplicate object should be thrown 
> indicating that a tagDef with name as SSN already exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (RANGER-4736) Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

2024-03-05 Thread Anand Nadar (Jira)


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

Anand Nadar updated RANGER-4736:

Description: 
API being used POST - service/tags/tagdefs

Case:
1. There is an existing tagDef with name as SSN with no attributes.
Payload -

{"name":"SSN","attributeDefs":[]}

2. Now we are trying to create another tagDef with same name SSN but with 
attributes - name: expires_one, type: dateTime
Payload -

{"name":"SSN","attributeDefs":[ \{"name":"expires_on","type":"dateTime"}]}

*Actual Behaviour:*
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.
*Expected behaviour:*
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.

  was:
API being used POST - service/tags/tagdefs

Case:
1. There is an existing tagDef with name as SSN with no attributes.
Payload - 
{"name":"SSN","attributeDefs":[]}
2. Now we are trying to create another tagDef with same name SSN but with 
attributes - name: expires_one, type: dateTime
Payload - 
{"name":"SSN","attributeDefs":[ \{"name":"expires_on","type":"dateTime"} ]}

*Actual Behaviour:*
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.
*Expected behaviour:*
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.


> Tag Def creation api does not throw duplicate error when Tag Def with 
> existing name is being created
> 
>
> Key: RANGER-4736
> URL: https://issues.apache.org/jira/browse/RANGER-4736
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Reporter: Anand Nadar
>Priority: Major
>
> API being used POST - service/tags/tagdefs
> Case:
> 1. There is an existing tagDef with name as SSN with no attributes.
> Payload -
> {"name":"SSN","attributeDefs":[]}
> 2. Now we are trying to create another tagDef with same name SSN but with 
> attributes - name: expires_one, type: dateTime
> Payload -
> {"name":"SSN","attributeDefs":[ \{"name":"expires_on","type":"dateTime"}]}
> *Actual Behaviour:*
> The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
> also not updated with attributes which are added in 2nd step.
> *Expected behaviour:*
> Since this is a POST api, an exception with duplicate object should be thrown 
> indicating that a tagDef with name as SSN already exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (RANGER-4736) Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

2024-03-05 Thread Anand Nadar (Jira)


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

Anand Nadar updated RANGER-4736:

Description: 
API being used POST - service/tags/tagdefs

Case:
1. There is an existing tagDef with name as SSN with no attributes.
Payload - \{"name":"SSN","attributeDefs":[]}
2. Now we are trying to create another tagDef with same name SSN but with 
attributes - name: expires_one, type: dateTime
Payload - 
\{"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]}


*Actual Behaviour:*
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.
*Expected behaviour:*
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.

  was:
API being used POST - service/tags/tagdefs
Case:
1. There is an existing tagDef with name as SSN with no attributes.
Payload - 
{panel}
{"name":"SSN","attributeDefs":[]}
{panel}
 
 
2. Now we are trying to create another tagDef with same name SSN but with 
attributes
- name: expires_on and type: dateTime
{panel}
{"name":"SSN","attributeDefs":[\{"name":"expires_on","type":"dateTime"}]}
{panel}
 

*Actual behaviour:*
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.
*Expected behaviour:*
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.


> Tag Def creation api does not throw duplicate error when Tag Def with 
> existing name is being created
> 
>
> Key: RANGER-4736
> URL: https://issues.apache.org/jira/browse/RANGER-4736
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Reporter: Anand Nadar
>Priority: Major
>
> API being used POST - service/tags/tagdefs
> Case:
> 1. There is an existing tagDef with name as SSN with no attributes.
> Payload - \{"name":"SSN","attributeDefs":[]}
> 2. Now we are trying to create another tagDef with same name SSN but with 
> attributes - name: expires_one, type: dateTime
> Payload - 
> \{"name":"SSN","attributeDefs":[{"name":"expires_on","type":"dateTime"}]}
> *Actual Behaviour:*
> The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
> also not updated with attributes which are added in 2nd step.
> *Expected behaviour:*
> Since this is a POST api, an exception with duplicate object should be thrown 
> indicating that a tagDef with name as SSN already exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (RANGER-4736) Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

2024-03-05 Thread Anand Nadar (Jira)


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

Anand Nadar updated RANGER-4736:

Description: 
API being used POST - service/tags/tagdefs
Case:
1. There is an existing tagDef with name as SSN with no attributes.
Payload - 
{panel}
{"name":"SSN","attributeDefs":[]}
{panel}
 
 
2. Now we are trying to create another tagDef with same name SSN but with 
attributes
- name: expires_on and type: dateTime
{panel}
{"name":"SSN","attributeDefs":[\{"name":"expires_on","type":"dateTime"}]}
{panel}
 

*Actual behaviour:*
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.
*Expected behaviour:*
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.

  was:
API being used POST - service/tags/tagdefs
Case:
1. There is an existing tagDef with name as SSN with no attributes.
2. Now we are trying to create another tagDef with same name but with attributes
SSN with attributes - name: expires_on and type: dateTime

Actual behaviour:
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.

Expected behaviour:
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.


> Tag Def creation api does not throw duplicate error when Tag Def with 
> existing name is being created
> 
>
> Key: RANGER-4736
> URL: https://issues.apache.org/jira/browse/RANGER-4736
> Project: Ranger
>  Issue Type: Bug
>  Components: admin
>Reporter: Anand Nadar
>Priority: Major
>
> API being used POST - service/tags/tagdefs
> Case:
> 1. There is an existing tagDef with name as SSN with no attributes.
> Payload - 
> {panel}
> {"name":"SSN","attributeDefs":[]}
> {panel}
>  
>  
> 2. Now we are trying to create another tagDef with same name SSN but with 
> attributes
> - name: expires_on and type: dateTime
> {panel}
> {"name":"SSN","attributeDefs":[\{"name":"expires_on","type":"dateTime"}]}
> {panel}
>  
> *Actual behaviour:*
> The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
> also not updated with attributes which are added in 2nd step.
> *Expected behaviour:*
> Since this is a POST api, an exception with duplicate object should be thrown 
> indicating that a tagDef with name as SSN already exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (RANGER-4736) Tag Def creation api does not throw duplicate error when Tag Def with existing name is being created

2024-03-05 Thread Anand Nadar (Jira)
Anand Nadar created RANGER-4736:
---

 Summary: Tag Def creation api does not throw duplicate error when 
Tag Def with existing name is being created
 Key: RANGER-4736
 URL: https://issues.apache.org/jira/browse/RANGER-4736
 Project: Ranger
  Issue Type: Bug
  Components: admin
Reporter: Anand Nadar


API being used POST - service/tags/tagdefs
Case:
1. There is an existing tagDef with name as SSN with no attributes.
2. Now we are trying to create another tagDef with same name but with attributes
SSN with attributes - name: expires_on and type: dateTime

Actual behaviour:
The api returns 200, but the 2nd tagDef is not created and existing tagDef is 
also not updated with attributes which are added in 2nd step.

Expected behaviour:
Since this is a POST api, an exception with duplicate object should be thrown 
indicating that a tagDef with name as SSN already exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: Review Request 74927: RANGER-4727: When tagDef delete fails, error message is not returned

2024-03-05 Thread Asit Vadhavkar

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


Ship it!




Ship It!

- Asit Vadhavkar


On March 5, 2024, 7:32 a.m., Subhrat Chaudhary wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74927/
> ---
> 
> (Updated March 5, 2024, 7:32 a.m.)
> 
> 
> Review request for ranger, Anand Nadar, Asit Vadhavkar, Madhan Neethiraj, 
> Monika Kachhadiya, and Siddhesh Phatak.
> 
> 
> Bugs: RANGER-4727
> https://issues.apache.org/jira/browse/RANGER-4727
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> When tagDef and a linked tag is created, and delete of the tagDef is 
> attempted with DELETE API - /service/tags/tagdef/{tagDefId}, it fails with 
> 400 and no error message is returned.
> This is fixed by adding a check and throw excpetion with proper message - if 
> the linked tag exists.
> 
> 
> Diffs
> -
> 
>   security-admin/src/main/java/org/apache/ranger/biz/TagDBStore.java 
> fb912d4f8 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java 
> ed3ed5eca 
> 
> 
> Diff: https://reviews.apache.org/r/74927/diff/1/
> 
> 
> Testing
> ---
> 
> Validated the the API with curl for the tagDef - PII_LOCATION (linked tag is 
> exists), the error response contains message:
> {"statusCode":0,"msgDesc":"Cannot delete tag: PII_LOCATION, please delete 
> linked resources first"}
> 
> Validated existing JUnits are passing
> 
> 
> Thanks,
> 
> Subhrat Chaudhary
> 
>