[JBoss JIRA] (WFLY-6517) Module org.wildfly.naming does not export JndiPermission
by Ivo Studensky (JIRA)
[ https://issues.jboss.org/browse/WFLY-6517?page=com.atlassian.jira.plugin.... ]
Ivo Studensky moved JBEAP-4196 to WFLY-6517:
--------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-6517 (was: JBEAP-4196)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Naming
(was: Naming)
Target Release: (was: 7.backlog.GA)
Affects Version/s: 10.0.0.Final
(was: 7.0.0.CR1)
> Module org.wildfly.naming does not export JndiPermission
> --------------------------------------------------------
>
> Key: WFLY-6517
> URL: https://issues.jboss.org/browse/WFLY-6517
> Project: WildFly
> Issue Type: Bug
> Components: Naming
> Affects Versions: 10.0.0.Final
> Reporter: Ivo Studensky
> Assignee: Ivo Studensky
> Priority: Critical
>
> The new module org.wildfly.naming which contains JndiPermission does not export it. Hence, the module is efficiently useless. Deployments still have to depend on the private org.jboss.as.naming module to get the JndiPermission to work.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6474) DeploymentWithBindTestCase fails with security manager
by Ivo Studensky (JIRA)
[ https://issues.jboss.org/browse/WFLY-6474?page=com.atlassian.jira.plugin.... ]
Ivo Studensky reassigned WFLY-6474:
-----------------------------------
Assignee: Ivo Studensky (was: Jan Tymel)
> DeploymentWithBindTestCase fails with security manager
> ------------------------------------------------------
>
> Key: WFLY-6474
> URL: https://issues.jboss.org/browse/WFLY-6474
> Project: WildFly
> Issue Type: Bug
> Components: Test Suite
> Reporter: Jan Tymel
> Assignee: Ivo Studensky
>
> *org.jboss.as.test.integration.naming.local.simple.DeploymentWithBindTestCase#testBasicsNamespaces*
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.naming.local.simple.DeploymentWithBindTestCase#testBasicsNamespaces -Dsecurity.manager}}
> Fails with:
> {code}
> SEVERE [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (pool-3-thread-1) Failed: org.jboss.as.test.integration.naming.local.simple.DeploymentWithBindTestCase.testBasicsNamespaces: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("org.wildfly.naming.java.permission.JndiPermission" "global" "listBindings")" in code source "(vfs:/content/test.war/WEB-INF/classes <no signer certificates>)" of "null")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
> at org.jboss.as.naming.NamingContext.check(NamingContext.java:591)
> at org.jboss.as.naming.NamingContext.listBindings(NamingContext.java:375)
> at org.jboss.as.naming.InitialContext$DefaultInitialContext.listBindings(InitialContext.java:246)
> at org.jboss.as.naming.NamingContext.listBindings(NamingContext.java:394)
> at javax.naming.InitialContext.listBindings(InitialContext.java:472)
> at javax.naming.InitialContext.listBindings(InitialContext.java:472)
> at org.jboss.as.test.integration.naming.local.simple.DeploymentWithBindTestCase.testBasicsNamespaces(DeploymentWithBindTestCase.java:91)
> 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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.jboss.arquillian.junit.Arquillian$8$1.invoke(Arquillian.java:370)
> at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
> 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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38)
> 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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
> 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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
> 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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
> 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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:136)
> at org.jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:363)
> at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:245)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:259)
> at org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:315)
> at org.jboss.arquillian.container.test.impl.execution.BeforeLifecycleEventExecuter.on(BeforeLifecycleEventExecuter.java:35)
> 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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
> 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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
> 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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
> 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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
> at org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:311)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:204)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
> at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:66)
> at org.jboss.arquillian.protocol.jmx.JMXTestRunner.doRunTestMethod(JMXTestRunner.java:180)
> at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.doRunTestMethod(ArquillianService.java:247)
> at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:162)
> at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:141)
> at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:223)
> 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 sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> 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 sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
> at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
> at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
> at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
> at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
> at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:1503)
> at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:724)
> at org.jboss.as.jmx.BlockingNotificationMBeanServer.invoke(BlockingNotificationMBeanServer.java:168)
> at org.jboss.remotingjmx.protocol.v2.ServerProxy$InvokeHandler.handle(ServerProxy.java:950)
> at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
> at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75)
> at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:422)
> at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:92)
> at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:70)
> at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> *org.jboss.as.test.integration.naming.local.simple.DeploymentWithBindTestCase#testEjb*
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.naming.local.simple.DeploymentWithBindTestCase#testEjb -Dsecurity.manager}}
> Fails with:
> {code}
> Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("org.wildfly.naming.java.permission.JndiPermission" "jboss/test" "bind")" in code source "(vfs:/content/test.war/WEB-INF/classes <no signer certificates>)" of "null")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
> at org.jboss.as.naming.NamingContext.check(NamingContext.java:591)
> at org.jboss.as.naming.NamingContext.bind(NamingContext.java:251)
> at org.jboss.as.naming.InitialContext$DefaultInitialContext.bind(InitialContext.java:264)
> at org.jboss.as.naming.NamingContext.bind(NamingContext.java:289)
> at javax.naming.InitialContext.bind(InitialContext.java:425)
> at javax.naming.InitialContext.bind(InitialContext.java:425)
> at org.jboss.as.test.integration.naming.local.simple.BeanWithBind.doBind(BeanWithBind.java:38)
> 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 org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
> at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
> ... 179 more
> {code}
> *org.jboss.as.test.integration.naming.local.simple.DeploymentWithBindTestCase#testServlet*
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.naming.local.simple.DeploymentWithBindTestCase#testServlet -Dsecurity.manager}}
> Fails with:
> {code}
> Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("org.jboss.remoting3.security.RemotingPermission" "createEndpoint")" in code source "(vfs:/content/test.war/WEB-INF/classes <no signer certificates>)" of "null")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
> at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:85)
> at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:112)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:122)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:65)
> at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:147)
> at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:122)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:263)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:168)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:147)
> ... 148 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFCORE-1157) Managmement and JMX notifications when ControlledProcessState changes
by Kabir Khan (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1157?page=com.atlassian.jira.plugi... ]
Kabir Khan commented on WFCORE-1157:
------------------------------------
It seems we already have the mechanism to register a property change listener with the ControlledProcessStateService. This is used in another few places, so perhaps we should just do that? Otherwise some untangling is needed of the order where we create the NotificationSupport and the ControlledProcessState.
The following change just to get some logging:
{code}
$git diff --cached
diff --git a/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java b/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java
index 463fcb7..2b93c69 100644
--- a/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java
+++ b/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java
@@ -24,6 +24,8 @@ package org.jboss.as.controller;
import static org.jboss.as.controller.logging.ControllerLogger.ROOT_LOGGER;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.util.List;
import java.util.ServiceLoader;
@@ -81,6 +83,7 @@ public abstract class AbstractControllerService implements Service<ModelControll
* @see #BOOT_STACK_SIZE_PROPERTY
*/
public static final int DEFAULT_BOOT_STACK_SIZE = 2 * 1024 * 1024;
+ private final PropertyChangeListener propertyChangeListener;
private static int getBootStackSize() {
String prop = WildFlySecurityManager.getPropertyPrivileged(BOOT_STACK_SIZE_PROPERTY, null);
@@ -262,6 +265,15 @@ public abstract class AbstractControllerService implements Service<ModelControll
this.authorizer = authorizer;
this.bootErrorCollector = new BootErrorCollector();
this.capabilityRegistry = capabilityRegistry.createShadowCopy(); //create shadow copy of proper registry so changes can only be visible by .publish()
+ this.propertyChangeListener = new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ if ("currentState".equals(evt.getPropertyName())) {
+ ControlledProcessState.State newState = (ControlledProcessState.State) evt.getNewValue();
+ System.out.println("------> CHANGED STATE TO " + newState);
+ }
+ }
+ };
}
@Override
@@ -277,6 +289,7 @@ public abstract class AbstractControllerService implements Service<ModelControll
final ExecutorService executorService = injectedExecutorService.getOptionalValue();
final NotificationSupport notificationSupport = NotificationSupport.Factory.create(executorService);
+ processState.getService().addPropertyChangeListener(propertyChangeListener);
WritableAuthorizerConfiguration authorizerConfig = authorizer.getWritableAuthorizerConfiguration();
authorizerConfig.reset();
ManagementResourceRegistration rootResourceRegistration = ManagementResourceRegistration.Factory.create(rootResourceDefinition, authorizerConfig, capabilityRegistry);
@@ -499,6 +512,7 @@ public abstract class AbstractControllerService implements Service<ModelControll
} finally {
context.asynchronous();
}
+ this.processState.getService().removePropertyChangeListener(propertyChangeListener);
}
/**
{code}
results in the following output starting a standalone instance:
{code}
12:42:21,431 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final
12:42:21,638 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
12:42:21,721 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Core 3.0.0.Alpha1-SNAPSHOT "Kenny" starting
12:42:22,256 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
12:42:22,278 INFO [org.xnio] (MSC service thread 1-4) XNIO version 3.3.6.Final
12:42:22,285 INFO [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.3.6.Final
12:42:22,327 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 4.0.18.Final
12:42:22,384 WARN [org.jboss.as.domain.http.api.undertow] (MSC service thread 1-8) WFLYDMHTTP0003: Unable to load console module for slot main, disabling console
12:42:22,518 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
12:42:22,519 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
12:42:22,519 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Core 3.0.0.Alpha1-SNAPSHOT "Kenny" started in 1441ms - Started 56 of 58 services (16 services are lazy, passive or on-demand)
12:42:22,522 INFO [stdout] (Controller Boot Thread) ------> CHANGED STATE TO running
{code}
Next I remove a socket binding:
{code}
12:43:47,754 INFO [stdout] (management-handler-thread - 1) ------> CHANGED STATE TO reload-required
{code}
Doing a reload gives
{code}
12:39:11,778 INFO [stdout] (management-handler-thread - 1) ------> CHANGED STATE TO stopping
12:39:11,799 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0050: WildFly Core 3.0.0.Alpha1-SNAPSHOT "Kenny" stopped in 20ms
12:39:11,800 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Core 3.0.0.Alpha1-SNAPSHOT "Kenny" starting
12:39:11,840 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
12:39:11,853 WARN [org.jboss.as.domain.http.api.undertow] (MSC service thread 1-6) WFLYDMHTTP0003: Unable to load console module for slot main, disabling console
12:39:11,888 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
12:39:11,889 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
12:39:11,889 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Core 3.0.0.Alpha1-SNAPSHOT "Kenny" started in 87ms - Started 56 of 58 services (16 services are lazy, passive or on-demand)
12:39:11,890 INFO [stdout] (Controller Boot Thread) ------> CHANGED STATE TO running
{code}
So it seems that all the changes will get captured properly using this approach *apart from 'starting'*. That change happens before the property change listener is registered. One option is to hardcode it when I register the listener in the AbstractControllerService.start() method. Unless we want to detangle this and make sure that the NotificationSupport is created before the ControlledProcessState (currently happens in the various bootstrap classes).
I have not looked into what JMX would do yet.
> Managmement and JMX notifications when ControlledProcessState changes
> ---------------------------------------------------------------------
>
> Key: WFCORE-1157
> URL: https://issues.jboss.org/browse/WFCORE-1157
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Domain Management, JMX
> Reporter: Brian Stansberry
> Assignee: Kabir Khan
> Fix For: 3.0.0.Alpha1
>
>
> When Jeff Mesnil added the core management notification stuff an obvious thing to do was to emit notifications around ControlledProcessState changes. But I forgot. :( So lets do it.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6516) divert resource does not define a module for its transformer class
by Jeff Mesnil (JIRA)
[ https://issues.jboss.org/browse/WFLY-6516?page=com.atlassian.jira.plugin.... ]
Jeff Mesnil updated WFLY-6516:
------------------------------
Description:
The divert resource defines a transformer-class-name but there is no way to define which JBoss module contain this class.
This means that the module defining the class must be a dependency of the org.apache.activemq.artemis module since it's Artemis that currently loads it.
The messaging-activemq subsystem would then be able to load it and pass it to Artemis's ServiceRegistry (similarly to the interceptors).
was:
The connector-service resource has only a factory-class attribute and does not specify from which module the class should be loaded.
{noformat}
<connector-service name="b"
factory-class="bar.foo">
<param name="foo"
value="${connector.value:bar}"/>
<param name="bar"
value="2"/>
</connector-service>
{noformat}
This means that the module defining the class must be a dependency of the org.apache.activemq.artemis module since it's Artemis that currently loads it.
A module attribute should be added so that the class could be loaded from any module.
The messaging-activemq subsystem would then be able to load it and pass it to Artemis's ServiceRegistry (similarly to the interceptors).
> divert resource does not define a module for its transformer class
> ------------------------------------------------------------------
>
> Key: WFLY-6516
> URL: https://issues.jboss.org/browse/WFLY-6516
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Affects Versions: 10.0.0.Final
> Reporter: Jeff Mesnil
> Assignee: Jeff Mesnil
>
> The divert resource defines a transformer-class-name but there is no way to define which JBoss module contain this class.
> This means that the module defining the class must be a dependency of the org.apache.activemq.artemis module since it's Artemis that currently loads it.
> The messaging-activemq subsystem would then be able to load it and pass it to Artemis's ServiceRegistry (similarly to the interceptors).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6516) divert resource does not define a module for its transformer class
by Jeff Mesnil (JIRA)
Jeff Mesnil created WFLY-6516:
---------------------------------
Summary: divert resource does not define a module for its transformer class
Key: WFLY-6516
URL: https://issues.jboss.org/browse/WFLY-6516
Project: WildFly
Issue Type: Bug
Components: JMS
Affects Versions: 10.0.0.Final
Reporter: Jeff Mesnil
Assignee: Jeff Mesnil
The connector-service resource has only a factory-class attribute and does not specify from which module the class should be loaded.
{noformat}
<connector-service name="b"
factory-class="bar.foo">
<param name="foo"
value="${connector.value:bar}"/>
<param name="bar"
value="2"/>
</connector-service>
{noformat}
This means that the module defining the class must be a dependency of the org.apache.activemq.artemis module since it's Artemis that currently loads it.
A module attribute should be added so that the class could be loaded from any module.
The messaging-activemq subsystem would then be able to load it and pass it to Artemis's ServiceRegistry (similarly to the interceptors).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (DROOLS-664) Implement xpath notation in drools constraints
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-664?page=com.atlassian.jira.plugin... ]
Mario Fusco closed DROOLS-664.
------------------------------
Fix Version/s: 6.4.0.Final
Resolution: Done
> Implement xpath notation in drools constraints
> ----------------------------------------------
>
> Key: DROOLS-664
> URL: https://issues.jboss.org/browse/DROOLS-664
> Project: Drools
> Issue Type: Feature Request
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Fix For: 6.4.0.Final
>
>
> It is required to allow an xpath notation in drools constraints like the following:
> {code}
> Person( $pet : /pets )
> {code}
> that is formally equivalent to the more verbose:
> {code}
> Person( $pets : pets )
> $pet : Pet() from $pets
> {code}
> It should be also possible to have conditions filtering the collection like in:
> {code}
> Person( $pet : /pets[ age == 5 ] )
> {code}
> corresponding to:
> {code}
> Person( $pets : pets )
> $pet : Pet(age == 5) from $pets
> {code}
> Of course also multiple indirections has to be allowed, so the following:
> {code}
> Man( $toy : /wife/children/toys )
> {code}
> will be equivalent to:
> {code}
> $man: Man( $wife: wife )
> $child: Child() from $wife.children
> $toy: Toy() from $child.toys
> {code}
> In this case the xpath notation will also allow to flatten the 2 from nodes in a single one that will internally flatten the collection of collections. Since it is necessary to distinguish the case when we want to iterate a collection from the case when we want to bind the collection as a whole it is possible to mix the collection iteration operator '/' and the simple dereferencing operator '.' as in:
> {code}
> Man( $toys : /wife/children.toys )
> {code}
> In this last case this pattern binds each List<Toy> for each child as a whole, so this is equivalent to:
> {code}
> $man: Man( $wife: wife )
> Child( $toys: toys ) from $wife.children
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-3313) Websocket Auth - Container is not aware of the Principal
by Juraci Paixão Kröhling (JIRA)
[ https://issues.jboss.org/browse/WFLY-3313?page=com.atlassian.jira.plugin.... ]
Juraci Paixão Kröhling updated WFLY-3313:
-----------------------------------------
Component/s: Web Sockets
> Websocket Auth - Container is not aware of the Principal
> --------------------------------------------------------
>
> Key: WFLY-3313
> URL: https://issues.jboss.org/browse/WFLY-3313
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Security, Web (Undertow), Web Sockets
> Affects Versions: 8.1.0.CR1, 10.0.0.Final
> Reporter: Markus D
> Assignee: Jason Greene
> Attachments: websocket-different-principals-ejb-vs-socket.png
>
>
> The Websocket is protected by the web.xml. The session object of the callback object correctly returns the principal.
> When an EJB is called the callerPrincipal is always anonymous.
> @Resource
> private SessionContext ctx;
> Principal callerPrincipal = ctx.getCallerPrincipal();
> Running thread here:
> https://community.jboss.org/thread/240617
> Shouldn't the principal be propagated to the EJB container when a websocket callback method triggered?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-3313) Websocket Auth - Container is not aware of the Principal
by Juraci Paixão Kröhling (JIRA)
[ https://issues.jboss.org/browse/WFLY-3313?page=com.atlassian.jira.plugin.... ]
Juraci Paixão Kröhling edited comment on WFLY-3313 at 4/13/16 4:24 AM:
-----------------------------------------------------------------------
Apparently, this is still happening. Using the [javaee7-samples' "websocket/endpoint-security"|http://blog.arungupta.me/securing-websockets-username-password-servlet-security-techtip49/] as base and using the following code, I get the proper user on the WS Session's principal and anonymous on EJB's session context.
{code}
@ServerEndpoint(value = "/websocket")
@Stateless
public class MyEndpoint {
@SuppressWarnings("EjbEnvironmentInspection") @Resource
SessionContext sessionContext;
@OnMessage
public String echoText(Session session, String text) {
Principal sessionP = session.getUserPrincipal();
Principal p = sessionContext.getCallerPrincipal();
return text;
}
}
{code}
(I'm sorry for attaching code as image, but it's probably easier to show that as a debugging session)
was (Author: juraci.costa):
Apparently, this is still happening. Using the [javaee7-samples' "websocket/endpoint-security"|http://blog.arungupta.me/securing-websockets-username-password-servlet-security-techtip49/] as base and using the following code, I get the proper user on the WS Session's principal and anonymous on EJB's session context.
{code}
@ServerEndpoint(value = "/websocket")
@Stateless
public class MyEndpoint {
@SuppressWarnings("EjbEnvironmentInspection") @Resource
SessionContext sessionContext;
@OnMessage
public String echoText(Session session, String text) {
Principal sessionP = session.getUserPrincipal();
Principal p = sessionContext.getCallerPrincipal();
return text;
}
}
{code}
> Websocket Auth - Container is not aware of the Principal
> --------------------------------------------------------
>
> Key: WFLY-3313
> URL: https://issues.jboss.org/browse/WFLY-3313
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Security, Web (Undertow)
> Affects Versions: 8.1.0.CR1, 10.0.0.Final
> Reporter: Markus D
> Assignee: Jason Greene
> Attachments: websocket-different-principals-ejb-vs-socket.png
>
>
> The Websocket is protected by the web.xml. The session object of the callback object correctly returns the principal.
> When an EJB is called the callerPrincipal is always anonymous.
> @Resource
> private SessionContext ctx;
> Principal callerPrincipal = ctx.getCallerPrincipal();
> Running thread here:
> https://community.jboss.org/thread/240617
> Shouldn't the principal be propagated to the EJB container when a websocket callback method triggered?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month