Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-4253

SNICombinedWithALPNTestCase fails with security manager on Java 11

    XMLWordPrintable

Details

    • Hide

      set Java 11
      cd testsuite/standalone
      mvn clean test -Dtest=SNICombinedWithALPNTestCase -Dsecurity.manager

      Show
      set Java 11 cd testsuite/standalone mvn clean test -Dtest=SNICombinedWithALPNTestCase -Dsecurity.manager

    Description

      org.jboss.as.test.integration.security.ssl.sni.SNICombinedWithALPNTestCase fails with security manager on Java 11 due to missing permissions:

      [ERROR] Failure when constructing test  Time elapsed: 0.029 s  <<< FAILURE!
      java.lang.AssertionError: 
      Failed to deploy test.jar: 10 assets: {"WFLYCTL0080: Failed services" => {"jboss.undertow-test-server" => "Failed to start service
          Caused by: java.lang.ExceptionInInitializerError
          Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"/home/okotek/test/asts-core-intermit/testsuite/standalone/target/wildfly-core/modules/system/layers/base/io/undertow/core/main/undertow-core-2.0.15.Final.jar\" \"read\")\" in code source \"(vfs:/content/test.jar <no signer certificates>)\" of \"ModuleClassLoader for Module \"deployment.test.jar\" from Service Module Loader\")"}}
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.jboss.as.test.integration.security.ssl.sni.SNICombinedWithALPNTestCase.deploy(SNICombinedWithALPNTestCase.java:414)
      	at org.jboss.as.test.integration.security.ssl.sni.SNICombinedWithALPNTestCase$Setup.setup(SNICombinedWithALPNTestCase.java:188)
      	at org.wildfly.core.testrunner.WildflyTestRunner.runSetupTasks(WildflyTestRunner.java:121)
      	at org.wildfly.core.testrunner.WildflyTestRunner.run(WildflyTestRunner.java:107)
      	at org.junit.runners.Suite.runChild(Suite.java:128)
      ...
      

      A customer should not be asked to add such permission for reading a module file, it brings bad UX and it could bring security flaws.

      Attachments

        Issue Links

          Activity

            People

              rhn-cservice-bbaranow Bartosz Baranowski
              okotek@redhat.com Ondrej Kotek
              Ondrej Kotek Ondrej Kotek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: