GUACAMOLE-1239: Remove per-extension configuration for case-sensitivity, retaining only global configuration.

This commit is contained in:
Virtually Nick
2024-10-31 13:30:46 -04:00
parent 240dcd9a52
commit ddd09969d8
31 changed files with 37 additions and 469 deletions

View File

@@ -362,26 +362,5 @@ public class ConfigurationService {
throw new GuacamoleServerException("Unknown host specified for NAS IP.", e);
}
}
/**
* Returns true if the usernames provided to the RADIUS authentication
* module should be treated as case-sensitive, or false if usernames
* should be treated as case-insensitive. The default value is read from
* Guacamole's global configuration, which defaults to true, but can be
* overridden for the RADIUS extension, if desired.
*
* @return
* true if usernames should be treated as case-sensitive, otherwise
* false.
*
* @throws GuacamoleException
* If guacamole.properties cannot be parsed.
*/
public boolean getCaseSensitiveUsernames() throws GuacamoleException {
return environment.getProperty(
RadiusGuacamoleProperties.RADIUS_CASE_SENSITIVE_USERNAMES,
environment.getCaseSensitiveUsernames()
);
}
}

View File

@@ -204,18 +204,5 @@ public class RadiusGuacamoleProperties {
public String getName() { return "radius-nas-ip"; }
};
/**
* A property used to configure whether or not usernames within the RADIUS
* module should be treated as case-sensitive.
*/
public static final BooleanGuacamoleProperty RADIUS_CASE_SENSITIVE_USERNAMES =
new BooleanGuacamoleProperty() {
@Override
public String getName() { return "radius-case-sensitive-usernames"; }
};
}

View File

@@ -63,7 +63,7 @@ public class AuthenticatedUser extends AbstractAuthenticatedUser {
*/
public void init(Credentials credentials) {
this.credentials = credentials;
setIdentifier(credentials.getUsername().toLowerCase());
setIdentifier(credentials.getUsername());
}
@Override
@@ -75,18 +75,5 @@ public class AuthenticatedUser extends AbstractAuthenticatedUser {
public Credentials getCredentials() {
return credentials;
}
@Override
public boolean isCaseSensitive() {
try {
return confService.getCaseSensitiveUsernames();
}
catch (GuacamoleException e) {
LOGGER.error("Error retrieving configuration for username case sensiivity. "
+ "Usernames will be processed as case-sensitive.");
LOGGER.debug("Exception caught while retrieving RADIUS configuration.", e);
return true;
}
}
}