Dan Moore
Consultant
Seurat Company
July 11, 2002
• Overview of Struts
• Java Authentication and Authorization Service (JAAS)
• JAAS Authentication
• Integration with Struts
• Default JAAS Authorization
• Integration with Struts
• Situations where JAAS is useful/not useful
• About my experience
• What is Struts
• Architecture
• Sample Struts-config.xml
• Example application
• Definitions
• Configuration
• Typical use
• Integration with example application
• Code
• User
• Subject
• Principal
• Login module
• Login module set
• Configuration file
• Tokens in configuration file
• Required/optional/sufficient/necessary
• Can replace class that reads this file
• Tagish Login Module
• File based
• GPL
• Could write your own, see resources
• JVM awareness
• 1.3 class loader issues
• System property: java.security.auth.login.config
• java.security file
• Create LoginContext
• Login module set name
• Callbackhandler
• Interact with User
• Try to login
• May repeat if need be
• If login successful, Subject is an attribute of LoginContext
• If login unsuccessful, exception thrown
• Caveat
• Definitions
• Java security
• Configuration
• Typical Use
• Integration with example application
• Code
• Resource
• Permission
• Three components
• Class, resource and action
• java.io.FilePermission “/tmp” “read”
• Basic permission/Permission
• Principals
• Security Manager
• On pluggability
• Situations where JAAS is a good fit
• Situations where JAAS is not
• Overused term
• 2 kinds of pluggability
• Class which reads configuration
• Configuration file itself
• Login modules
• Permissions
• Struts:
• http://jakarta.apache.org/struts
• Write your own login module:
• http://java.sun.com/security/jaas/doc/module.html
• Pick up some free ones
• http://free.tagish.net/jaas/doc.html
• Java security
• Java Security by Scott Oaks
• Write your own authentication system:
• http://www-106.ibm.com/developerworks/library/j-jaas/?n-j-442
• Paper this talk is based upon:
• http://mooreds.com/jaas.html
• Sample code that works with struts
• http://mooreds.com/jaas-example.tar.gz