JAAS and JBOSS 5 problem with principal
-
18-09-2019 - |
Question
I am working with a piece of code implementing JAAS LoginModule and in the commit method I set the principal with user UUID:
subject.getPrincipals().add(new SimplePrincipal(userUUID)
But for some reason when I access the user from EJB Context:
context.getCallerPrincipal().getName()
I receive the login name of the user instead of the userUUID I was expecting.
Should I implement custom principal or how to solve this?
Thank you!
Solution 2
Could be a JBoss 5 bug after all: https://jira.jboss.org/jira/browse/EJBTHREE-1756
Fixed 11. Feb 2010, now waiting a next JBoss release :-)
OTHER TIPS
The following workaround seems to work:
- Get a copy of JBoss 6.0.0.Final
- Copy the file $JBOSS_HOME/common/lib/jboss-ejb3-security.jar to the JBoss 5.1 installation directory.
- Restart JBoss
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow