GUACAMOLE-2181: Merge improve readability of logs.

This commit is contained in:
Virtually Nick authored and GitHub committed 2025-12-12 19:32:46 -06:00
commit 4aa841c4f8
61 files changed
+1320 -288

No files matched your search

@@ -94,16 +94,18 @@ public class AuthenticationProviderService {
// Try to get the state attribute - if it's not there, we have a problem
RadiusAttribute stateAttr = challengePacket.findAttribute(Attr_State.TYPE);
if (stateAttr == null) {
logger.error("Something went wrong, state attribute not present.");
logger.debug("State Attribute turned up null, which shouldn't happen in AccessChallenge.");
logger.error("RADIUS server did not include the required \"{}\" "
+ "attribute in its challenge packet - cannot continue.",
Attr_State.NAME);
return null;
}
// We need to get the reply message so we know what to ask the user
RadiusAttribute replyAttr = challengePacket.findAttribute(Attr_ReplyMessage.TYPE);
if (replyAttr == null) {
logger.error("No reply message received from the server.");
logger.debug("Expecting a Attr_ReplyMessage attribute on this packet, and did not get one.");
logger.error("RADIUS server did not include the required \"{}\" "
+ "attribute in its challenge packet - cannot continue.",
Attr_ReplyMessage.NAME);
return null;
}
@@ -162,8 +164,7 @@ public class AuthenticationProviderService {
null);
}
catch (GuacamoleException e) {
logger.error("Cannot configure RADIUS server: {}", e.getMessage());
logger.debug("Error configuring RADIUS server.", e);
logger.error("Cannot configure RADIUS server: {}", e.getMessage(), e);
throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
}
}
@@ -184,13 +185,11 @@ public class AuthenticationProviderService {
stateBytes);
}
catch (IllegalArgumentException e) {
logger.warn("Illegal hexadecimal value while parsing RADIUS state string: {}", e.getMessage());
logger.debug("Encountered exception while attempting to parse the hexidecimal state value.", e);
logger.warn("Illegal hexadecimal value while parsing RADIUS state string: {}", e.getMessage(), e);
throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
}
catch (GuacamoleException e) {
logger.error("Cannot configure RADIUS server: {}", e.getMessage());
logger.debug("Error configuring RADIUS server.", e);
logger.error("Cannot configure RADIUS server: {}", e.getMessage(), e);
throw new GuacamoleInvalidCredentialsException("Authentication error.", CredentialsInfo.USERNAME_PASSWORD);
}
}
@@ -245,18 +245,15 @@ public class RadiusConnectionService {
}
catch (RadiusException e) {
logger.error("Unable to complete authentication.", e.getMessage());
logger.debug("Authentication with RADIUS failed.", e);
logger.error("Unable to complete authentication: {}", e.getMessage(), e);
return null;
}
catch (NoSuchAlgorithmException e) {
logger.error("No such RADIUS algorithm: {}", e.getMessage());
logger.debug("Unknown RADIUS algorithm.", e);
logger.error("No such RADIUS algorithm: {}", e.getMessage(), e);
return null;
}
catch (UnknownHostException e) {
logger.error("Could not resolve address: {}", e.getMessage());
logger.debug("Exception resolving host address.", e);
logger.error("Could not resolve address: {}", e.getMessage(), e);
return null;
}
finally {