aspose file tools
The moose likes Security and the fly likes Create JAAS Subject Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » Security
Reply Bookmark "Create JAAS Subject" Watch "Create JAAS Subject" New topic
Author

Create JAAS Subject

Smith Zac
Greenhorn

Joined: Jan 20, 2010
Posts: 2
Hello Everybody,
I would like to create a JAAS Subject through my java web application. Can some one please provide a sample code or a link where I could read more regd the steps required for the creation of a JAAS Subject in a Web Application . I will be deploying the application in a Webshere App Server. Any help would be greatly appreciated.

Thanks.
Smith.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32421
Welcome to JavaRanch.

Normally you'd get the Subject from the LoginContext after a successful authentication; see http://java.sun.com/developer/JDCTechTips/2001/tt0727.html for an example. You'll need to configure WebSphere accordingly (meaning, it needs to be told where JAAS can find user information, whether in a DB, or LDAP, or elsewhere).


Android appsImageJ pluginsJava web charts
Smith Zac
Greenhorn

Joined: Jan 20, 2010
Posts: 2
Hi Ulf,
I appreciate the response provided and also for the link. You are right, we need to go against the DB or LDAP. Basically I have created a custom Login Module and inside the login() method I was going against a DB to get the user Authenticated and finallay I was able to get a JAAS Subject created. But now I need to pass this JAAS Subject from one application to another application residing on a different App Server ? How can this be done. Any ideas ?

-Thanks.
Smith
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32421
That sounds like a single sigh-on (SSO) solution is called for. There was some discussion on this in http://www.coderanch.com/t/134584/Security/Understanding-JAAS-Web-app-SSO.
 
 
subject: Create JAAS Subject
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture