SessionContext.getCallerPrincipal not returning custom Principal on JBoss

Solution Verified - Updated -

Issue

  • We have created a custom login module and return a custom principal class. When we call SessionContext.getCallerPrincipal() from inside an EJB, it returns a SimplePrincipal not our custom class.

    <module-option name="principalClass">example.CustomPrincipal</module-option>
    

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.1.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content