String userBaseDn = ldapSession.getLdapServer().getSearchBaseDn();
ldapSession.putSaslProperty( SaslConstants.SASL_HOST, saslHost );
ldapSession.putSaslProperty( SaslConstants.SASL_USER_BASE_DN, userBaseDn );
Map<String, String> saslProps = new HashMap<String, String>();
CoreSession adminSession = ldapSession.getLdapServer().getDirectoryService().getAdminSession();
CallbackHandler callbackHandler = new CramMd5CallbackHandler( ldapSession, adminSession, bindRequest );
ss = Sasl.createSaslServer( SupportedSaslMechanisms.CRAM_MD5, SaslConstants.LDAP_PROTOCOL, saslHost,
saslProps, callbackHandler );