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

Non-anonymous principal is not propagated from EJB context to CDI bean

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Critical
    • None
    • 14.0.1.Final, 15.0.1.Final
    • CDI / Weld, Security
    • None
    • Hide

      Run the test: mvn test -Dtest=InjectPrincipalTestCase

      Repo: git@github.com:nziakova/wildfly.git
      Branch: wfly11587-followup

      Show
      Run the test: mvn test -Dtest=InjectPrincipalTestCase Repo: git@github.com:nziakova/wildfly.git Branch: wfly11587-followup

    Description

      This is a follow-up on WFLY-11587 which only dealt with being able to inject the principal.

      However, during testing I have tried a scenario when the caller principal was not anonymous (run-as-principal setting in jboss-ejb3.xml). See the test case in this commit.

      The principal is not propagated from the EJB context. The result is that injected principal in the CDI bean is always anonymous, although ctx.getCallerPrincipal() in the EJB returns correct principal.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nziakova@redhat.com Nikoleta Ziakova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: