Express (Distributed operating systems), v8.0 > Secure applications and their environment > Authenticate users > Select a registry or repository > Manage realms in a federated repository > Virtual member manager > Develop with virtual member manager > Integrate virtual member manager into the application > Program tasks


Dynamically updating the bind DN and password for an LDAP repository

Use this procedure to dynamically update the LDAP bind information of the specified LDAP repository at runtime.


About this task

When this dynamic call is made, only the configuration in memory is updated. The configuration file is not updated.

Event Type

DYNA_CONFIG_EVENT_UPDATE_LDAP_BIND_INFO

Configuration Data

DYNA_CONFIG_KEY_LDAP_BIND_DN - [String]

New LDAP bind distinguished name (DN).

DYNA_CONFIG_KEY_LDAP_BIND_PASSWORD - [UTF-8 encoded byte array]

New LDAP bind password.

DYNA_CONFIG_KEY_REPOS_ID (required) - [String]

Repository ID of the LDAP adapter to update.
The following is a sample task:


Procedure

  1. Ensure that virtual member manager is running.
  2. Call dynamicUpdateConfig API to update the bind DN and password. For example to update the bind password:
    Hashtable configData = new Hashtable();
    configData.put(Service.DYNA_CONFIG_KEY_LDAP_BIND_DN, "uid=testwim,cn=users,dc=yourco,dc=com");
    configData.put(Service.DYNA_CONFIG_KEY_LDAP_BIND_PASSWORD, PasswordUtil.getByteArrayPassword
                  ("rightpwd"));
    configData.put(Service.DYNA_CONFIG_KEY_REPOS_ID, "LDAP1");
    service.dynamicUpdateConfig(Service.DYNA_CONFIG_EVENT_UPDATE_LDAP_BIND_INFO, configData);
    

Parent topic: Program tasks



+

Search Tips   |   Advanced Search