[jira] [Commented] (RANGER-3661) Ranger - Upgrade netty to 4.1.72-final

2022-04-05 Thread Mateen N Mansoori (Jira)


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

Mateen N Mansoori commented on RANGER-3661:
---

master : 
[https://github.com/apache/ranger/commit/82b8e01888dfde3ad2ea4c718ff58a9d60120d39]

> Ranger - Upgrade netty to 4.1.72-final
> --
>
> Key: RANGER-3661
> URL: https://issues.apache.org/jira/browse/RANGER-3661
> Project: Ranger
>  Issue Type: Task
>  Components: Ranger
>Reporter: Mateen N Mansoori
>Priority: Major
> Fix For: 3.0.0, 2.3.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (RANGER-3696) java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

2022-04-05 Thread kirby zhou (Jira)


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

kirby zhou commented on RANGER-3696:


Another problem, elasticsearch 7.6.0 removed log4j-1.2-api.jar from its lib 
directory, so the impl of plugin is also broken because it brings 
slf4j-log4j12.jar instead of *log4j-slf4j-impl.jar.*

[~mad...@apache.org] 

[~bhavikpatel] 

 

Can we bump the log4j depends to log4j2 now? 

 

> java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
> ---
>
> Key: RANGER-3696
> URL: https://issues.apache.org/jira/browse/RANGER-3696
> Project: Ranger
>  Issue Type: Bug
>  Components: plugins
>Affects Versions: 2.2.0
> Environment: Apache Ranger ElasticSearch Plugin: 
> ranger-2.2.0-elasticsearch-plugin.tar.gz
> elasticsearch version: 7.6.0 
> OS: Ubuntu 20.04.4
>Reporter: MohdSiddique Bagwan
>Priority: Blocker
>
> Please find the versions I am using 
> *Apache Ranger ElasticSearch Plugin:* ranger-2.2.0-elasticsearch-plugin.tar.gz
> *elasticsearch version:* 7.6.0 
> *OS:* Ubuntu 20.04.4
> I installed the apache ranger elasticsearch plugin on elastic search host, 
> while starting elasticsearch service I am getting below error:
> Note: Without ranger plugin the elasticsearch plugin is working perfect. It 
> would be very helpful if you redirect me to documentation on how to install 
> ranger-2.2.0-elasticsearch-plugin.tar.gz on 7.6.0 & above. 
> {code:java}
> service elasticsearch start
>  * Starting Elasticsearch Server                                              
>                                                                               
>                                                sysctl: setting key 
> "vm.max_map_count", ignoring: Read-only file system
> OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in 
> version 9.0 and will likely be removed in a future release.
>                                                                               
>                                                                               
>                                         [ OK ]
> root@3b8fcbe634f3:~# fatal error in thread [main], exiting
> java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
>         at 
> org.apache.ranger.authorization.elasticsearch.plugin.RangerElasticsearchPlugin.(RangerElasticsearchPlugin.java:52)
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>  Method)
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at 
> java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at 
> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
>         at 
> java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
>         at 
> org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:607)
>         at 
> org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:556)
>         at 
> org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:471)
>         at 
> org.elasticsearch.plugins.PluginsService.(PluginsService.java:163)
>         at org.elasticsearch.node.Node.(Node.java:313)
>         at org.elasticsearch.node.Node.(Node.java:257)
>         at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:221)
>         at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221)
>         at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
>         at 
> org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
>         at 
> org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
>         at org.elasticsearch.cli.Command.main(Command.java:90)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>         at 
> java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
>         at 
> java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:864)
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
>         ... 22 more {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Comment Edited] (RANGER-3696) java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

2022-04-05 Thread kirby zhou (Jira)


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

kirby zhou edited comment on RANGER-3696 at 4/6/22 3:45 AM:


Elasticsearch directly use log4j to log:

 
{code:java}
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

public class PluginsService {
private static final Logger logger = 
LogManager.getLogger(PluginsService.class);
}
 {code}
But RangerElasticsearchPlugin in shim jar takes slf4j:
{code:java}
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class RangerElasticsearchPlugin extends Plugin implements ActionPlugin {

   private static final Logger LOG = 
LoggerFactory.getLogger(RangerElasticsearchPlugin.class);
}
 {code}
This is not reasonable. Shim of Plug-ins should try to follow the coding habits 
of the host. 

 

 


was (Author: kirbyzhou):
Elasticsearch directly use log4j to log:

 
{code:java}
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

public class PluginsService {
private static final Logger logger = 
LogManager.getLogger(PluginsService.class);
}
 {code}
But RangerElasticsearchPlugin in shim jar takes slf4j:
{code:java}
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class RangerElasticsearchPlugin extends Plugin implements ActionPlugin {

   private static final Logger LOG = 
LoggerFactory.getLogger(RangerElasticsearchPlugin.class);
}
 {code}
This is not reasonable. Plug-ins should try to follow the coding habits of the 
host. 

 

 

> java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
> ---
>
> Key: RANGER-3696
> URL: https://issues.apache.org/jira/browse/RANGER-3696
> Project: Ranger
>  Issue Type: Bug
>  Components: plugins
>Affects Versions: 2.2.0
> Environment: Apache Ranger ElasticSearch Plugin: 
> ranger-2.2.0-elasticsearch-plugin.tar.gz
> elasticsearch version: 7.6.0 
> OS: Ubuntu 20.04.4
>Reporter: MohdSiddique Bagwan
>Priority: Blocker
>
> Please find the versions I am using 
> *Apache Ranger ElasticSearch Plugin:* ranger-2.2.0-elasticsearch-plugin.tar.gz
> *elasticsearch version:* 7.6.0 
> *OS:* Ubuntu 20.04.4
> I installed the apache ranger elasticsearch plugin on elastic search host, 
> while starting elasticsearch service I am getting below error:
> Note: Without ranger plugin the elasticsearch plugin is working perfect. It 
> would be very helpful if you redirect me to documentation on how to install 
> ranger-2.2.0-elasticsearch-plugin.tar.gz on 7.6.0 & above. 
> {code:java}
> service elasticsearch start
>  * Starting Elasticsearch Server                                              
>                                                                               
>                                                sysctl: setting key 
> "vm.max_map_count", ignoring: Read-only file system
> OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in 
> version 9.0 and will likely be removed in a future release.
>                                                                               
>                                                                               
>                                         [ OK ]
> root@3b8fcbe634f3:~# fatal error in thread [main], exiting
> java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
>         at 
> org.apache.ranger.authorization.elasticsearch.plugin.RangerElasticsearchPlugin.(RangerElasticsearchPlugin.java:52)
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>  Method)
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at 
> java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at 
> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
>         at 
> java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
>         at 
> org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:607)
>         at 
> org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:556)
>         at 
> org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:471)
>         at 
> org.elasticsearch.plugins.PluginsService.(PluginsService.java:163)
>         at org.elasticsearch.node.Node.(Node.java:313)
>         at org.elasticsearch.node.Node.(Node.java:257)
>         at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:221)
>         at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221)
>         at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349)
>         at 
> 

Re: Review Request 73835: RANGER-3611 Uncatched NullPointerException when missing lastKnownVersion in ServiceREST::getServicePoliciesIfUpdated

2022-04-05 Thread Kirby Zhou


> On 三月 30, 2022, 7:44 a.m., Kishor Gollapalliwar wrote:
> > Ship It!

Anybody can commit it?


- Kirby


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


On 三月 3, 2022, 3:48 a.m., Kirby Zhou wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73835/
> ---
> 
> (Updated 三月 3, 2022, 3:48 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Dhaval Shah, Dineshkumar Yadav, 
> Gautam Borad, Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Mateen 
> Mansoori, Mehul Parikh, Pradeep Agrawal, VaradreawiZTV VaradreawiZTV, Vishal 
> Suvagia, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3611
> https://issues.apache.org/jira/browse/RANGER-3611
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> A simple Rest API call by CURL will cause uncatched NullPointerException in 
> logs.
> It happens at some spring generated code. Set a value to lastKnownVersion 
> will fix it
>  
> Actual:
> 
> ```
> ]% curl -v  http://localhost:6080/service/plugins/policies/download/hdfsdev
> ... 
> < HTTP/1.1 404 Not Found
> ...
>  No Message here 
> * Closing connection 0 
> ```
> 
> And logs in catalina.out
> 
> ```
> EVERE: Servlet.service() for servlet [REST Service] in context with path [] 
> threw exception
> java.lang.NullPointerException
>   at 
> org.apache.ranger.rest.ServiceREST.getServicePoliciesIfUpdated(ServiceREST.java:3054)
>   at 
> org.apache.ranger.rest.ServiceREST$$FastClassBySpringCGLIB$$92dab672.invoke()
>   at 
> org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
>   at 
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779)
>   at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
>   at 
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
>   at 
> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
>   at 
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
>   at 
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
>   at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
>   at 
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
>   at 
> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692)
>   at 
> org.apache.ranger.rest.ServiceREST$$EnhancerBySpringCGLIB$$43bccb60.getServicePoliciesIfUpdated()
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
>   at 
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
>   at 
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>   at 
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
>   at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>   at 
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
>   at 
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
>   at 
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
>   at 
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
>   at 
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
>   at 
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
>   at 
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
>   at 
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
>   at 
> 

[jira] [Commented] (RANGER-3696) java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

2022-04-05 Thread kirby zhou (Jira)


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

kirby zhou commented on RANGER-3696:


As a workaround, you can copy slf4j-api-*.jar, log4j-slf4j-impl-*.jar to 
elasticsearch's lib dir.

 

> java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
> ---
>
> Key: RANGER-3696
> URL: https://issues.apache.org/jira/browse/RANGER-3696
> Project: Ranger
>  Issue Type: Bug
>  Components: plugins
>Affects Versions: 2.2.0
> Environment: Apache Ranger ElasticSearch Plugin: 
> ranger-2.2.0-elasticsearch-plugin.tar.gz
> elasticsearch version: 7.6.0 
> OS: Ubuntu 20.04.4
>Reporter: MohdSiddique Bagwan
>Priority: Blocker
>
> Please find the versions I am using 
> *Apache Ranger ElasticSearch Plugin:* ranger-2.2.0-elasticsearch-plugin.tar.gz
> *elasticsearch version:* 7.6.0 
> *OS:* Ubuntu 20.04.4
> I installed the apache ranger elasticsearch plugin on elastic search host, 
> while starting elasticsearch service I am getting below error:
> Note: Without ranger plugin the elasticsearch plugin is working perfect. It 
> would be very helpful if you redirect me to documentation on how to install 
> ranger-2.2.0-elasticsearch-plugin.tar.gz on 7.6.0 & above. 
> {code:java}
> service elasticsearch start
>  * Starting Elasticsearch Server                                              
>                                                                               
>                                                sysctl: setting key 
> "vm.max_map_count", ignoring: Read-only file system
> OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in 
> version 9.0 and will likely be removed in a future release.
>                                                                               
>                                                                               
>                                         [ OK ]
> root@3b8fcbe634f3:~# fatal error in thread [main], exiting
> java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
>         at 
> org.apache.ranger.authorization.elasticsearch.plugin.RangerElasticsearchPlugin.(RangerElasticsearchPlugin.java:52)
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>  Method)
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at 
> java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at 
> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
>         at 
> java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
>         at 
> org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:607)
>         at 
> org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:556)
>         at 
> org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:471)
>         at 
> org.elasticsearch.plugins.PluginsService.(PluginsService.java:163)
>         at org.elasticsearch.node.Node.(Node.java:313)
>         at org.elasticsearch.node.Node.(Node.java:257)
>         at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:221)
>         at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221)
>         at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
>         at 
> org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
>         at 
> org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
>         at org.elasticsearch.cli.Command.main(Command.java:90)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>         at 
> java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
>         at 
> java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:864)
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
>         ... 22 more {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (RANGER-3696) java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

2022-04-05 Thread kirby zhou (Jira)


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

kirby zhou commented on RANGER-3696:


Elasticsearch directly use log4j to log:

 
{code:java}
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

public class PluginsService {
private static final Logger logger = 
LogManager.getLogger(PluginsService.class);
}
 {code}
But RangerElasticsearchPlugin in shim jar takes slf4j:
{code:java}
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class RangerElasticsearchPlugin extends Plugin implements ActionPlugin {

   private static final Logger LOG = 
LoggerFactory.getLogger(RangerElasticsearchPlugin.class);
}
 {code}
This is not reasonable. Plug-ins should try to follow the coding habits of the 
host. 

 

 

> java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
> ---
>
> Key: RANGER-3696
> URL: https://issues.apache.org/jira/browse/RANGER-3696
> Project: Ranger
>  Issue Type: Bug
>  Components: plugins
>Affects Versions: 2.2.0
> Environment: Apache Ranger ElasticSearch Plugin: 
> ranger-2.2.0-elasticsearch-plugin.tar.gz
> elasticsearch version: 7.6.0 
> OS: Ubuntu 20.04.4
>Reporter: MohdSiddique Bagwan
>Priority: Blocker
>
> Please find the versions I am using 
> *Apache Ranger ElasticSearch Plugin:* ranger-2.2.0-elasticsearch-plugin.tar.gz
> *elasticsearch version:* 7.6.0 
> *OS:* Ubuntu 20.04.4
> I installed the apache ranger elasticsearch plugin on elastic search host, 
> while starting elasticsearch service I am getting below error:
> Note: Without ranger plugin the elasticsearch plugin is working perfect. It 
> would be very helpful if you redirect me to documentation on how to install 
> ranger-2.2.0-elasticsearch-plugin.tar.gz on 7.6.0 & above. 
> {code:java}
> service elasticsearch start
>  * Starting Elasticsearch Server                                              
>                                                                               
>                                                sysctl: setting key 
> "vm.max_map_count", ignoring: Read-only file system
> OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in 
> version 9.0 and will likely be removed in a future release.
>                                                                               
>                                                                               
>                                         [ OK ]
> root@3b8fcbe634f3:~# fatal error in thread [main], exiting
> java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
>         at 
> org.apache.ranger.authorization.elasticsearch.plugin.RangerElasticsearchPlugin.(RangerElasticsearchPlugin.java:52)
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>  Method)
>         at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at 
> java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at 
> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
>         at 
> java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
>         at 
> org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:607)
>         at 
> org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:556)
>         at 
> org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:471)
>         at 
> org.elasticsearch.plugins.PluginsService.(PluginsService.java:163)
>         at org.elasticsearch.node.Node.(Node.java:313)
>         at org.elasticsearch.node.Node.(Node.java:257)
>         at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:221)
>         at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221)
>         at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
>         at 
> org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
>         at 
> org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
>         at org.elasticsearch.cli.Command.main(Command.java:90)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
>         at 
> org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>         at 
> java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
>         at 

[jira] [Created] (RANGER-3697) Migrate all python scripts in Ranger to Python3

2022-04-05 Thread Abhishek Kumar (Jira)
Abhishek Kumar created RANGER-3697:
--

 Summary: Migrate all python scripts in Ranger to Python3
 Key: RANGER-3697
 URL: https://issues.apache.org/jira/browse/RANGER-3697
 Project: Ranger
  Issue Type: Improvement
  Components: admin, Ranger
Reporter: Abhishek Kumar
Assignee: Abhishek Kumar


Python 2 has sunset as of Jan 1, 2020. All scripts using python2 should 
eventually move to python3.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


Re: Review Request 73896: RANGER-3657: Support for recursive ACL check for subpaths in Ozone plugin

2022-04-05 Thread Madhan Neethiraj

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




agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java
Lines 586 (patched)


consider resouce-match-scope as a parameter to this method, instead of 
hardcoding here. This will make PolicyEngine.getMatchingPolicies() more widely 
applicable



agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java
Lines 588 (patched)


Consider sending resource-match-scope as parameter to 
getMatchedZonesForResourceAndChildren(), and rename the method:
  Set zoneNames = getMatchedZonesForResource(resource, scope)



plugin-ozone/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
Lines 269 (patched)


If the requirement is to check if user has permission for all paths under a 
given directory, wouldn't it be enough to check for 'path + "/*"'? This will 
match only for policies that match for entire hierarchy below the given path 
(or its ancestors).


- Madhan Neethiraj


On March 10, 2022, 2:06 a.m., Sailaja Polavarapu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73896/
> ---
> 
> (Updated March 10, 2022, 2:06 a.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, 
> Ramesh Mani, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3657
> https://issues.apache.org/jira/browse/RANGER-3657
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Added code to support recursive delete operations for Ranger Ozone plugin 
> including upgrade patch for service def changes. Also added plugin side 
> change to retrieve owner information from the request context as an extention 
> to https://reviews.apache.org/r/73051/
> Updated Ozone version.
> 
> 
> Diffs
> -
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java
>  f44570623 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java
>  41ad8936d 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java
>  12fecd030 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-ozone.json 
> 4b899736b 
>   plugin-ozone/pom.xml 264197acf 
>   
> plugin-ozone/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
>  12e647ca3 
>   
> plugin-ozone/src/main/java/org/apache/ranger/services/ozone/RangerServiceOzone.java
>  704412246 
>   pom.xml 49a06411d 
>   ranger-ozone-plugin-shim/pom.xml ab3dc4e3f 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> b603f96cd 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> c111a28f6 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> 854a2c676 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  b45eace3b 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> adec99857 
>   
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminImpl.java 
> df75db11a 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForOzoneServiceDefUpdate_J10056.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73896/diff/1/
> 
> 
> Testing
> ---
> 
> Patched cluster and verified functionality with recursive delete operations 
> and few regression tests.
> Also verified manually upgrade patch changes.
> 
> 
> Thanks,
> 
> Sailaja Polavarapu
> 
>



Re: Review Request 73896: RANGER-3657: Support for recursive ACL check for subpaths in Ozone plugin

2022-04-05 Thread Abhay Kulkarni

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


Ship it!




Ship It!

- Abhay Kulkarni


On March 10, 2022, 2:06 a.m., Sailaja Polavarapu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73896/
> ---
> 
> (Updated March 10, 2022, 2:06 a.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, 
> Ramesh Mani, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3657
> https://issues.apache.org/jira/browse/RANGER-3657
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Added code to support recursive delete operations for Ranger Ozone plugin 
> including upgrade patch for service def changes. Also added plugin side 
> change to retrieve owner information from the request context as an extention 
> to https://reviews.apache.org/r/73051/
> Updated Ozone version.
> 
> 
> Diffs
> -
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java
>  f44570623 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java
>  41ad8936d 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java
>  12fecd030 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-ozone.json 
> 4b899736b 
>   plugin-ozone/pom.xml 264197acf 
>   
> plugin-ozone/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java
>  12e647ca3 
>   
> plugin-ozone/src/main/java/org/apache/ranger/services/ozone/RangerServiceOzone.java
>  704412246 
>   pom.xml 49a06411d 
>   ranger-ozone-plugin-shim/pom.xml ab3dc4e3f 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> b603f96cd 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> c111a28f6 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> 854a2c676 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  b45eace3b 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> adec99857 
>   
> security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminImpl.java 
> df75db11a 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForOzoneServiceDefUpdate_J10056.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73896/diff/1/
> 
> 
> Testing
> ---
> 
> Patched cluster and verified functionality with recursive delete operations 
> and few regression tests.
> Also verified manually upgrade patch changes.
> 
> 
> Thanks,
> 
> Sailaja Polavarapu
> 
>



Re: Review Request 73927: RANGER-3692: Ranger cannot connect to the DB when the DB is outaged for a long time

2022-04-05 Thread Pradeep Agrawal

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




pom.xml
Line 90 (original), 90 (patched)


it seems 0.9.5.5 is the latest available version, any specific reason for 
not upgrading to 0.9.5.5 ?


- Pradeep Agrawal


On April 2, 2022, 3:58 p.m., Zilong Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73927/
> ---
> 
> (Updated April 2, 2022, 3:58 p.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, and Velmurugan 
> Periasamy.
> 
> 
> Bugs: RANGER-3692
> https://issues.apache.org/jira/browse/RANGER-3692
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> We had a database problem where the database was offline for more than a 
> week. However ranger connot connect to the DB. I found out that this is a bug 
> in c3p0 0.9.5.3. This bug was resolved in 0.9.5.4. So I suggest to upgrade 
> the version of c3p0 to 0.9.5.4.
> 
> 
> Diffs
> -
> 
>   pom.xml 20c101ff6 
> 
> 
> Diff: https://reviews.apache.org/r/73927/diff/1/
> 
> 
> Testing
> ---
> 
> Build successful - mvn clean compile test verify install
> 
> 
> Thanks,
> 
> Zilong Zhu
> 
>



Re: Review Request 72024: RANGER-2704 : Support browser login using kerberized authentication.

2022-04-05 Thread Vishal Suvagia via Review Board


> On April 4, 2022, 1:31 p.m., bhavik patel wrote:
> > security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerSSOAuthenticationFilter.java
> > Lines 607 (patched)
> > 
> >
> > same method is there in RangerKrbFilter class

This is required to check for a kerberos authenticated user to redirect the 
user to login page once the user performs logout.


- Vishal


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


On April 5, 2022, 12:24 p.m., Vishal Suvagia wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72024/
> ---
> 
> (Updated April 5, 2022, 12:24 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Dhaval Shah, Dineshkumar Yadav, 
> Gautam Borad, Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Madhan 
> Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, 
> and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2704
> https://issues.apache.org/jira/browse/RANGER-2704
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Need to support browser login using kerberos authentication. Added a logout 
> for an unauthenticated user to redirect to the login page.
> 
> 
> Diffs
> -
> 
>   
> security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerKrbFilter.java
>  223a991c76bae7d25f5ce89604d0a8a90d426fe5 
>   
> security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerSSOAuthenticationFilter.java
>  abbf2d983beb30b59e5d3f6429d6fc226f735793 
>   security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 
> 0a1128613dca50fe67ea3f891261f1ee449c46db 
> 
> 
> Diff: https://reviews.apache.org/r/72024/diff/2/
> 
> 
> Testing
> ---
> 
> Veriried kerberos ticket authentication is working on a kerberized browser.
> 
> 
> Steps to test for a kerberized browser:
> #1) For Kerberized browsers:
> #1> To open Chrome in kerberos enabled mode need to run below command:
>google-chrome --auth-server-whitelist="*ranger.testserver.com"
> #2> For Firefox, need to go to about:configs and then search for 
> negotiate and then add the host domain
> ranger.testserver.com to the property 
> "network.negotiate-auth.trusted-uris"
> #2) Perform kinit with the required user.
> #3) Open the Ranger Admin portal using FQDN of the server host.
> 
> 
> Known Issue: If there is no valid kerberos ticket, user lands on a blank page 
> and a short hack is to either append locallogin to the URL or refresh the 
> browser tab to redirect to the login page.
> P.S: this issue is not observed on Google Chrome browser
> 
> 
> File Attachments
> 
> 
> RANGER-2704.patch
>   
> https://reviews.apache.org/media/uploaded/files/2020/01/17/8c9682ca-1ade-4281-89e7-d43a8af09300__RANGER-2704.patch
> RANGER-2704.02.patch
>   
> https://reviews.apache.org/media/uploaded/files/2022/04/04/6e737bec-e640-4459-922c-353793172b12__RANGER-2704.02.patch
> RANGER-2704.03.patch
>   
> https://reviews.apache.org/media/uploaded/files/2022/04/05/31e52557-051e-40ba-bc34-5dc6418e06f8__RANGER-2704.03.patch
> 
> 
> Thanks,
> 
> Vishal Suvagia
> 
>



Re: Review Request 72024: RANGER-2704 : Support browser login using kerberized authentication.

2022-04-05 Thread Vishal Suvagia via Review Board

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

(Updated April 5, 2022, 12:24 p.m.)


Review request for ranger, Ankita Sinha, Dhaval Shah, Dineshkumar Yadav, Gautam 
Borad, Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Madhan Neethiraj, 
Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan 
Periasamy.


Changes
---

updated changes to address review comments.


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


Repository: ranger


Description
---

Need to support browser login using kerberos authentication. Added a logout for 
an unauthenticated user to redirect to the login page.


Diffs
-

  
security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerKrbFilter.java
 223a991c76bae7d25f5ce89604d0a8a90d426fe5 
  
security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerSSOAuthenticationFilter.java
 abbf2d983beb30b59e5d3f6429d6fc226f735793 
  security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 
0a1128613dca50fe67ea3f891261f1ee449c46db 


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


Testing
---

Veriried kerberos ticket authentication is working on a kerberized browser.


Steps to test for a kerberized browser:
#1) For Kerberized browsers:
#1> To open Chrome in kerberos enabled mode need to run below command:
   google-chrome --auth-server-whitelist="*ranger.testserver.com"
#2> For Firefox, need to go to about:configs and then search for negotiate 
and then add the host domain
ranger.testserver.com to the property 
"network.negotiate-auth.trusted-uris"
#2) Perform kinit with the required user.
#3) Open the Ranger Admin portal using FQDN of the server host.


Known Issue: If there is no valid kerberos ticket, user lands on a blank page 
and a short hack is to either append locallogin to the URL or refresh the 
browser tab to redirect to the login page.
P.S: this issue is not observed on Google Chrome browser


File Attachments (updated)


RANGER-2704.patch
  
https://reviews.apache.org/media/uploaded/files/2020/01/17/8c9682ca-1ade-4281-89e7-d43a8af09300__RANGER-2704.patch
RANGER-2704.02.patch
  
https://reviews.apache.org/media/uploaded/files/2022/04/04/6e737bec-e640-4459-922c-353793172b12__RANGER-2704.02.patch
RANGER-2704.03.patch
  
https://reviews.apache.org/media/uploaded/files/2022/04/05/31e52557-051e-40ba-bc34-5dc6418e06f8__RANGER-2704.03.patch


Thanks,

Vishal Suvagia



[jira] [Updated] (RANGER-2704) Support browser login using kerberized authentication

2022-04-05 Thread Vishal Suvagia (Jira)


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

Vishal Suvagia updated RANGER-2704:
---
Attachment: RANGER-2704.03.patch

> Support browser login using kerberized authentication
> -
>
> Key: RANGER-2704
> URL: https://issues.apache.org/jira/browse/RANGER-2704
> Project: Ranger
>  Issue Type: Bug
>  Components: Ranger
>Reporter: Vishal Suvagia
>Assignee: Vishal Suvagia
>Priority: Minor
> Attachments: RANGER-2704.01.patch, RANGER-2704.02.patch, 
> RANGER-2704.03.patch, RANGER-2704.patch
>
>
> Need to support browser login using kerberos authentication.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (RANGER-3696) java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

2022-04-05 Thread MohdSiddique Bagwan (Jira)


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

MohdSiddique Bagwan updated RANGER-3696:

Description: 
Please find the versions I am using 

*Apache Ranger ElasticSearch Plugin:* ranger-2.2.0-elasticsearch-plugin.tar.gz

*elasticsearch version:* 7.6.0 

*OS:* Ubuntu 20.04.4

I installed the apache ranger elasticsearch plugin on elastic search host, 
while starting elasticsearch service I am getting below error:

Note: Without ranger plugin the elasticsearch plugin is working perfect. It 
would be very helpful if you redirect me to documentation on how to install 
ranger-2.2.0-elasticsearch-plugin.tar.gz on 7.6.0 & above. 
{code:java}
service elasticsearch start
 * Starting Elasticsearch Server                                                
                                                                                
                                           sysctl: setting key 
"vm.max_map_count", ignoring: Read-only file system
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in 
version 9.0 and will likely be removed in a future release.
                                                                                
                                                                                
                                    [ OK ]
root@3b8fcbe634f3:~# fatal error in thread [main], exiting
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
        at 
org.apache.ranger.authorization.elasticsearch.plugin.RangerElasticsearchPlugin.(RangerElasticsearchPlugin.java:52)
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at 
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at 
org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:607)
        at 
org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:556)
        at 
org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:471)
        at 
org.elasticsearch.plugins.PluginsService.(PluginsService.java:163)
        at org.elasticsearch.node.Node.(Node.java:313)
        at org.elasticsearch.node.Node.(Node.java:257)
        at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:221)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349)
        at 
org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
        at 
org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
        at 
org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at 
org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at 
org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at 
java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:864)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 22 more {code}

  was:
Please find the versions I am using 

*Apache Ranger ElasticSearch Plugin:* ranger-2.2.0-elasticsearch-plugin.tar.gz

*elasticsearch version:* 7.6.0 

*OS:* Ubuntu 20.04.4

I installed the apache ranger elastic search plugin on elastic search host, 
while starting elasticsearch service I am getting below error:
{code:java}
service elasticsearch start
 * Starting Elasticsearch Server                                                
                                                                                
                                           sysctl: setting key 
"vm.max_map_count", ignoring: Read-only file system
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in 
version 9.0 and will likely be removed in a future release.
                                                                                
                                                                                
                                    [ OK ]
root@3b8fcbe634f3:~# fatal error in thread [main], exiting
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
        at 

[jira] [Created] (RANGER-3696) java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

2022-04-05 Thread MohdSiddique Bagwan (Jira)
MohdSiddique Bagwan created RANGER-3696:
---

 Summary: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
 Key: RANGER-3696
 URL: https://issues.apache.org/jira/browse/RANGER-3696
 Project: Ranger
  Issue Type: Bug
  Components: plugins
Affects Versions: 2.2.0
 Environment: Apache Ranger ElasticSearch Plugin: 
ranger-2.2.0-elasticsearch-plugin.tar.gz

elasticsearch version: 7.6.0 

OS: Ubuntu 20.04.4
Reporter: MohdSiddique Bagwan


Please find the versions I am using 

*Apache Ranger ElasticSearch Plugin:* ranger-2.2.0-elasticsearch-plugin.tar.gz

*elasticsearch version:* 7.6.0 

*OS:* Ubuntu 20.04.4

I installed the apache ranger elastic search plugin on elastic search host, 
while starting elasticsearch service I am getting below error:
{code:java}
service elasticsearch start
 * Starting Elasticsearch Server                                                
                                                                                
                                           sysctl: setting key 
"vm.max_map_count", ignoring: Read-only file system
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in 
version 9.0 and will likely be removed in a future release.
                                                                                
                                                                                
                                    [ OK ]
root@3b8fcbe634f3:~# fatal error in thread [main], exiting
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
        at 
org.apache.ranger.authorization.elasticsearch.plugin.RangerElasticsearchPlugin.(RangerElasticsearchPlugin.java:52)
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at 
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at 
org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:607)
        at 
org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:556)
        at 
org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:471)
        at 
org.elasticsearch.plugins.PluginsService.(PluginsService.java:163)
        at org.elasticsearch.node.Node.(Node.java:313)
        at org.elasticsearch.node.Node.(Node.java:257)
        at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:221)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349)
        at 
org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
        at 
org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
        at 
org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at 
org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at 
org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at 
java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:864)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 22 more {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Resolved] (RANGER-3442) Ranger KMS DAO memory issues when many new keys are created

2022-04-05 Thread Pavi Subenderan (Jira)


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

Pavi Subenderan resolved RANGER-3442.
-
Resolution: Fixed

Patch was merged, closing review board diff and jira.

> Ranger KMS DAO memory issues when many new keys are created
> ---
>
> Key: RANGER-3442
> URL: https://issues.apache.org/jira/browse/RANGER-3442
> Project: Ranger
>  Issue Type: Bug
>  Components: kms
>Affects Versions: 2.0.0
>Reporter: Pavi Subenderan
>Assignee: Pavi Subenderan
>Priority: Major
> Fix For: 3.0.0, 2.3.0
>
> Attachments: RANGER-3442-entity-manager-clear.patch, kms-key.py
>
>
> We have many keys created in our KMS keystore and recently we found that when 
> we create new keys, the KMS instances easily hit against the memory limit. 
> We can reproduce this with a script to call KMS createKey and then 
> getMetadata for new keys in a loop. Basically we restart our instances and 
> memory usage is approximately 1.5GB out of 8GB, but after running this script 
> for a bit (1-5 minutes), we hit close to the 8GB limit and the memory usage 
> does not go back down after that.  
> I did a heap dump and saw that most of the memory was being retained by 
> XXRangerKeystore and eclipse EntityManagerImpl.  
>  * org.eclipse.persistence.internal.jpa.EntityManagerImpl
>  * org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork 
> And the largest shallow size object was char[] with 4GB+...
>  
> *My fix*
> I was ultimately able to solve this issue by adding an 
> getEntityManager().clear() call in BaseDao.java getAllKeys(). 
> After I added this fix, we can now run as many KMS CreateKey / getMetadata 
> calls as we want without any increase in memory usage whatsoever. Memory 
> usage now stays constant at <1.7GB.
> My understanding is that Ranger KMS has a many instances of ThreadLocal 
> EntityManager (160+ according to my heap dump) which each held a cache of the 
> results for getAllKeys. Since we have so many keys in our KMS, this would 
> easily put as at the memory limit. 
> Not sure if there are any drawbacks to clearing EntityManager in 
> BaseDao.getAllKeys() but we are seeing greatly improved performance in our 
> case since we aren't constantly hitting the memory limit anymore.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (RANGER-3442) Ranger KMS DAO memory issues when many new keys are created

2022-04-05 Thread Bhavik Patel (Jira)


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

Bhavik Patel updated RANGER-3442:
-
Fix Version/s: 3.0.0
   2.3.0

> Ranger KMS DAO memory issues when many new keys are created
> ---
>
> Key: RANGER-3442
> URL: https://issues.apache.org/jira/browse/RANGER-3442
> Project: Ranger
>  Issue Type: Bug
>  Components: kms
>Affects Versions: 2.0.0
>Reporter: Pavi Subenderan
>Assignee: Pavi Subenderan
>Priority: Major
> Fix For: 3.0.0, 2.3.0
>
> Attachments: RANGER-3442-entity-manager-clear.patch, kms-key.py
>
>
> We have many keys created in our KMS keystore and recently we found that when 
> we create new keys, the KMS instances easily hit against the memory limit. 
> We can reproduce this with a script to call KMS createKey and then 
> getMetadata for new keys in a loop. Basically we restart our instances and 
> memory usage is approximately 1.5GB out of 8GB, but after running this script 
> for a bit (1-5 minutes), we hit close to the 8GB limit and the memory usage 
> does not go back down after that.  
> I did a heap dump and saw that most of the memory was being retained by 
> XXRangerKeystore and eclipse EntityManagerImpl.  
>  * org.eclipse.persistence.internal.jpa.EntityManagerImpl
>  * org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork 
> And the largest shallow size object was char[] with 4GB+...
>  
> *My fix*
> I was ultimately able to solve this issue by adding an 
> getEntityManager().clear() call in BaseDao.java getAllKeys(). 
> After I added this fix, we can now run as many KMS CreateKey / getMetadata 
> calls as we want without any increase in memory usage whatsoever. Memory 
> usage now stays constant at <1.7GB.
> My understanding is that Ranger KMS has a many instances of ThreadLocal 
> EntityManager (160+ according to my heap dump) which each held a cache of the 
> results for getAllKeys. Since we have so many keys in our KMS, this would 
> easily put as at the memory limit. 
> Not sure if there are any drawbacks to clearing EntityManager in 
> BaseDao.getAllKeys() but we are seeing greatly improved performance in our 
> case since we aren't constantly hitting the memory limit anymore.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (RANGER-3442) Ranger KMS DAO memory issues when many new keys are created

2022-04-05 Thread Dhaval Shah (Jira)


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

Dhaval Shah commented on RANGER-3442:
-

Hi,

Apache master commit : 
https://github.com/apache/ranger/commit/7214d6d7ba90bbe377614682f6972479a7722dc5

Apache ranger-2.3 commit:
https://github.com/apache/ranger/commit/3dcccf22049f3442915c7cb6f9d1f2d3304637a4

Thanks.

[~pavitheran],
Please close the review request and Apache Jira.

Thanks

> Ranger KMS DAO memory issues when many new keys are created
> ---
>
> Key: RANGER-3442
> URL: https://issues.apache.org/jira/browse/RANGER-3442
> Project: Ranger
>  Issue Type: Bug
>  Components: kms
>Affects Versions: 2.0.0
>Reporter: Pavi Subenderan
>Assignee: Pavi Subenderan
>Priority: Major
> Attachments: RANGER-3442-entity-manager-clear.patch, kms-key.py
>
>
> We have many keys created in our KMS keystore and recently we found that when 
> we create new keys, the KMS instances easily hit against the memory limit. 
> We can reproduce this with a script to call KMS createKey and then 
> getMetadata for new keys in a loop. Basically we restart our instances and 
> memory usage is approximately 1.5GB out of 8GB, but after running this script 
> for a bit (1-5 minutes), we hit close to the 8GB limit and the memory usage 
> does not go back down after that.  
> I did a heap dump and saw that most of the memory was being retained by 
> XXRangerKeystore and eclipse EntityManagerImpl.  
>  * org.eclipse.persistence.internal.jpa.EntityManagerImpl
>  * org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork 
> And the largest shallow size object was char[] with 4GB+...
>  
> *My fix*
> I was ultimately able to solve this issue by adding an 
> getEntityManager().clear() call in BaseDao.java getAllKeys(). 
> After I added this fix, we can now run as many KMS CreateKey / getMetadata 
> calls as we want without any increase in memory usage whatsoever. Memory 
> usage now stays constant at <1.7GB.
> My understanding is that Ranger KMS has a many instances of ThreadLocal 
> EntityManager (160+ according to my heap dump) which each held a cache of the 
> results for getAllKeys. Since we have so many keys in our KMS, this would 
> easily put as at the memory limit. 
> Not sure if there are any drawbacks to clearing EntityManager in 
> BaseDao.getAllKeys() but we are seeing greatly improved performance in our 
> case since we aren't constantly hitting the memory limit anymore.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


Re: Review Request 73621: RANGER-3442: Fix Ranger KMS DAO memory issues when creating many new keys

2022-04-05 Thread bhavik patel

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


Ship it!




Ship It!

- bhavik patel


On Sept. 30, 2021, 8:18 p.m., Pavi Subenderan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73621/
> ---
> 
> (Updated Sept. 30, 2021, 8:18 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-3442
> https://issues.apache.org/jira/browse/RANGER-3442
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Clear the EntityManager after getting keys to reduce memory pressure. See 
> ticket RANGER-3442 for more details.
> 
> 
> Diffs
> -
> 
>   kms/src/main/java/org/apache/ranger/kms/dao/BaseDao.java b32d130 
> 
> 
> Diff: https://reviews.apache.org/r/73621/diff/1/
> 
> 
> Testing
> ---
> 
> Ran this patch in our cluster and created hundreds of keys with no noticeable 
> memory increase. 
> Previously without this patch, we would hit memory limit very quickly when 
> creating keys. This memory usage would not go down after.
> This patch has been running for almost a week in our cluster with no 
> regressions or memory issues.
> 
> 
> Thanks,
> 
> Pavi Subenderan
> 
>



[jira] [Commented] (RANGER-3632) Improve ranger logs, RENAME_ON_ROTATE and others

2022-04-05 Thread Pradeep Agrawal (Jira)


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

Pradeep Agrawal commented on RANGER-3632:
-

[~kirbyzhou]  I have reverted commit : 
[https://github.com/apache/ranger/commit/db99f639017bc9bbd71a7c5772adc1545ca83ec0]

check previous message for build failure details.

> Improve ranger logs,  RENAME_ON_ROTATE and others
> -
>
> Key: RANGER-3632
> URL: https://issues.apache.org/jira/browse/RANGER-3632
> Project: Ranger
>  Issue Type: Improvement
>  Components: admin, kms
>Affects Versions: 3.0.0, 2.3.0
>Reporter: kirby zhou
>Assignee: kirby zhou
>Priority: Major
> Fix For: 3.0.0, 2.3.0
>
>
> Currently, the filename of the access-log in use has a timestamp as the 
> suffix. This brings trouble to some log monitoring and analysis programs, 
> such as "tail -f access-log"
> Need to add an option to enable tomcat's RenameOnRotate capability to fix the 
> file name of access-log.
>  
> {code:java}
> // in EmbeddedServer::start()
> valve.setRenameOnRotate(
> EmbeddedServerUtil.getConfig(ACCESS_LOG_RENAME_ON_ROTATE,  false);
> );{code}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


Re: Review Request 73621: RANGER-3442: Fix Ranger KMS DAO memory issues when creating many new keys

2022-04-05 Thread Dhaval Shah

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


Ship it!




Ship It!

- Dhaval Shah


On Sept. 30, 2021, 8:18 p.m., Pavi Subenderan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73621/
> ---
> 
> (Updated Sept. 30, 2021, 8:18 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-3442
> https://issues.apache.org/jira/browse/RANGER-3442
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Clear the EntityManager after getting keys to reduce memory pressure. See 
> ticket RANGER-3442 for more details.
> 
> 
> Diffs
> -
> 
>   kms/src/main/java/org/apache/ranger/kms/dao/BaseDao.java b32d130 
> 
> 
> Diff: https://reviews.apache.org/r/73621/diff/1/
> 
> 
> Testing
> ---
> 
> Ran this patch in our cluster and created hundreds of keys with no noticeable 
> memory increase. 
> Previously without this patch, we would hit memory limit very quickly when 
> creating keys. This memory usage would not go down after.
> This patch has been running for almost a week in our cluster with no 
> regressions or memory issues.
> 
> 
> Thanks,
> 
> Pavi Subenderan
> 
>



[jira] [Commented] (RANGER-3632) Improve ranger logs, RENAME_ON_ROTATE and others

2022-04-05 Thread Pradeep Agrawal (Jira)


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

Pradeep Agrawal commented on RANGER-3632:
-

This commit is causing test/build failure, hence reopening this : 
[https://github.com/apache/ranger/commit/db99f639017bc9bbd71a7c5772adc1545ca83ec0]
{code:java}
Tests run: 57, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.296 sec - in 
org.apache.ranger.rest.TestServiceREST
12:53:57.125 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - ==> 
JVMShutdownHook.run()
12:53:57.125 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - JVMShutdownHook: 
Signalling async audit cleanup to start.
12:53:57.125 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - 
RangerAsyncAuditCleanup: Starting cleanup
12:53:57.125 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - JVMShutdownHook: 
Waiting up to 30 seconds for audit cleanup to finish.
12:53:57.125 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.queue.AuditAsyncQueue - Stop called. name=test.async
12:53:57.125 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - 
RangerAsyncAuditCleanup: Done cleanup
12:53:57.125 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - 
RangerAsyncAuditCleanup: Waiting to audit cleanup start signal
12:53:57.126 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - JVMShutdownHook: Audit 
cleanup finished after 1 milli seconds
12:53:57.126 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - JVMShutdownHook: 
Interrupting ranger async audit cleanup thread
12:53:57.126 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - <== 
JVMShutdownHook.run()
12:53:57.126 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - ==> 
JVMShutdownHook.run()
12:53:57.126 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - JVMShutdownHook: 
Signalling async audit cleanup to start.
12:53:57.126 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - JVMShutdownHook: 
Waiting up to 30 seconds for audit cleanup to finish.
12:53:57.126 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - 
RangerAsyncAuditCleanup: Interrupted while waiting for audit startCleanup 
signal!  Exiting the thread...
java.lang.InterruptedException: null
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:998)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.Semaphore.acquire(Semaphore.java:312)
at 
org.apache.ranger.audit.provider.AuditProviderFactory$RangerAsyncAuditCleanup.run(AuditProviderFactory.java:501)
at java.lang.Thread.run(Thread.java:748)
12:53:57.126 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - 
RangerAsyncAuditCleanup: Starting cleanup
12:53:57.126 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.queue.AuditAsyncQueue - Stop called. name=test.async
12:53:57.126 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - 
RangerAsyncAuditCleanup: Done cleanup
12:53:57.126 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - 
RangerAsyncAuditCleanup: Waiting to audit cleanup start signal
12:53:57.126 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - JVMShutdownHook: Audit 
cleanup finished after 0 milli seconds
12:53:57.126 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - JVMShutdownHook: 
Interrupting ranger async audit cleanup thread
12:53:57.126 [shutdown-hook-0] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - <== 
JVMShutdownHook.run()
12:53:57.126 [Ranger async Audit cleanup] INFO 
org.apache.ranger.audit.provider.AuditProviderFactory - 
RangerAsyncAuditCleanup: Interrupted while waiting for audit startCleanup 
signal!  Exiting the thread...
java.lang.InterruptedException: null
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:998)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.Semaphore.acquire(Semaphore.java:312)
at 
org.apache.ranger.audit.provider.AuditProviderFactory$RangerAsyncAuditCleanup.run(AuditProviderFactory.java:501)
at java.lang.Thread.run(Thread.java:748)
12:53:57.126 [Thread-2] DEBUG 

[jira] [Reopened] (RANGER-3632) Improve ranger logs, RENAME_ON_ROTATE and others

2022-04-05 Thread Pradeep Agrawal (Jira)


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

Pradeep Agrawal reopened RANGER-3632:
-

> Improve ranger logs,  RENAME_ON_ROTATE and others
> -
>
> Key: RANGER-3632
> URL: https://issues.apache.org/jira/browse/RANGER-3632
> Project: Ranger
>  Issue Type: Improvement
>  Components: admin, kms
>Affects Versions: 3.0.0, 2.3.0
>Reporter: kirby zhou
>Assignee: kirby zhou
>Priority: Major
> Fix For: 3.0.0, 2.3.0
>
>
> Currently, the filename of the access-log in use has a timestamp as the 
> suffix. This brings trouble to some log monitoring and analysis programs, 
> such as "tail -f access-log"
> Need to add an option to enable tomcat's RenameOnRotate capability to fix the 
> file name of access-log.
>  
> {code:java}
> // in EmbeddedServer::start()
> valve.setRenameOnRotate(
> EmbeddedServerUtil.getConfig(ACCESS_LOG_RENAME_ON_ROTATE,  false);
> );{code}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


Re: Review Request 73922: RANGER-3687: Password Policy Best Practices for Strong Security

2022-04-05 Thread bhavik patel


> On April 1, 2022, 6:04 a.m., Kirby Zhou wrote:
> > security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java
> > Line 1412 (original), 1424 (patched)
> > 
> >
> > It not works for FIPS.
> > FIPS require random salt, so we can not compare oldPassword and 
> > newPassword, encoded-oldPassword and encoded-newPassword directy,
> 
> bhavik patel wrote:
> That's true and That’s the main reason I pinged in the Jira to discuss 
> the approach.
> 
> Kirby Zhou wrote:
> You can simply call the old version function in a loop.
> 
> bhavik patel wrote:
> if we execute in the loop than also the result will be same unless we 
> have the old salt value.

@Kirby Zhou, If you have FIPS enabled environment then can you please update 
this patch for the same and raise new Review Request(with all the changes)


- bhavik


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


On April 1, 2022, 7:50 a.m., bhavik patel wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73922/
> ---
> 
> (Updated April 1, 2022, 7:50 a.m.)
> 
> 
> Review request for ranger, Dhaval Shah, Dineshkumar Yadav, Kirby Zhou, Abhay 
> Kulkarni, Madhan Neethiraj, Mateen Mansoori, Mehul Parikh, Pradeep Agrawal, 
> Ramesh Mani, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3687
> https://issues.apache.org/jira/browse/RANGER-3687
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Password history should be configured to restrict users from reusing their 
> last 4 or 5 passwords.
> 
> 
> Diffs
> -
> 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 26282f770 
>   security-admin/db/mysql/patches/059-update-x-portal-user-table.sql 
> PRE-CREATION 
>   security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java 0e61038d5 
>   security-admin/src/main/java/org/apache/ranger/entity/XXPortalUser.java 
> d0451b4d2 
>   security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 
> e2bfc8fff 
> 
> 
> Diff: https://reviews.apache.org/r/73922/diff/2/
> 
> 
> Testing
> ---
> 
> 1. Verified the basic functionality of "/passwordchange" api
> 2. Verified "/secure/users" & "/secure/users/{id}" API’s
> 
> 3. Once the basic review/discussion is done will fix the Test-cases
> 
> 
> Thanks,
> 
> bhavik patel
> 
>