+

Search Tips   |   Advanced Search

Configure JAAS login modules using wsadmin.sh

Use the wsadmin tool to configure JAAS login entries that allow communication between realms in a multiple security domain environment.

We must meet the following requirements before configuring local operating system user registries:


Tasks

  1. Launch the wsadmin scripting tool using the Jython scripting language. See the Starting the wsadmin scripting client topic for more information.

  2. Configure a JAAS login module.

    Use the configureJAASLoginEntry command to configure a JAAS login entry in a security domain or in the global security configuration. Use this command to modify existing JAAS login entries or to create new login entries.

    Specify the following parameters to configure the JAAS login module:

    Parameter Description
    -loginEntryAlias Specifies an alias that identifies the JAAS login entry in the configuration. (String, required)
    -loginType Type of JAAS login entry of interest. Specify system for the system login type or application for the application login type. (String, required)
    -securityDomainName Name of the security configuration. If we do not specify a security domain name, the system updates the global security configuration. (String, optional)
    -loginModules Comma (,) separated list of login module class names. Specify the list in the order the system calls them. (String, optional)
    -authStrategies Optional. The authentication behavior as authentication proceeds down the list of login modules. (String, optional)

    Specify one or many of the following values in a comma (,) separated list:

    • REQUIRED

      That the LoginModule module is required to succeed. Whether authentication succeeds or fails, the process still continues down the LoginModule list for each realm.

    • REQUISITE

      That the LoginModule module is required to succeed. If authentication is successful, the process continues down the LoginModule list in the realm entry. If authentication fails, control immediately returns to the application. Authentication does not proceed down the LoginModule list.

    • SUFFICIENT

      That the LoginModule module is not required to succeed. If authentication succeeds, control immediately returns to the application. Authentication does not proceed down the LoginModule list. If authentication fails, the process continues down the list.

    • OPTIONAL

      That the LoginModule module is not required to succeed. Whether authentication succeeds or fails, the process still continues down the LoginModule list.

    Use the configureJAASLoginEntry command to configure the JAAS login module...

      AdminTask.configureJAASLoginEntry('[-securityDomainName testDomain -loginType application -loginEntryAlias testLoginEntry -loginModules "com.ibm.ws.security.common.auth.module.WSLoginModuleImpl" -authStrategies "REQUIRED"]')

  3. Set custom properties for the JAAS login module.

    Use the configureLoginModule command to specify custom properties, modify the authentication strategy, or set the module to use a login module proxy. The following Jython command sets the debug and delegate custom properties for the testLoginEntry JAAS login entry:

      AdminTask.configureLoginModule('[-securityDomainName testDomain -loginType application -loginEntryAlias testLoginEntry -loginModule com.ibm.ws.security.common.auth.module.WSLoginModuleImpl -customProperties ["debug=true","delegate=WSLogin"]]')

  4. Save the configuration changes.
    AdminConfig.save()
    


Related:

  • Local operating system registries
  • Configure security domains using scripting
  • Mapping resources to security domains using scripting
  • Removing resources from security domains using scripting
  • Removing security domains using scripting
  • Start the wsadmin scripting client
  • SecurityConfigurationCommands