mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-243: Remove referall authentication parameter and just use search credentials.
This commit is contained in:
@@ -316,6 +316,7 @@ public class ConfigurationService {
|
||||
* The search filter that should be used when querying the
|
||||
* LDAP server for users that are valid in Guacamole, or
|
||||
* "(objectClass=*)" if not specified.
|
||||
*
|
||||
* @throws GuacamoleException
|
||||
* If guacamole.properties cannot be parsed.
|
||||
*/
|
||||
@@ -326,37 +327,6 @@ public class ConfigurationService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the authentication method to use during referral following.
|
||||
*
|
||||
* @return
|
||||
* The authentication method to use during referral following
|
||||
* as configured in guacamole.properties or as derived from
|
||||
* other configuration options.
|
||||
*
|
||||
* @throws GuacamoleException
|
||||
* If guacamole.properties cannot be parsed.
|
||||
*/
|
||||
public String getReferralAuthentication() throws GuacamoleException {
|
||||
String confMethod = environment.getProperty(
|
||||
LDAPGuacamoleProperties.LDAP_REFERRAL_AUTHENTICATION
|
||||
);
|
||||
|
||||
if (confMethod == null)
|
||||
|
||||
if (getSearchBindDN() != null && getSearchBindPassword() != null)
|
||||
return "bind";
|
||||
|
||||
else
|
||||
return "anonymous";
|
||||
|
||||
else if (confMethod.equals("bind") && (getSearchBindDN() == null || getSearchBindPassword() == null))
|
||||
throw new GuacamoleException("Referral is set to bind with credentials, but credentials are not configured.");
|
||||
|
||||
return confMethod;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum number of seconds to wait for LDAP operations
|
||||
*
|
||||
|
@@ -123,8 +123,7 @@ public class LDAPConnectionService {
|
||||
|
||||
// If the referral auth method is set to bind, we set it using the existing
|
||||
// username and password.
|
||||
String refAuthMethod = confService.getReferralAuthentication();
|
||||
if (refAuthMethod != null && refAuthMethod.equals("bind"))
|
||||
if (userDN != null && !userDN.isEmpty())
|
||||
ldapConstraints.setReferralHandler(new ReferralAuthHandler(userDN, password));
|
||||
|
||||
// Set the maximum number of referrals we follow
|
||||
|
@@ -195,16 +195,6 @@ public class LDAPGuacamoleProperties {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Authentication method to use to follow referrals
|
||||
*/
|
||||
public static final StringGuacamoleProperty LDAP_REFERRAL_AUTHENTICATION = new StringGuacamoleProperty() {
|
||||
|
||||
@Override
|
||||
public String getName() { return "ldap-referral-authentication"; }
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Number of seconds to wait for LDAP operations to complete
|
||||
*/
|
||||
|
Reference in New Issue
Block a user