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

No caller principal in new thread created from EJB (elytron)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 11.0.0.Alpha1
    • Fix Version/s: 11.0.0.Beta1
    • Component/s: Security
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      mvn clean install -Delytron -DallTests -Dwildfly.tmp.enable.elytron.profile.tests=true -pl testsuite/integration/basic -Dtest=org.jboss.as.test.integration.ee.concurrent.DefaultManagedThreadFactoryTestCase
      
      Show
      mvn clean install -Delytron -DallTests -Dwildfly.tmp.enable.elytron.profile.tests= true -pl testsuite/integration/basic -Dtest=org.jboss.as.test.integration.ee.concurrent.DefaultManagedThreadFactoryTestCase

      Description

      When elytron profile of testsuite enabled, DefaultManagedThreadFactoryTestCase fails, because caller principal is not passed into new thread:

      java.lang.IllegalStateException: the caller principal anonymous is not the expected guest
      (TestEJBRunnable.java:70)
      

      Lets have:

      new InitialContext().lookup("java:comp/EJBContext").getCallerPrincipal()
      
      • On DefaultManagedThreadFactoryTestEJB:63 (in EJB, but outside of new thread yet) it gives correctly "guest".
      • On DefaultManagedThreadFactoryTestEJB:70 (inside Runnable) it gives "anonymous".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              honza889 Jan Kalina (Inactive)
              Reporter:
              honza889 Jan Kalina (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: