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

Test DefaultElytronEjbSecurityDomainTestCase fails with security manager

    Details

    • Steps to Reproduce:
      Hide
      cd wildfly/testsuite/integration/elytron
      mvn clean test -Dtest=DefaultElytronEjbSecurityDomainTestCase -Dsecurity.manager -DtestLogToFile=false
      
      Show
      cd wildfly/testsuite/integration/elytron mvn clean test -Dtest=DefaultElytronEjbSecurityDomainTestCase -Dsecurity.manager -DtestLogToFile=false

      Description

      org.wildfly.test.integration.elytron.ejb (1)
          DefaultElytronEjbSecurityDomainTestCase.testSecurityOnTwoBeansInAbsenceOfExplicitSecurityDomain 
      
      java.security.AccessControlException: WFSM000001: Permission check failed (permission "("org.wildfly.security.permission.ElytronPermission" "authenticate")" in code source "(vfs:/content/ejb-security-domain-test.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.ejb-security-domain-test.jar" 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.wildfly.security.auth.server.SecurityDomain.authenticate(SecurityDomain.java:304)
      	at org.wildfly.security.auth.server.SecurityDomain.authenticate(SecurityDomain.java:285)
      	at org.jboss.as.test.shared.integration.ejb.security.Util.switchIdentity(Util.java:242)
      	at org.jboss.as.test.shared.integration.ejb.security.Util.switchIdentity(Util.java:206)
      	at org.jboss.as.test.shared.integration.ejb.security.Util.switchIdentitySCF(Util.java:302)
      	at org.wildfly.test.integration.elytron.ejb.DefaultElytronEjbSecurityDomainTestCase.testSecurityOnTwoBeansInAbsenceOfExplicitSecurityDomain(DefaultElytronEjbSecurityDomainTestCase.java:104)
      

      That helps

      diff --git a/testsuite/integration/elytron/src/test/java/org/wildfly/test/integration/elytron/ejb/DefaultElytronEjbSecurityDomainTestCase.java b/testsuite/integration/elytron/src/test/java/org/wildfly/test/integration/elytron/ejb/DefaultElytronEjbSecurityDomainTestCase.java
      index dee5422a40..48d077595d 100644
      --- a/testsuite/integration/elytron/src/test/java/org/wildfly/test/integration/elytron/ejb/DefaultElytronEjbSecurityDomainTestCase.java
      +++ b/testsuite/integration/elytron/src/test/java/org/wildfly/test/integration/elytron/ejb/DefaultElytronEjbSecurityDomainTestCase.java
      @@ -79,7 +79,7 @@ public class DefaultElytronEjbSecurityDomainTestCase {
                       .addAsResource(currentPackage, "users.properties", "users.properties")
                       .addAsResource(currentPackage, "roles.properties", "roles.properties")
                       .addAsManifestResource(currentPackage, "jboss-ejb3.xml", "jboss-ejb3.xml")
      -                .addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain")), "permissions.xml");
      +                .addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate")), "permissions.xml");
           }
      

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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jucook Justin Cook
                  Reporter:
                  mchoma Martin Choma
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: