Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-20824

[GSS](7.4.z) WFLY-14307 - RunAsPrincipal from Servlet not propagated to secured EJB

XMLWordPrintable

    • False
    • False
    • Undefined
    • 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

      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

       RunAsPrincipal is only for EJB components (not a Servlet), this Jira is to see if we can log a WARN indicating that @RunAsPrincipal will have no effect when specified on a Servlet.

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

              Created:
              Updated:
              Resolved: