GUACAMOLE-2181: Rely on automatic stack traces for debug-level logs.

This commit is contained in:
Michael Jumper committed 2025-12-08 20:24:10 -08:00
1 parent c92694c458
commit ea06e01ddd
44 files changed
+152 -243

No files matched your search

@@ -122,12 +122,10 @@ public class TokenValidationService {
}
// Log any failures to validate/parse the JWT
catch (MalformedClaimException e) {
logger.info("Rejected OpenID token with malformed claim: {}", e.getMessage());
logger.debug("Malformed claim within received JWT.", e);
logger.info("Rejected OpenID token with malformed claim: {}", e.getMessage(), e);
}
catch (InvalidJwtException e) {
logger.info("Rejected invalid OpenID token: {}", e.getMessage());
logger.debug("Invalid JWT received.", e);
logger.info("Rejected invalid OpenID token: {}", e.getMessage(), e);
}
return null;
@@ -160,8 +158,7 @@ public class TokenValidationService {
return username;
}
catch (MalformedClaimException e) {
logger.info("Rejected OpenID token with malformed claim: {}", e.getMessage());
logger.debug("Malformed claim within received JWT.", e);
logger.info("Rejected OpenID token with malformed claim: {}", e.getMessage(), e);
}
// Warn if username was not present in token, as it likely means
@@ -203,8 +200,7 @@ public class TokenValidationService {
return Collections.unmodifiableSet(new HashSet<>(oidcGroups));
}
catch (MalformedClaimException e) {
logger.info("Rejected OpenID token with malformed claim: {}", e.getMessage());
logger.debug("Malformed claim within received JWT.", e);
logger.info("Rejected OpenID token with malformed claim: {}", e.getMessage(), e);
}
}
@@ -262,8 +258,7 @@ public class TokenValidationService {
return Collections.unmodifiableMap(tokens);
}
catch (MalformedClaimException e) {
logger.info("Rejected OpenID token with malformed claim: {}", e.getMessage());
logger.debug("Malformed claim within received JWT.", e);
logger.info("Rejected OpenID token with malformed claim: {}", e.getMessage(), e);
}
}
@@ -125,8 +125,7 @@ public class AssertionConsumerServiceResource extends SSOResource {
// If invalid, redirect back to main page to re-attempt authentication
catch (GuacamoleException e) {
logger.warn("Authentication attempted with an invalid SAML response: {}", e.getMessage());
logger.debug("Received SAML response failed validation.", e);
logger.warn("Authentication attempted with an invalid SAML response: {}", e.getMessage(), e);
return Response.seeOther(guacBase).build();
}
@@ -351,16 +351,16 @@ public class SSLClientAuthenticationResource extends SSOResource {
}
catch (GuacamoleClientException e) {
logger.warn("SSL/TLS client authentication attempt rejected: {}", e.getMessage());
logger.debug("SSL/TLS client authentication failed.", e);
logger.warn("SSL/TLS client authentication attempt rejected: {}",
e.getMessage(), e);
}
catch (GuacamoleException e) {
logger.error("SSL/TLS client authentication attempt could not be processed: {}", e.getMessage());
logger.debug("SSL/TLS client authentication failed.", e);
logger.error("SSL/TLS client authentication attempt could not be "
+ "processed: {}", e.getMessage(), e);
}
catch (RuntimeException | Error e) {
logger.error("SSL/TLS client authentication attempt failed internally: {}", e.getMessage());
logger.debug("Internal failure processing SSL/TLS client authentication attempt.", e);
logger.error("SSL/TLS client authentication attempt failed "
+ "internally: {}", e.getMessage(), e);
}
return sessionManager.generateInvalid();