setSelection( enableLdapsCheckbox, ldapsServerTransportBean.isEnabled() );
setEnabled( enableLdapsCheckbox, enableLdapsCheckbox.getSelection() );
setText( ldapsPortText, ldapsServerTransportBean.getSystemPort() + "" ); //$NON-NLS-1$
// SASL Properties
LdapServerBean ldapServerBean = getLdapServerBean();
setText( saslHostText, ldapServerBean.getLdapServerSaslHost() );
setText( saslPrincipalText, ldapServerBean.getLdapServerSaslPrincipal() );
setText( saslSearchBaseDnText, ldapServerBean.getSearchBaseDn().toString() );
// Keystore Properties
setText( keystoreFileText, ldapServerBean.getLdapServerKeystoreFile() );
setText( keystorePasswordText, ldapServerBean.getLdapServerCertificatePassword() );
// Supported Auth Mechanisms
List<SaslMechHandlerBean> saslMechHandlers = ldapServerBean.getSaslMechHandlers();
uncheckAllSupportedAuthenticationMechanisms();
for ( SaslMechHandlerBean saslMechHandler : saslMechHandlers )
{
if ( SASL_MECHANISMS_SIMPLE.equalsIgnoreCase( saslMechHandler.getSaslMechName() ) )
{
setSelection( authMechSimpleCheckbox, saslMechHandler.isEnabled() );
}
else if ( SupportedSaslMechanisms.GSSAPI.equalsIgnoreCase( saslMechHandler.getSaslMechName() ) )
{
setSelection( authMechGssapiCheckbox, saslMechHandler.isEnabled() );
}
else if ( SupportedSaslMechanisms.CRAM_MD5.equalsIgnoreCase( saslMechHandler.getSaslMechName() ) )
{
setSelection( authMechCramMd5Checkbox, saslMechHandler.isEnabled() );
}
else if ( SupportedSaslMechanisms.DIGEST_MD5.equalsIgnoreCase( saslMechHandler.getSaslMechName() ) )
{
setSelection( authMechDigestMd5Checkbox, saslMechHandler.isEnabled() );
}
else if ( SupportedSaslMechanisms.GSS_SPNEGO.equalsIgnoreCase( saslMechHandler.getSaslMechName() ) )
{
setSelection( authMechGssSpnegoCheckbox, saslMechHandler.isEnabled() );
setEnabled( authMechGssSpnegoText, saslMechHandler.isEnabled() );
setText( authMechGssSpnegoText, saslMechHandler.getNtlmMechProvider() );
}
else if ( SupportedSaslMechanisms.NTLM.equalsIgnoreCase( saslMechHandler.getSaslMechName() ) )
{
setSelection( authMechNtlmCheckbox, saslMechHandler.isEnabled() );
setEnabled( authMechNtlmText, saslMechHandler.isEnabled() );
setText( authMechNtlmText, saslMechHandler.getNtlmMechProvider() );
}
}
// Limits
setText( maxTimeLimitText, "" + ldapServerBean.getLdapServerMaxTimeLimit() ); //$NON-NLS-1$
setText( maxSizeLimitText, "" + ldapServerBean.getLdapServerMaxSizeLimit() ); //$NON-NLS-1$
// Enable TLS Checkbox
setSelection( enableTlsCheckbox, getTlsExtendedOpHandlerBean().isEnabled() );
// Hashing Password widgets
InterceptorBean hashingMethodInterceptor = getHashingPasswordInterceptor();
if ( hashingMethodInterceptor == null )
{
// No hashing method interceptor
setSelection( enableServerSidePasswordHashingCheckbox, false );
setEnabled( hashingMethodComboViewer.getCombo(), enableServerSidePasswordHashingCheckbox.getSelection() );
setSelection( hashingMethodComboViewer, LdapSecurityConstants.HASH_METHOD_SSHA );
}
else
{
LdapSecurityConstants hashingMethod = getHashingMethodFromInterceptor( hashingMethodInterceptor );
if ( hashingMethod != null )
{
// Setting selection for the hashing method
setSelection( enableServerSidePasswordHashingCheckbox, hashingMethodInterceptor.isEnabled() );
setEnabled( hashingMethodComboViewer.getCombo(), enableServerSidePasswordHashingCheckbox.getSelection() );
setSelection( hashingMethodComboViewer, hashingMethod );
}
else
{
// Couldn't determine which hashing method is used
setSelection( enableServerSidePasswordHashingCheckbox, false );
setEnabled( hashingMethodComboViewer.getCombo(), enableServerSidePasswordHashingCheckbox.getSelection() );
setSelection( hashingMethodComboViewer, LdapSecurityConstants.HASH_METHOD_SSHA );
}
}
// SSL/Start TLS Cipher Suites
cipherSuitesTableViewer.setInput( ldapServerBean.getEnabledCipherSuites() );
cipherSuitesTableViewer.refresh();
// Replication Pinger Sleep
setText( replicationPingerSleepText, "" + ldapServerBean.getReplPingerSleep() ); //$NON-NLS-1$
addListeners();
}