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

Test JpaDsRestartTestCase fails with security manager

XMLWordPrintable

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

      org.jboss.as.test.integration.jpa.dsrestart (1)
          JpaDsRestartTestCase.testRestartDataSource 
      
      java.security.AccessControlException: WFSM000001: Permission check failed (permission "("org.jboss.as.controller.security.ControllerPermission" "canAccessModelController")" in code source "(vfs:/content/dsrestartjpa.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.dsrestartjpa.war" from Service Module Loader")
      	at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:294)
      	at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:191)
      	at org.jboss.as.controller.AbstractControllerService.getValue(AbstractControllerService.java:621)
      	at org.jboss.as.controller.AbstractControllerService.getValue(AbstractControllerService.java:77)
      	at org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1110)
      	at org.jboss.as.test.integration.jpa.dsrestart.JpaDsRestartTestCase.toggleDataSource(JpaDsRestartTestCase.java:102)
      	at org.jboss.as.test.integration.jpa.dsrestart.JpaDsRestartTestCase.testRestartDataSource(JpaDsRestartTestCase.java:86)
      	...
      

      It looks to me as valid requirement for code running in container using ModelController to have granted permission to do so. In this case code is test running in container. Not sure how permission can be granted in that case.

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

              rhn-cservice-bbaranow Bartosz Baranowski
              mchoma@redhat.com Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: