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

MicroProfile tests failing with security manager

    XMLWordPrintable

Details

    • Hide

      cd wildfly/testsuite/integration/basic
      mvn clean test -Dtest=MicroProfileConfigTestCase -Dsecurity.manager -DtestLogToFile=false

      Show
      cd wildfly/testsuite/integration/basic mvn clean test -Dtest=MicroProfileConfigTestCase -Dsecurity.manager -DtestLogToFile=false

    Description

      org.wildfly.test.integration.microprofile.config.smallrye.app (9)
          MicroProfileConfigTestCase.testGetBooleanProperties  	
          MicroProfileConfigTestCase.testGetDoubleProperties  	
          MicroProfileConfigTestCase.testGetFloatProperties  	
          MicroProfileConfigTestCase.testGetIntegerProperties  	
          MicroProfileConfigTestCase.testGetLongProperties  	
          MicroProfileConfigTestCase.testGetWithArraySetListDefaultProperties  	
          MicroProfileConfigTestCase.testGetWithArraySetListOverriddenProperties  	
          MicroProfileConfigTestCase.testGetWithConfigProperties  	
          MicroProfileConfigTestCase.testPriorityOrderingProperties  	
      org.wildfly.test.integration.microprofile.config.smallrye.converter (1)
          MicroProfileConfigConvertersTestCase.testConverterPriority  	
      org.wildfly.test.integration.microprofile.config.smallrye.management.config_source (1)
          ConfigSourceFromClassTestCase.testGetWithConfigProperties  	
      org.wildfly.test.integration.microprofile.config.smallrye.management.config_source_provider (1)
          ConfigSourceProviderFromClassTestCase.testGetWithConfigProperties 
      

      With MicroProfileConfigTestCase there is error

      12:01:38,872 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /MicroProfileConfigTestCase/microprofile/arraySetListDefaultTest: org.jboss.resteasy.spi.UnhandledException: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "getenv.myPets")" in code source "(vfs:/content/MicroProfileConfigTestCase.war/WEB-INF/classes <no signer certificates>)" of "null")
      	at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:78)
      	at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:222)
      	at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:197)
      	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:459)
      	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:233)
      	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:139)
      	at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
      	at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:142)
      	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:219)
      	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
      	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
      	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
      	at io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:55)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      

      So probably solution is to add such permissions to rs application TestApplication.

      For other tests (MicroProfileConfigConvertersTestCase, ConfigSourceFromClassTestCase, ConfigSourceProviderFromClassTestCase) this exception is not printed, but I think cause will be the same as the structure of these tests is the same

      [1] https://ci.wildfly.org/viewLog.html?buildId=128138&buildTypeId=WF_MasterSecurityManager

      Attachments

        Issue Links

          Activity

            People

              jperkins-rhn James Perkins
              mchoma@redhat.com Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: