wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Getting the JAAS Subject from an session bean. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Getting the JAAS Subject from an session bean." Watch "Getting the JAAS Subject from an session bean." New topic
Author

Getting the JAAS Subject from an session bean.

Martin Coetzee
Greenhorn

Joined: Dec 02, 2003
Posts: 21
Hi Guys!!
I've created my own JAAS principal, and attached it to an existing subject's principals in the web container. How do we access the subject from the EJB container? The standard sessionctx.getUserPrincipal() from the session bean only returns ONE principal.
I'd appreciate any help!
Regards
Martin Coetzee & Dean James-Everett (Sunny South Africa)
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Hello Martin -
I'm going to move this up to the EJB forum and see if you don't get a few more responses.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Here's a dirty little secret -- JAAS is NOT integrated with the J2EE specifications in this way. I'm not sure you CAN retrieve the extra principals in the EJB container -- it would vary on your container, and some containers probably won't allow it...
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
jQuery in Action, 2nd edition
 
subject: Getting the JAAS Subject from an session bean.
 
Similar Threads
JAAS Application to secure EJB
JAAS Subjects, Principals
ejb-jar.xml roles and Principals - PLEASE HELP!
Client Side Authentication
Stateless or statefull session bean