[JBoss JIRA] (WFCORE-1832) Missing doPrivileged sections in JBossSecurityClient
by Jan Tymel (JIRA)
Jan Tymel created WFCORE-1832:
---------------------------------
Summary: Missing doPrivileged sections in JBossSecurityClient
Key: WFCORE-1832
URL: https://issues.jboss.org/browse/WFCORE-1832
Project: WildFly Core
Issue Type: Bug
Components: Security
Reporter: Jan Tymel
Assignee: Darran Lofthouse
Priority: Blocker
There is a regression introduced by recent PicketBox upgrade (part of [1]). With PicketBox 4.9.7[2] it is possible to run {{performSimpleLogin()}} and {{cleanUp()}} methods of {{JBossSecurityClient}} class with security manager enabled. However; running these methods with PicketBox 5.0.0.Alpha3[3] causes AccessControlException.
PicketBox 4.9.7 is in EAP 7.1.0.DR3, PicketBox 5.0.0.Alpha3 in EAP 7.1.0.DR4 and DR5 => regression against 7.1.0.DR3.
This issue was noticed in consequence of an investigation of failed tests in AS TS run with security manager.
Tests that fail on {{performSimpleLogin()}} method:
* org.jboss.as.test.integration.ee.concurrent.DefaultContextServiceTestCase#testTaskSubmit
* org.jboss.as.test.integration.ee.concurrent.DefaultManagedExecutorServiceTestCase#testTaskSubmit
* org.jboss.as.test.integration.ee.concurrent.DefaultManagedScheduledExecutorServiceTestCase#testTaskSubmit
* org.jboss.as.test.integration.ee.concurrent.DefaultManagedThreadFactoryTestCase#testTaskSubmit
* org.jboss.as.test.integration.ejb.security.RunAsPrincipalTestCase#testAnonymous
* org.jboss.as.test.integration.ejb.security.RunAsPrincipalTestCase#testJackInABox
* org.jboss.as.test.integration.ejb.security.RunAsPrincipalTestCase#testSingletonPostconstructSecurity
* org.jboss.as.test.integration.ejb.security.callerprincipal.GetCallerPrincipalTestCase#testMDBLifecycle
* org.jboss.as.test.integration.ejb.security.singleton.SingletonSecurityTestCase#testInvocationOnSecuredMethodWithCorrectRole
* org.jboss.as.test.integration.ejb.security.singleton.SingletonSecurityTestCase#testInvocationOnSecuredMethodWithInCorrectRole
{{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=DefaultContextServiceTestCase -Dsecurity.manager}}
{code}
SEVERE [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (pool-3-thread-1) Failed: org.jboss.as.test.integration.ee.concurrent.DefaultContextServiceTestCase.testTaskSubmit: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "org.jboss.security.getSecurityContext")" in code source "(vfs:/content/DefaultContextServiceTestCase.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.DefaultContextServiceTestCase.war:main" from Service Module Loader")
at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:278)
at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
at org.jboss.security.SecurityContextAssociation.getSecurityContext(SecurityContextAssociation.java:145)
at org.jboss.security.client.JBossSecurityClient.performSimpleLogin(JBossSecurityClient.java:77)
at org.jboss.security.client.SecurityClient.login(SecurityClient.java:74)
at org.jboss.as.test.integration.ee.concurrent.DefaultContextServiceTestCase.testTaskSubmit(DefaultContextServiceTestCase.java:55)
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:243)
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:219)
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:149)
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}
Tests failing on {{cleanUp()}} method:
* org.jboss.as.test.integration.ejb.servlet.ServletUnitTestCase#testEJBServlet
* org.jboss.as.test.integration.ejb.servlet.ServletUnitTestCase#testEJBServletEar
{{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=ServletUnitTestCase -Dsecurity.manager}}
{code}
ERROR [org.jboss.as.test.integration.ejb.servlet.EJBServlet] (default task-1) java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "org.jboss.security.getSecurityContext")" in code source "(vfs:/content/ejb3-servlet.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.ejb3-servlet.war:main" from Service Module Loader")
15:07:52,122 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /ejb3-servlet/EJBServlet: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "org.jboss.security.setSecurityContext")" in code source "(vfs:/content/ejb3-servlet.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.ejb3-servlet.war:main" from Service Module Loader")
at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:278)
at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
at org.jboss.security.SecurityContextAssociation.setSecurityContext(SecurityContextAssociation.java:124)
at org.jboss.security.client.JBossSecurityClient.cleanUp(JBossSecurityClient.java:95)
at org.jboss.security.client.SecurityClient.logout(SecurityClient.java:86)
at org.jboss.as.test.integration.ejb.servlet.EJBServlet.processRequest(EJBServlet.java:75)
at org.jboss.as.test.integration.ejb.servlet.EJBServlet.doGet(EJBServlet.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1668)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1668)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1668)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1668)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$1$1.run(ServletInitialHandler.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:107)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:207)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:810)
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}
[1] https://github.com/wildfly/wildfly-core/pull/1764/files
[2] https://github.com/picketbox/picketbox/blob/v4.9.6.Final/security-jboss-s...
[3] https://github.com/picketbox/picketbox/blob/5.0.0.Alpha3/security-jboss-s...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (WFLY-4937) Implement graceful shutdown for transactions
by Tom Jenkinson (JIRA)
[ https://issues.jboss.org/browse/WFLY-4937?page=com.atlassian.jira.plugin.... ]
Tom Jenkinson reassigned WFLY-4937:
-----------------------------------
Assignee: Gytis Trikleris (was: Michael Musgrove)
> Implement graceful shutdown for transactions
> --------------------------------------------
>
> Key: WFLY-4937
> URL: https://issues.jboss.org/browse/WFLY-4937
> Project: WildFly
> Issue Type: Feature Request
> Components: Transactions
> Affects Versions: 10.0.0.Alpha5
> Reporter: Michael Musgrove
> Assignee: Gytis Trikleris
> Fix For: 11.0.0.CR1
>
>
> We will handle suspend for JTA and JTS by disallowing new transactions and then block the suspend thread until the count of active transactions drops to zero. We will also suspend the recovery manager.
> We will *not* do graceful shutdown for the optional XTS subsystem. For example an incoming XTS request for an existing transaction will be blocked.
> Question: should we
> - raise a new JIRA for this XTS case;
> - document the deficiency and see if there are complaints;
> - document the deficiency and fix it in a subsequent release
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (WFCORE-1824) Can not parse object attributes that contains a Properties attribute
by Jeff Mesnil (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1824?page=com.atlassian.jira.plugi... ]
Jeff Mesnil updated WFCORE-1824:
--------------------------------
Description:
My resource defines an attribute which is a LIST of OBJECT that corresponds to a class (class name + module) and Properties that are passed to the created instance:
{noformat}
private static final String CLASS = "class";
private static final String MODULE = "module";
public static final PropertiesAttributeDefinition PROPERTIES = new PropertiesAttributeDefinition.Builder("properties", true)
.setAllowExpression(true)
.build();
public static final ObjectTypeAttributeDefinition PROCESS_STATE_LISTENER = ObjectTypeAttributeDefinition.Builder.of("process-state-listener",
SimpleAttributeDefinitionBuilder.create(CLASS, ModelType.STRING, false)
.setAllowExpression(false)
.build(),
SimpleAttributeDefinitionBuilder.create(MODULE, ModelType.STRING, false)
.setAllowExpression(false)
.build(),
PROPERTIES)
.setRestartAllServices()
.setAllowNull(true)
.build();
public static final AttributeDefinition PROCESS_STATE_LISTENERS = ObjectListAttributeDefinition.Builder.of("listeners", PROCESS_STATE_LISTENER)
.setAllowNull(false)
.setRuntimeServiceNotRequired()
.build();
{noformat}
I can create the resource from the CLI:
{noformat}
/subsystem=core-management/service=process-state-listeners:add(listeners=[{class=org.foo.Listener, module=org.foo,, properties = {foo = true, bar = ${bar.prop:2}}}])
{"outcome" => "success"}
{noformat}
And the resource and its attribute is properly marshalled to the XML configuration:
{noformat}
<process-state-listeners>
<listeners>
<process-state-listener class="org.foo.Listener" module="org.foo">
<properties>
<property name="foo" value="true"/>
<property name="bar" value="${bar.prop:2}"/>
</properties>
</process-state-listener>
</listeners>
</process-state-listeners>
{noformat}
However the resource can not be parsed and it fails with the exception:
{noformat}
2016-09-27 14:57:35,285 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
at org.jboss.as.server.ServerService.boot(ServerService.java:355)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:303)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[118,25]
Message: WFLYCTL0198: Unexpected element '{urn:jboss:domain:core-management:1.0}properties' encountered
at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:89)
at org.jboss.as.controller.parsing.ParseUtils.requireNoContent(ParseUtils.java:244)
at org.jboss.as.controller.AttributeParser$5.parseElement(AttributeParser.java:197)
at org.jboss.as.controller.PersistentResourceXMLDescription.parseAttributes(PersistentResourceXMLDescription.java:208)
at org.jboss.as.controller.PersistentResourceXMLDescription.parseAttributeGroups(PersistentResourceXMLDescription.java:140)
at org.jboss.as.controller.PersistentResourceXMLDescription.parse(PersistentResourceXMLDescription.java:117)
at org.jboss.as.controller.PersistentResourceXMLDescription.parseChildren(PersistentResourceXMLDescription.java:258)
at org.jboss.as.controller.PersistentResourceXMLDescription.parse(PersistentResourceXMLDescription.java:135)
at org.wildfly.extension.management.CoreManagementSubsystemParser_1_0.readElement(CoreManagementSubsystemParser_1_0.java:77)
at org.wildfly.extension.management.CoreManagementSubsystemParser_1_0.readElement(CoreManagementSubsystemParser_1_0.java:50)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69)
at org.jboss.as.server.parsing.StandaloneXml_5.parseServerProfile(StandaloneXml_5.java:591)
at org.jboss.as.server.parsing.StandaloneXml_5.readServerElement(StandaloneXml_5.java:245)
at org.jboss.as.server.parsing.StandaloneXml_5.readElement(StandaloneXml_5.java:144)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:107)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
... 3 more
{noformat}
The code in org.jboss.as.controller.AttributeParser#parseElement:197 to parse a list of objects assumes that the object's value are all represented by XML attributes. In my case, that's not correct as the "properties" attribute is represented by XML elements.
was:
My resource defines an attribute which is a LIST of OBJECT that corresponds to a class (class name + module) and Properties that are passed to the created instance:
{noformat}
private static final String CLASS = "class";
private static final String MODULE = "module";
public static final PropertiesAttributeDefinition PROPERTIES = new PropertiesAttributeDefinition.Builder("properties", true)
.setAllowExpression(true)
.build();
public static final ObjectTypeAttributeDefinition PROCESS_STATE_LISTENER = ObjectTypeAttributeDefinition.Builder.of("process-state-listener",
SimpleAttributeDefinitionBuilder.create(CLASS, ModelType.STRING, false)
.setAllowExpression(false)
.build(),
SimpleAttributeDefinitionBuilder.create(MODULE, ModelType.STRING, false)
.setAllowExpression(false)
.build(),
PROPERTIES)
.setRestartAllServices()
.setAllowNull(true)
.build();
public static final AttributeDefinition PROCESS_STATE_LISTENERS = ObjectListAttributeDefinition.Builder.of("listeners", PROCESS_STATE_LISTENER)
.setAllowNull(false)
.setRuntimeServiceNotRequired()
.build();
{noformat}
I can create the resource from the CLI:
{noformat}
/subsystem=core-management/service=process-state-listeners:add(listeners=[{class=org.foo.Listener, module=org.foo,, properties = {foo = true, bar = ${bar.prop:2}}}])
{"outcome" => "success"}
{noformat}
And the resource and its attribute is properly marshalled to the XML configuration:
{noformat}
<process-state-listeners>
<listeners>
<process-state-listener class="org.foo.Listener" module="org.foo">
<properties>
<property name="foo" value="true"/>
<property name="bar" value="${bar.prop:2}"/>
</properties>
</process-state-listener>
</listeners>
</process-state-listeners>
{noformat}
However the resource can not be parsed and it fails with the exception:
{noformat}
boss.as.server.parsing.StandaloneXml_5.readElement(StandaloneXml_5.java:144)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:107)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
... 3 more
09:45:00,537 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.{noformat}
The code in org.jboss.as.controller.AttributeParser#parseElement:197 to parse a list of objects assumes that the object's value are all represented by XML attributes. In my case, that's not correct as the "properties" attribute is represented by XML elements.
> Can not parse object attributes that contains a Properties attribute
> --------------------------------------------------------------------
>
> Key: WFCORE-1824
> URL: https://issues.jboss.org/browse/WFCORE-1824
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 3.0.0.Alpha8
> Reporter: Jeff Mesnil
> Assignee: Tomaz Cerar
>
> My resource defines an attribute which is a LIST of OBJECT that corresponds to a class (class name + module) and Properties that are passed to the created instance:
> {noformat}
> private static final String CLASS = "class";
> private static final String MODULE = "module";
> public static final PropertiesAttributeDefinition PROPERTIES = new PropertiesAttributeDefinition.Builder("properties", true)
> .setAllowExpression(true)
> .build();
> public static final ObjectTypeAttributeDefinition PROCESS_STATE_LISTENER = ObjectTypeAttributeDefinition.Builder.of("process-state-listener",
> SimpleAttributeDefinitionBuilder.create(CLASS, ModelType.STRING, false)
> .setAllowExpression(false)
> .build(),
> SimpleAttributeDefinitionBuilder.create(MODULE, ModelType.STRING, false)
> .setAllowExpression(false)
> .build(),
> PROPERTIES)
> .setRestartAllServices()
> .setAllowNull(true)
> .build();
> public static final AttributeDefinition PROCESS_STATE_LISTENERS = ObjectListAttributeDefinition.Builder.of("listeners", PROCESS_STATE_LISTENER)
> .setAllowNull(false)
> .setRuntimeServiceNotRequired()
> .build();
> {noformat}
> I can create the resource from the CLI:
> {noformat}
> /subsystem=core-management/service=process-state-listeners:add(listeners=[{class=org.foo.Listener, module=org.foo,, properties = {foo = true, bar = ${bar.prop:2}}}])
> {"outcome" => "success"}
> {noformat}
> And the resource and its attribute is properly marshalled to the XML configuration:
> {noformat}
> <process-state-listeners>
> <listeners>
> <process-state-listener class="org.foo.Listener" module="org.foo">
> <properties>
> <property name="foo" value="true"/>
> <property name="bar" value="${bar.prop:2}"/>
> </properties>
> </process-state-listener>
> </listeners>
> </process-state-listeners>
> {noformat}
> However the resource can not be parsed and it fails with the exception:
> {noformat}
> 2016-09-27 14:57:35,285 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
> at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
> at org.jboss.as.server.ServerService.boot(ServerService.java:355)
> at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:303)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[118,25]
> Message: WFLYCTL0198: Unexpected element '{urn:jboss:domain:core-management:1.0}properties' encountered
> at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:89)
> at org.jboss.as.controller.parsing.ParseUtils.requireNoContent(ParseUtils.java:244)
> at org.jboss.as.controller.AttributeParser$5.parseElement(AttributeParser.java:197)
> at org.jboss.as.controller.PersistentResourceXMLDescription.parseAttributes(PersistentResourceXMLDescription.java:208)
> at org.jboss.as.controller.PersistentResourceXMLDescription.parseAttributeGroups(PersistentResourceXMLDescription.java:140)
> at org.jboss.as.controller.PersistentResourceXMLDescription.parse(PersistentResourceXMLDescription.java:117)
> at org.jboss.as.controller.PersistentResourceXMLDescription.parseChildren(PersistentResourceXMLDescription.java:258)
> at org.jboss.as.controller.PersistentResourceXMLDescription.parse(PersistentResourceXMLDescription.java:135)
> at org.wildfly.extension.management.CoreManagementSubsystemParser_1_0.readElement(CoreManagementSubsystemParser_1_0.java:77)
> at org.wildfly.extension.management.CoreManagementSubsystemParser_1_0.readElement(CoreManagementSubsystemParser_1_0.java:50)
> at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
> at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69)
> at org.jboss.as.server.parsing.StandaloneXml_5.parseServerProfile(StandaloneXml_5.java:591)
> at org.jboss.as.server.parsing.StandaloneXml_5.readServerElement(StandaloneXml_5.java:245)
> at org.jboss.as.server.parsing.StandaloneXml_5.readElement(StandaloneXml_5.java:144)
> at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:107)
> at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
> at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
> at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
> at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
> ... 3 more
> {noformat}
> The code in org.jboss.as.controller.AttributeParser#parseElement:197 to parse a list of objects assumes that the object's value are all represented by XML attributes. In my case, that's not correct as the "properties" attribute is represented by XML elements.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (WFCORE-1164) Warning about private module use issued twice
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1164?page=com.atlassian.jira.plugi... ]
RH Bugzilla Integration commented on WFCORE-1164:
-------------------------------------------------
Ivo Hradek <ihradek(a)redhat.com> changed the Status of [bug 1365668|https://bugzilla.redhat.com/show_bug.cgi?id=1365668] from ON_QA to VERIFIED
> Warning about private module use issued twice
> ---------------------------------------------
>
> Key: WFCORE-1164
> URL: https://issues.jboss.org/browse/WFCORE-1164
> Project: WildFly Core
> Issue Type: Bug
> Components: Server
> Reporter: Frank Langelage
> Assignee: Stuart Douglas
> Priority: Minor
> Fix For: 2.0.4.Final
>
> Attachments: test.war
>
>
> My web app is using some modules of WildFly AS which are not public.
> The warning about using private modules is issued twice for every module:
> 09.11. 22:07:34,088 WARN [org.jboss.as.dependency.private#start] WFLYSRV0018: Deployment "deployment.web-maj2e-langfr-dev.war" is using a private module ("org.jboss.common-core:main") which may be changed or removed in future versions without notice.
> 09.11. 22:07:34,090 WARN [org.jboss.as.dependency.private#start] WFLYSRV0018: Deployment "deployment.web-maj2e-langfr-dev.war" is using a private module ("org.jboss.common-core:main") which may be changed or removed in future versions without notice.
> 09.11. 22:07:34,091 WARN [org.jboss.as.dependency.private#start] WFLYSRV0018: Deployment "deployment.web-maj2e-langfr-dev.war" is using a private module ("org.apache.commons.collections:main") which may be changed or removed in future versions without notice.
> 09.11. 22:07:34,091 WARN [org.jboss.as.dependency.private#start] WFLYSRV0018: Deployment "deployment.web-maj2e-langfr-dev.war" is using a private module ("org.apache.commons.collections:main") which may be changed or removed in future versions without notice.
> 09.11. 22:07:34,092 WARN [org.jboss.as.dependency.private#start] WFLYSRV0018: Deployment "deployment.web-maj2e-langfr-dev.war" is using a private module ("org.apache.cxf.impl:main") which may be changed or removed in future versions without notice.
> 09.11. 22:07:34,094 WARN [org.jboss.as.dependency.private#start] WFLYSRV0018: Deployment "deployment.web-maj2e-langfr-dev.war" is using a private module ("org.apache.cxf.impl:main") which may be changed or removed in future versions without notice.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (WFCORE-1831) Build XML parser from a resource's pathElement
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1831?page=com.atlassian.jira.plugi... ]
Tomaz Cerar updated WFCORE-1831:
--------------------------------
Fix Version/s: 3.0.0.Alpha9
> Build XML parser from a resource's pathElement
> ----------------------------------------------
>
> Key: WFCORE-1831
> URL: https://issues.jboss.org/browse/WFCORE-1831
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Domain Management
> Affects Versions: 3.0.0.Alpha8
> Reporter: Jeff Mesnil
> Assignee: Tomaz Cerar
> Fix For: 3.0.0.Alpha9
>
>
> The current PersistentResourceXMLBuilder API requires to pass a ResourceDefinition to build the XML representation to parse and marshall. This requires to provides static ResourceDefinition which may be impratical if the resource model can be affected by the runtime state.
> The PersistentResourceXMLDescription only relies on the resourceDefinition's pathElement to know the "name" of the resource. The list of attributes to map to XML is provided explicitly to the builder.
> The PersistentResourceXMLBuilder API should be modified to use only a PathElement and remove its reference to resourceDefinition.
> For compatibility the current builder method with PersistentResourceDefinition must be kept and delegate to the new one.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (WFCORE-1831) Build XML parser from a resource's pathElement
by Jeff Mesnil (JIRA)
Jeff Mesnil created WFCORE-1831:
-----------------------------------
Summary: Build XML parser from a resource's pathElement
Key: WFCORE-1831
URL: https://issues.jboss.org/browse/WFCORE-1831
Project: WildFly Core
Issue Type: Enhancement
Components: Domain Management
Affects Versions: 3.0.0.Alpha8
Reporter: Jeff Mesnil
Assignee: Brian Stansberry
The current PersistentResourceXMLBuilder API requires to pass a ResourceDefinition to build the XML representation to parse and marshall. This requires to provides static ResourceDefinition which may be impratical if the resource model can be affected by the runtime state.
The PersistentResourceXMLDescription only relies on the resourceDefinition's pathElement to know the "name" of the resource. The list of attributes to map to XML is provided explicitly to the builder.
The PersistentResourceXMLBuilder API should be modified to use only a PathElement and remove its reference to resourceDefinition.
For compatibility the current builder method with PersistentResourceDefinition must be kept and delegate to the new one.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (WFCORE-1831) Build XML parser from a resource's pathElement
by Jeff Mesnil (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1831?page=com.atlassian.jira.plugi... ]
Jeff Mesnil reassigned WFCORE-1831:
-----------------------------------
Assignee: Tomaz Cerar (was: Brian Stansberry)
> Build XML parser from a resource's pathElement
> ----------------------------------------------
>
> Key: WFCORE-1831
> URL: https://issues.jboss.org/browse/WFCORE-1831
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Domain Management
> Affects Versions: 3.0.0.Alpha8
> Reporter: Jeff Mesnil
> Assignee: Tomaz Cerar
>
> The current PersistentResourceXMLBuilder API requires to pass a ResourceDefinition to build the XML representation to parse and marshall. This requires to provides static ResourceDefinition which may be impratical if the resource model can be affected by the runtime state.
> The PersistentResourceXMLDescription only relies on the resourceDefinition's pathElement to know the "name" of the resource. The list of attributes to map to XML is provided explicitly to the builder.
> The PersistentResourceXMLBuilder API should be modified to use only a PathElement and remove its reference to resourceDefinition.
> For compatibility the current builder method with PersistentResourceDefinition must be kept and delegate to the new one.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months