+

Search Tips   |   Advanced Search

 

Update LDAP binding information

 

Use this information to dynamically update security LDAP binding information by switching to a different binding identity.

 

Overview

You can dynamically update LDAP (LDAP) binding information without first stopping and restarting WebSphere Application Server by using the wsadmin tool.

The resetLdapBindInfo method in SecurityAdmin MBean is used to dynamically update LDAP binding information at WAS security runtime, and it takes the bind distinguished name (DN) and bind password parameters as input. The resetLdapBindInfo method validates the bind information against the LDAP server. If validation passes, new binding information is stored in security.xml, and a copy of the information is placed in WAS security runtime.

The MBean method also synchronizes the binding information change in security.xml from cell to nodes.

If the new binding information is null, null, the resetLdapBindInfo method first extracts LDAP binding information, including bind DN, bind password, and target binding host from WAS security configuration in security.xml. It then pushes the binding information to WebSphere Application Server security runtime. There are two ways to dynamically update WAS security LDAP binding information using the SecurityAdmin MBean through wsadmin:

 

Switching to a different binding identity

 

Overview

To dynamically update security LDAP binding information by switching to a different binding identity:

 

Procedure

  1. In the console, click Security > Secure administration, applications, and infrastructure.

  2. Under User account repository, click the Available realm definitions drop-down list, select Standalone LDAP registry, and click Configure.

  3. Create a new bind DN. It must have the same access authority as the current bind DN.

  4. Run the SecurityAdmin MBean across all of the processes (deployment manager, nodes, and appservers) to validate the new binding information, to save it to security.xml, and to push the new binding information to the runtime.

 

Example

The following is a sample Jacl file for step 4:

proc LDAPReBind {args} {
    global AdminConfig AdminControl ldapBindDn ldapBindPassword 
    set ldapBindDn [lindex $args 0]
    set ldapBindPassword [lindex $args 1]        
        set secMBeans [$AdminControl queryNames type=SecurityAdmin,*]
        set plist  [list $ldapBindDn $ldapBindPassword]        
        foreach secMBean $secMBeans {
               set result [$AdminControl invoke $secMBean resetLdapBindInfo $plist] 
        } 
  }

 

Switching to a failover LDAP host

 

Overview

To dynamically update security LDAP binding information by switching to a failover LDAP host:

 

Procedure

  1. In the console, click Security > Secure administration, applications, and infrastructure.

  2. Under User account repository, select Standalone LDAP registry and click Configure.

  3. Change the password for bind DN on one LDAP server (it can be the primary or the backup).

  4. Update the new bind DN password to WebSphere Application security runtime by calling resetLdapBindInfo with the bind DN and by using its new password as a parameter.

  5. Use the new bind DN password for all of the other LDAP servers. The binding information is now consistent across WAS and the LDAP servers.

    If you call resetLdapBindInfo with null, null as input parameters, WAS security runtime completes the following steps:

    1. Reads the bind DN, bind password, and target LDAP hosts from security.xml.

    2. Refreshes the cached connection to the LDAP server.

    If you configure security to use multiple LDAP servers, this MBean call forces WAS security to reconnect to the first available LDAP host in the list. For example, if three LDAP servers are configured in the order of L1, L2, and L3, the reconnection process always starts with the L1 server.


 

Related concepts


Security failover among multiple LDAP servers

 

Related tasks


Configure LDAP user registries