This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Security and the fly likes A couple of questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Security
Bookmark "A couple of questions" Watch "A couple of questions" New topic
Author

A couple of questions

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Hi:

I have a couple of questions about authentication.

1) <realm-name> is ignored if <auth-method> is FORM. In that case, what realm does FORM authenticate against?

2) Can a JAAS Login Module be used as a realm in FORM authentication? If so, how does the container know to assocaite a realm with the FORM authentication?

3) Assuming 2) is true, do the Principal objects created by the login module get saved automatically in the session?

Hope I was clear enough. Thanks.

Eric
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
As to #1, the realm name isn't used anywhere, but is it really ignored? (I'm not sure, but I could envision it being used behind the scenes.)

As to #2, realms are set up in the server.xml file. Which realm is used makes no difference to the kind of authentication being used.

As to #3, Principals are not saved in sessions, but they are being made available by the server through a method in the HttpServletRequest object.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: A couple of questions
 
It's not a secret anymore!