GUACAMOLE-243: Remove referall authentication parameter and just use search credentials.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/72c8308b Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/72c8308b Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/72c8308b Branch: refs/heads/staging/0.9.14-incubating Commit: 72c8308b991ea101f5c3a3d0b93f98b67f1e4dc1 Parents: 9c99905 Author: Nick Couchman <vn...@apache.org> Authored: Mon Oct 23 20:13:17 2017 -0400 Committer: Nick Couchman <vn...@apache.org> Committed: Mon Oct 23 20:13:17 2017 -0400 ---------------------------------------------------------------------- .../auth/ldap/ConfigurationService.java | 32 +------------------- .../auth/ldap/LDAPConnectionService.java | 3 +- .../auth/ldap/LDAPGuacamoleProperties.java | 10 ------ 3 files changed, 2 insertions(+), 43 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/72c8308b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java ---------------------------------------------------------------------- diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java index 0b6f9e9..b781236 100644 --- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java +++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/ConfigurationService.java @@ -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. */ @@ -327,37 +328,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 * * @return http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/72c8308b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java ---------------------------------------------------------------------- diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java index 82e6ca5..a4cb8bb 100644 --- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java +++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java @@ -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 http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/72c8308b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java ---------------------------------------------------------------------- diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java index 7a1dcad..63f5d0d 100644 --- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java +++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPGuacamoleProperties.java @@ -196,16 +196,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 */ public static final IntegerGuacamoleProperty LDAP_OPERATION_TIMEOUT = new IntegerGuacamoleProperty() {