Updating LDAP binding information


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

We can dynamically update LDAP binding information without first stopping and restarting WAS by using wsadmin.

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...

....from WAS security configuration in security.xml. It then pushes the binding information to WAS security runtime.

There are two ways to dynamically update WAS security LDAP binding information using the SecurityAdmin MBean through wsadmin:

 

Switch to a different binding identity

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

  1. In the admin console, click...

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

  3. Run the SecurityAdmin MBean across all of the processes (dmgr, nodes, and appservers) to...

    • validate the new binding information
    • save it to security.xml
    • push the new binding information to the runtime

    For example...

    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] 
        } 
     }
    

 

Switch to a failover LDAP host

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

  1. In the admin console, click...

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

  3. 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.

  4. 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 we 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 we 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.

    When LDAP failover is configured by associating a single hostname to multiple IP addresses, entering an invalid password can cause multiple LDAP bind retries. With the default settings, the number of LDAP bind retries is equal to one more than the number of associated IP addresses. This means a single invalid login attempt can cause the LDAP account to be locked. If the com.ibm.websphere.security.ldap.retryBind custom property is set to false, LDAP bind calls are not retried.

 

Related tasks

Set LDAP user registries