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

RunAsPrincipal from Servlet not propagated to secured EJB

XMLWordPrintable

    • Hide

      In the resulting server.log, we can see:

      INFO  [org.jboss.playground.SimpleRemoteBean] (default task-1) Hello WildFly!
      INFO  [org.jboss.playground.SimpleRemoteBean] (default task-1) EJBContext: caller principal [roles=[playground-user],principal=anonymous], is playground-user: true
      
      Show
      Unzip the attached playground.zip build the project using Maven copy the application to a freshly unzipped WildFly server to $JBOSS_HOME/standalone/deployments start the server with the standard configuration ( standalone.xml ) call the URL http://localhost:8080/playground-app-web/playground In the resulting server.log , we can see: INFO [org.jboss.playground.SimpleRemoteBean] (default task-1) Hello WildFly! INFO [org.jboss.playground.SimpleRemoteBean] (default task-1) EJBContext: caller principal [roles=[playground-user],principal=anonymous], is playground-user: true
    • Undefined
    • ---
    • ---

      In a single enterprise application (ear) with a web module and a ejb module, a call from a Servlet annotated with @RunAsPrincipal(...) and @RunAs(...) to a secured SLSB does not propagate the principal to the EJB.

      See the explanations in the Steps to Reproduce section for more details

              rhn-engineering-lgao Lin Gao
              rhn-support-jbaesner Joerg Baesner
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: