Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-7656

[SET] (7.0.z) WebSocketTestCase fails with security manager

XMLWordPrintable

    • EAP 7.0.5

      On our CI we see failures in the WebSocketTestCase when run with the security manager enabled.

      $mvn clean install -pl testsuite/integration/web/ -Dsecurity.manager=true

      The stacktrace of the failure:

      testWebSocket(org.jboss.as.test.integration.web.websocket.WebSocketTestCase)  Time elapsed: 0.314 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 "null")
      	at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
      	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:419)
      	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.connect(WebSocketClient.java:313)
      	at io.undertow.websockets.jsr.ServerWebSocketContainer.connectToServerInternal(ServerWebSocketContainer.java:446)
      	at io.undertow.websockets.jsr.ServerWebSocketContainer.connectToServerInternal(ServerWebSocketContainer.java:440)
      	at io.undertow.websockets.jsr.ServerWebSocketContainer.connectToServer(ServerWebSocketContainer.java:200)
      	at org.jboss.as.test.integration.web.websocket.WebSocketTestCase.testWebSocket(WebSocketTestCase.java:52)
      

              istudens@redhat.com Ivo Studensky
              istudens@redhat.com Ivo Studensky
              Peter Mackay Peter Mackay
              Peter Mackay Peter Mackay
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: