Thursday, September 25, 2008

User Managers in Oracle JAAS

The user manager contains definitions for users,groups or roles. The default user manager is JAZNUserManager. 
You can define user manager for all applications or for specific applications.
  • Global User Manager : The instance user manager defined in application.xml file
  • Specific User Manager: This user manager is defined in orion_application.xml solely for a single application
How to specify a user manager in orion-application.xml?
There are 3 elements that can be used to specify a UserManager.
  • <user-manager> - A user manager implemented by a user-defined class
  • <jazn> - JAZNUserManager
  • <principals> - A user manager defined in a principals.xml file
There may be more than one of the user-manager configuration within a single <orionapplication> element. Which element determines the UserManager is determined by the order the elements appear i.e. <user-manager> takes precedence over <jazn>, which takes precedence over <principals>.

If no user manager is specified, then the UserManager is determined according to the following rules,
  1. For the default application, a JAAS UserManager is created based on jazn-data.xml in the directory containing the application.xml file.If no jazn-data.xml is present in that directory, one is created. The default realm of the created jazn-data.xml file is jazn.com.
  2. At application deployment time, if the UserManager of the parent application is based on principals.xml, then the UserManager of the application will be a principals UserManager.
  3. At deployment time, if the UserManager of the parent application is the JAAS UserManager, then a JAAS UserManager is created based on jazn-data.xml

No comments:

Post a Comment