Although accessing the custom auth module properties from java code has not been tested or QA'd, Engineering suggests it might be possible possible through programming using IM llsdk6 API to modify the authentication module properties.
For example:
import com.netegrity.llsdk6.imsapi.ImsEnvironment;
import com.netegrity.llsdk6.imsapi.metadata.AuthModulePropertiesDefinition;
import com.netegrity.llsdk6.imsapi.metadata.UserConsoleDefinition;
import com.netegrity.llsdk6.imsapi.provider.EnvironmentSettingsProvider;
import com.netegrity.llsdk6.imsapi.type.LoginAuthenticationModule;
import com.netegrity.llsdk6.imsapi.utility.ActiveDirectoryAuthenticationProperties;
import com.netegrity.llsdk6.imsimpl.ImsApiImpl;
import com.netegrity.llsdk6.imsimpl.ImsImplKeys;
import com.netegrity.llsdk6.imsimpl.jdbcmanagedobject.JDBCManagedObjectProvider;
JDBCManagedObjectProvider<?> envProvider = ImsApiImpl.getJDBCManagedObjectProvider(ImsImplKeys.IMS_ENVIRONMENT);
for (ImsEnvironment env : (List<ImsEnvironment>)envProvider.findAll(null)) {
EnvironmentSettingsProvider prov = env.getEnvironmentSettingsProvider();
try {
UserConsoleDefinition ucdef = prov.getUserConsoleDefinition();
if (ucdef != null) {
String aclass = ucdef.getAuthClass();
if (aclass != null && aclass.equals(LoginAuthenticationModule.AD.getClassName())) {
AuthModulePropertiesDefinition amdef = prov.getAuthModulePropertiesDefinition(LoginAuthenticationModule.AD.getCode());
if (amdef != null && amdef.getAuthModuleProperties(false).isEmpty()) {
Map<String, String> admap = new HashMap<String, String>(adSettings.size());
for (String key : ActiveDirectoryAuthenticationProperties.AD_PROPERTIES_TOSET) {
String value = adSettings.get(key);
if (value != null)
admap.put(key, value);
}
amdef.setAuthModuleProperties(admap, true);
amdef.modifyObject();
ret = true;
envProvider.clearCache(env.getUniqueName());
logger.info("Migrated AD Authentication module settings from properties file into environment " + env.getFriendlyName());
}
}
}
} catch (Exception e) {
deleteADSettingsFile = false;
logger.error("migrateADAuthenticationSettings() failed to migrate AD settings into environment " + env.getFriendlyName(), e);
}
}