WAS v8.5 > Script the application serving environment (wsadmin) > Scripting for security > Configure security with scripting > Configure multiple security domains using scripting

Configure JAAS login modules using wsadmin.sh

Use this topic to use wsadmin to manage Java Authentication and Authorization Service (JAAS) login entries to allow communication between realms in a multiple security domain environment.

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

  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 Java Authentication and Authorization Service (JAAS) login entry in a security domain or in the global security configuration. We can 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:

    Command parameters. Run the configureJAASLoginEntry command to configure a JAAS login module.

    Parameter Description
    -loginEntryAlias 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 Optionally specifies 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

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

    • REQUISITE

      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

      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

      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, as the following Jython example demonstrates:

    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 your configuration changes.

    Use the following command example to save your configuration changes:


Related concepts:

Local operating system registries


Related


Configure security domains using scripting
Map resources to security domains using scripting
Remove resources from security domains using scripting
Remove security domains using scripting
Start the wsadmin scripting client using wsadmin.sh


Reference:

AdminTask SecurityConfigurationCommands


+

Search Tips   |   Advanced Search