[jboss-jira] [JBoss JIRA] (WFLY-7539) WebSocketTestCase fails with security manager - disable test
Brian Stansberry (JIRA)
issues at jboss.org
Fri Mar 3 16:06:00 EST 2017
[ https://issues.jboss.org/browse/WFLY-7539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry updated WFLY-7539:
-----------------------------------
Fix Version/s: 10.2.0.Final
> WebSocketTestCase fails with security manager - disable test
> ------------------------------------------------------------
>
> Key: WFLY-7539
> URL: https://issues.jboss.org/browse/WFLY-7539
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Reporter: Kabir Khan
> Assignee: Darran Lofthouse
> Fix For: 10.2.0.Final, 11.0.0.Alpha1
>
>
> With the core 3.0.0.Alpha12 upgrade we see failures in the WebSocketTestCase when run with the security manager enabled.
> $mvn clean install -pl testsuite/integration/web/ -Dsecurity.manager=true
> For now I am adding a
> {code}
> Assume.assumeTrue(System.getSecurityManager() == null);
> {code}
> to skip this test when running with a security manager enabled. The failure when the test is run with a security manager is
> {code}
> testWebSocket(org.jboss.as.test.integration.web.websocket.WebSocketTestCase) Time elapsed: 0.227 sec <<< ERROR!
> java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.net.SocketPermission" "localhost:0" "listen,resolve")" in code source "(vfs:/content/websocket.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.websocket.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 java.lang.SecurityManager.checkListen(SecurityManager.java:1131)
> at org.wildfly.security.manager.WildFlySecurityManager.checkListen(WildFlySecurityManager.java:392)
> at sun.nio.ch.SocketChannelImpl.bind(SocketChannelImpl.java:582)
> at sun.nio.ch.SocketAdaptor.bind(SocketAdaptor.java:135)
> at org.xnio.nio.WorkerThread.openTcpStreamConnection(WorkerThread.java:263)
> at org.xnio.XnioIoThread.openStreamConnection(XnioIoThread.java:237)
> at org.xnio.XnioWorker.openStreamConnection(XnioWorker.java:342)
> at org.xnio.http.HttpUpgrade$HttpUpgradeState.doUpgrade(HttpUpgrade.java:247)
> at org.xnio.http.HttpUpgrade$HttpUpgradeState.access$100(HttpUpgrade.java:165)
> at org.xnio.http.HttpUpgrade.performUpgrade(HttpUpgrade.java:129)
> at io.undertow.websockets.client.WebSocketClient$ConnectionBuilder.connectImpl(WebSocketClient.java:323)
> at io.undertow.websockets.client.WebSocketClient$ConnectionBuilder.connect(WebSocketClient.java:211)
> at io.undertow.websockets.jsr.ServerWebSocketContainer.connectToServerInternal(ServerWebSocketContainer.java:463)
> at io.undertow.websockets.jsr.ServerWebSocketContainer.connectToServerInternal(ServerWebSocketContainer.java:457)
> at io.undertow.websockets.jsr.ServerWebSocketContainer.connectToServer(ServerWebSocketContainer.java:211)
> at org.jboss.as.test.integration.web.websocket.WebSocketTestCase.testWebSocket(WebSocketTestCase.java:52)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list