Web application fails to retrieve the Subject when using JAAS authentication in JWS Tomcat
Issue
-
After having authenticated the user properly by using JAAS (either through
JAASRealm
or a custom implementation), the web application fails to retrieve theSubject
object properly. This API call always returnsnull
:Subject.getSubject(AccessController.getContext())
Environment
- Red Hat Enterprise Linux (RHEL)
- 7
- Red Hat JBoss Web Server (JWS)
- Tomcat
- Security Manager
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.