Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9290

Some MDBTestCase tests fail with security manager

    Details

    • Steps to Reproduce:
      Hide

      cd wildfly/testsuite/integration/basic
      mvn clean test -Dtest=org.jboss.as.test.integration.ejb.mdb.MDBTestCase#testSuspendResumeWithMDB -Dsecurity.manager
      mvn clean test -Dtest=org.jboss.as.test.integration.ejb.mdb.deliveryactive.MDBTestCase -Dsecurity.manager

      Show
      cd wildfly/testsuite/integration/basic mvn clean test -Dtest=org.jboss.as.test.integration.ejb.mdb.MDBTestCase#testSuspendResumeWithMDB -Dsecurity.manager mvn clean test -Dtest=org.jboss.as.test.integration.ejb.mdb.deliveryactive.MDBTestCase -Dsecurity.manager

      Description

      Some MDBTestCase tests fail with security manager because of missing permission "("java.io.FilePermission" "/home/okotek/git/wildfly/testsuite/integration/basic/target/jbossas/standalone/tmp/auth/local4437638380092046127.challenge" "read")":

      java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://127.0.0.1:9990. The connection failed
      	at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:149)
      	at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:75)
      	at org.jboss.as.test.integration.ejb.mdb.MDBTestCase.testSuspendResumeWithMDB(MDBTestCase.java:177)
      ...
      
      Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed:
         JBOSS-LOCAL-USER: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.io.FilePermission" "/home/okotek/git/wildfly/testsuite/integration/basic/target/jbossas/standalone/tmp/auth/local8043361973857375326.challenge" "read")" in code source "(vfs:/content/MDBTestCase.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.MDBTestCase.jar" from Service Module Loader")
      	at org.jboss.remoting3.remote.ClientConnectionOpenListener.allMechanismsFailed(ClientConnectionOpenListener.java:109)
      	at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:442)
      	at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:242)
      	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
      	at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
      	at org.xnio.nio.WorkerThread.run(WorkerThread.java:571)
      	at ...asynchronous invocation...(Unknown Source)
      	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:570)
      	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:532)
      	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:520)
      	at org.jboss.as.protocol.ProtocolConnectionUtils.connect(ProtocolConnectionUtils.java:204)
      	at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:120)
      	... 157 more
      	Suppressed: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.io.FilePermission" "/home/okotek/git/wildfly/testsuite/integration/basic/target/jbossas/standalone/tmp/auth/local8043361973857375326.challenge" "read")" in code source "(vfs:/content/MDBTestCase.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.MDBTestCase.jar" 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.checkRead(SecurityManager.java:888)
      		at org.wildfly.security.manager.WildFlySecurityManager.checkRead(WildFlySecurityManager.java:350)
      		at java.io.FileInputStream.<init>(FileInputStream.java:127)
      		at org.wildfly.security.sasl.localuser.LocalUserClient.evaluateMessage(LocalUserClient.java:93)
      		at org.wildfly.security.sasl.util.AbstractSaslParticipant.evaluateMessage(AbstractSaslParticipant.java:180)
      		at org.wildfly.security.sasl.util.AbstractSaslClient.evaluateChallenge(AbstractSaslClient.java:59)
      		at org.wildfly.security.sasl.util.AbstractDelegatingSaslClient.evaluateChallenge(AbstractDelegatingSaslClient.java:54)
      		at org.wildfly.security.sasl.util.PrivilegedSaslClient.lambda$evaluateChallenge$0(PrivilegedSaslClient.java:55)
      		at java.security.AccessController.doPrivileged(Native Method)
      		at org.wildfly.security.sasl.util.PrivilegedSaslClient.evaluateChallenge(PrivilegedSaslClient.java:55)
      		at org.jboss.remoting3.remote.ClientConnectionOpenListener$Authentication.lambda$handleEvent$0(ClientConnectionOpenListener.java:646)
      		at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:926)
      		... 3 more
      

      Adding the missing permission helps.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  soul2zimate Chao Wang
                  Reporter:
                  okotek Ondrej Kotek
                  Tester:
                  Ondrej Kotek
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: