This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Security and the fly likes What does using JAAS buy me? 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 » Engineering » Security
Bookmark "What does using JAAS buy me?" Watch "What does using JAAS buy me?" New topic
Author

What does using JAAS buy me?

Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 199
Hi Guys,


I've got some security related Qs that I wannaa discuss with you. Please help me out with your suggestions as to how to implement security in a EE application and what role JAAS plays in that.

I'm working on spring, hibernate based app in JBOSS server. As the application is in its early days, it is high time that we are discussing the security implementation we must use for the application. I've implemented declarative security(web.xml and jboss-web.xml and <application-policy> and all that ) with roles defined in the web.xml. I know JBOSS is using JAAS under the hood to carry out the authentication.
So, my first question is, should we rely on app server provided security or better implement our own custom JAAS login module based on Data base? We are using ZK for presentation and some how we are having some issue with way Login page is rendered to the user if we use declarative security(j_security_check).

So, what JBOSS or any app server for that matter does is to get the login info and authenticate using provided JAAS module. Can't I do that on my own? Why to go with the app server provided security? Does the app server do something extra to secure the application?


Also, I have searched a bit about LDAP server being used as a secured server. What does using JAAS and LDAP together buy me instead of using just a database and JAAS?

I am still new to these things and have just been put on a project that is built from scratch so please bear with me.

Also, I would like to have expert opinions about the security in a EE application and how to go about it considering the security is base don Users, Roles and ....well, Passwords

Thanks !!!

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41127
    
  45
my first question is, should we rely on app server provided security or better implement our own custom JAAS login module based on Data base?

If the app server-provided security does it all you need it to do, then it seems less work to use that instead of rolling your own.

we are having some issue with way Login page is rendered to the user if we use declarative security (j_security_check).

What issues are those?

what JBOSS or any app server for that matter does is to get the login info and authenticate using provided JAAS module. Can't I do that on my own? Why to go with the app server provided security? Does the app server do something extra to secure the application?

Sure you can roll your own. But security is tricky stuff, and it's almost always better to use something that is debugged already (assuming that it does everything you need it to do).

What does using JAAS and LDAP together buy me instead of using just a database and JAAS?

LDAP repositories are generally already in place, since they're being used by other parts of the enterprise infrastructure (like for a company directory, email, ...). If that's not the case in your scenario, then it's probably easier to go with a DB.

I would like to have expert opinions about the security in a EE application and how to go about it considering the security is base don Users, Roles and ....well, Passwords

The SecurityFaq has a number of links that should provide an overview of what Java security can and can not do, and how to use it for particular purposes. It also links to general articles about security subjects that should be of interest.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What does using JAAS buy me?
 
Similar Threads
Login servlet
LDAP login module for jaas configuration
LDAP login module for jaas configuration in WAS6.1.0.31
When to not use EJB
RBAC (Role based access)