}
}
// now ldap
LdapConfiguration ldapConfiguration = redbackRuntimeConfiguration.getLdapConfiguration();
if ( ldapConfiguration == null )
{
ldapConfiguration = new LdapConfiguration();
redbackRuntimeConfiguration.setLdapConfiguration( ldapConfiguration );
}
ldapConfiguration.setHostName(
userConfiguration.getString( UserConfigurationKeys.LDAP_HOSTNAME, null ) );
ldapConfiguration.setPort( userConfiguration.getInt( UserConfigurationKeys.LDAP_PORT, -1 ) );
ldapConfiguration.setSsl( userConfiguration.getBoolean( UserConfigurationKeys.LDAP_SSL, false ) );
ldapConfiguration.setBaseDn(
userConfiguration.getConcatenatedList( UserConfigurationKeys.LDAP_BASEDN, null ) );
ldapConfiguration.setBaseGroupsDn(
userConfiguration.getConcatenatedList( UserConfigurationKeys.LDAP_GROUPS_BASEDN,
ldapConfiguration.getBaseDn() ) );
ldapConfiguration.setContextFactory(
userConfiguration.getString( UserConfigurationKeys.LDAP_CONTEX_FACTORY,
isSunContextFactoryAvailable()
? "com.sun.jndi.ldap.LdapCtxFactory"
: "" ) );
ldapConfiguration.setBindDn(
userConfiguration.getConcatenatedList( UserConfigurationKeys.LDAP_BINDDN, null ) );
ldapConfiguration.setPassword(
userConfiguration.getString( UserConfigurationKeys.LDAP_PASSWORD, null ) );
ldapConfiguration.setAuthenticationMethod(
userConfiguration.getString( UserConfigurationKeys.LDAP_AUTHENTICATION_METHOD, null ) );
ldapConfiguration.setWritable(
userConfiguration.getBoolean( UserConfigurationKeys.LDAP_WRITABLE, false ) );
ldapConfiguration.setUseRoleNameAsGroup(
userConfiguration.getBoolean( UserConfigurationKeys.LDAP_GROUPS_USE_ROLENAME, false ) );
boolean ldapBindAuthenticatorEnabled =
userConfiguration.getBoolean( UserConfigurationKeys.LDAP_BIND_AUTHENTICATOR_ENABLED, false );
ldapConfiguration.setBindAuthenticatorEnabled( ldapBindAuthenticatorEnabled );
// LDAP groups mapping reading !!
// UserConfigurationKeys.LDAP_GROUPS_ROLE_START_KEY
// userConfiguration.getKeys()