• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Create JAAS Subject

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Smith Zac
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That sounds like a single sigh-on (SSO) solution is called for. There was some discussion on this in https://coderanch.com/t/134584/Security/Understanding-JAAS-Web-app-SSO.
 
reply
    Bookmark Topic Watch Topic
  • New Topic