[jboss-jira] [JBoss JIRA] (WFLY-12302) CallerPrincipal will be anonymous (randomly) if EJB2 is called

Wolf-Dieter Fink (Jira) issues at jboss.org
Thu Jul 18 10:38:04 EDT 2019


Wolf-Dieter Fink created WFLY-12302:
---------------------------------------

             Summary: CallerPrincipal will be anonymous (randomly) if EJB2 is called
                 Key: WFLY-12302
                 URL: https://issues.jboss.org/browse/WFLY-12302
             Project: WildFly
          Issue Type: Bug
          Components: EJB
    Affects Versions: 17.0.1.Final
            Reporter: Wolf-Dieter Fink
            Assignee: Cheng Fang


An EJB application which call an EJB2 SLSB will fail (randomly) to show the correct user if getCallerPrincipal is used inside. Also the roles are not set.

The EJB2 Bean is secured by ejb-jar.xml so it is not expected that it will be called without role
  <assembly-descriptor>
    <method-permission>
      <role-name>testRole</role-name>
      <method>
        <ejb-name>simpleejb.server.SomeEJB2Bean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>*</method-name>
      </method>
    </method-permission>

This error is constant seen if the server is up and running but each restart will change the behaviour randomly.
Note that an EJB3 bean of the same EAR file will work always correctly.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list