Configure Java Authentication and Authorization Service login

Java Authentication and Authorization Service (JAAS) is a collection of authentication APIs for programmatic login. WebSphere Application Server - Express has provided some extensions to JAAS:

Predefined JAAS login configurations are provided for applications to use. You can view the configurations in the WebSphere administrative console. Expand Security --> JAAS Configuration, and click Application Login. The following JAAS login configurations are available for use:

Note: Do not remove or delete the pre-defined JAAS login configurations. Deleting or removing them could cause other enterprise applications to fail.

A new JAAS login configuration can be added and modified using the administrative console. An application server restart is required for the changes to take effect at run time.

There are several locations within the WebSphere Application - Express Server directory structure where you can place a JAAS login module. The following list provides locations for the JAAS login module in order of recommendation:

Perform these steps in the administrative console to configure a new JAAS login:

  1. Click Security in the navigation tree.
  2. Click JAAS Configuration --> Application Logins.
  3. Click New. The Application Login Configuration panel appears.
  4. Specify the alias name of the new JAAS login configuration and click Apply. This is the name of the login configuration that you pass in the javax.security.auth.login.LoginContext for creating a new LoginContext.
  5. Click JAAS Login Modules.
  6. Click New.
  7. Specify the Module Classname. It is recommended that you specify WebSphere Proxy LoginModule because of the limitation of the class loader visibility problem.
  8. Specify the LoginModule implementation as the delegate property of the Proxy LoginModule. The WebSphere Proxy LoginModule classname is com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy.
  9. Select Authentication Strategy from the drop down list and click Apply.
  10. Click Custom Properties. This will navigate to the Custom Properties panel for the selected LoginModule.
  11. Create a new property with the name delegate with the value being the real LoginModule implementation. You can specify other properties like debug with value true. These properties are passed to the LoginModule as options to initialize() method of the LoginModule.
  12. Click Save.

Change the plain text file

WebSphere Application Server - Express supports the default JAAS login configuration format (plain text file) provided by the JAAS default implementation. However, there is no tool provided to edit plain text files in this format. You can define the JAAS login configuration in the plain text file wsjaas.conf (which is located in the properties subdirectory of your instance root, for example /QIBM/UserData/WebASE51/ASE/instance/properties), any syntax errors can cause the plain JAAS Login Configuration text file to not parse correctly. This could cause other applications to fail.

Java client programs that use JAAS for authentication must be invoked with a JAAS configuration file specified. This configuration file is set in the launchClient script. If the launchClient script is not used to invoke the Java client program, ensure that the appropriate JAAS configuration file is passed to the Java virtual machine with the -Djava.security.auth.login.config flag.

For more information about editing the plain-text JAAS configuration file, see JAAS 1.0 Developer's Guide Link outside Information Center.

Restart the application servers to validate changes to the plain text file.