[jboss-jira] [JBoss JIRA] (WFLY-10385) TransactionInflowTestCase does not function correctly under security manager

David Lloyd (JIRA) issues at jboss.org
Thu May 31 09:42:02 EDT 2018


     [ https://issues.jboss.org/browse/WFLY-10385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Lloyd updated WFLY-10385:
-------------------------------
    Labels: security-manager  (was: )


> TransactionInflowTestCase does not function correctly under security manager
> ----------------------------------------------------------------------------
>
>                 Key: WFLY-10385
>                 URL: https://issues.jboss.org/browse/WFLY-10385
>             Project: WildFly
>          Issue Type: Bug
>          Components: Test Suite
>            Reporter: David Lloyd
>            Assignee: Ondra Chaloupka
>              Labels: security-manager
>             Fix For: 13.0.0.Beta1, 13.0.0.Final
>
>
> Proactively assigning to [~ochaloup] as he is the original test author; feel free to adjust as necessary.
> {{org.jboss.as.test.integration.transaction.inflow.TransactionInflowTestCase}} does not function correctly under a security manager.  The stack trace is like this:
> {noformat}
> Breakpoint reached
> 	  at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:295)
> 	  at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:192)
> 	  at java.lang.SecurityManager.checkConnect(SecurityManager.java:1048)
> 	  at org.wildfly.security.manager.WildFlySecurityManager.checkConnect(WildFlySecurityManager.java:390)
> 	  at java.net.InetAddress.getLocalHost(InetAddress.java:1477)
> 	  at org.jboss.as.test.integration.transaction.inflow.TransactionInflowXid.getXid(TransactionInflowXid.java:128)
> 	  at org.jboss.as.test.integration.transaction.inflow.TransactionInflowXid.getUniqueXid(TransactionInflowXid.java:102)
> 	  at org.jboss.as.test.integration.transaction.inflow.TransactionInflowResourceAdapter.endpointActivation(TransactionInflowResourceAdapter.java:65)
> 	  at org.jboss.jca.core.rar.EndpointImpl.activate(EndpointImpl.java:194)
> 	  at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.activate(MessageDrivenComponent.java:277)
> 	  at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:235)
> 	  at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54)
> 	  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	  at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> 	  at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> 	  at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> 	  at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> 	  at java.lang.Thread.run(Thread.java:748)
> 	  at org.jboss.threads.JBossThread.run(JBossThread.java:485)
> Perm = ("java.net.SocketPermission" "behemoth.local" "resolve"), CS = (vfs:/content/inflow-txn-ra.rar/inflow-txn-inside.jar <no signer certificates>), CL = ModuleClassLoader for Module "deployment.inflow-txn-ra.rar" from Service Module Loader, ID = 824b419
> {noformat}
> The cause is that {{org.jboss.as.test.integration.transaction.inflow.TransactionInflowXid#getXid}} calls {{java.net.InetAddress#getLocalHost}} which requires a security manager permission.  If the permission is denied (which it always is when running under a security manager), then it falls back through a {{catch (Exception ex)}} to a bogus IP address of "1.2.3.4".
> For correct operation, the test archives which use this method should have the {{"*"}} {{"resolve"}} {{SocketPermission}} granted to them.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list