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

EJB with Elytron propagate identity even when it should not

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 11.0.0.Beta1
    • 11.0.0.Alpha1
    • Security
    • None
    • Hide
      mvn clean install -Dwildfly.tmp.enable.invocation.tests=true -DallTests -pl testsuite/integration/basic -Dtest=org.jboss.as.test.integration.ejb.security.RunAsPrincipalTestCase#testSingletonPostconstructSecurityNotPropagating
      
      Show
      mvn clean install -Dwildfly.tmp.enable.invocation.tests= true -DallTests -pl testsuite/integration/basic -Dtest=org.jboss.as.test.integration.ejb.security.RunAsPrincipalTestCase#testSingletonPostconstructSecurityNotPropagating

      In RunAsPrincipalTestCase#testSingletonPostconstructSecurityNotPropagating, when Elytron enabled, identity (including Admin role) is propagated into StatelessBBean:

      StatelessSingletonUseBean
      SimpleSingletonBean
      | check Admin in [Admin] (has required role)
      StatelessBBean
      

      In non-Elytron case the check is unsuccessful as test require, because identity is not propagated:

      StatelessSingletonUseBean
      SimpleSingletonBean
      | authorize
      EXCEPTION
       methodRoles = Admin
       securityContext.subjectInfo = anonymouse
      

      This is lack of WFLY-981 fix when Elytron used: Identity is propagated from @PostConstruct method.

              jkalina@redhat.com Jan Kalina (Inactive)
              jkalina@redhat.com Jan Kalina (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: