diff --git a/web/src/main/java/org/springframework/security/web/access/intercept/RequestMatcherDelegatingAuthorizationManager.java b/web/src/main/java/org/springframework/security/web/access/intercept/RequestMatcherDelegatingAuthorizationManager.java index 6192426ac3f..3fd3bd7cad9 100644 --- a/web/src/main/java/org/springframework/security/web/access/intercept/RequestMatcherDelegatingAuthorizationManager.java +++ b/web/src/main/java/org/springframework/security/web/access/intercept/RequestMatcherDelegatingAuthorizationManager.java @@ -68,7 +68,7 @@ private RequestMatcherDelegatingAuthorizationManager( @Override public AuthorizationDecision check(Supplier authentication, HttpServletRequest request) { if (this.logger.isTraceEnabled()) { - this.logger.trace(LogMessage.format("Authorizing %s", request)); + this.logger.trace(LogMessage.format("Authorizing %s", requestLine(request))); } for (RequestMatcherEntry> mapping : this.mappings) { @@ -77,7 +77,7 @@ public AuthorizationDecision check(Supplier authentication, Http if (matchResult.isMatch()) { AuthorizationManager manager = mapping.getEntry(); if (this.logger.isTraceEnabled()) { - this.logger.trace(LogMessage.format("Checking authorization on %s using %s", request, manager)); + this.logger.trace(LogMessage.format("Checking authorization on %s using %s", requestLine(request), manager)); } return manager.check(authentication, new RequestAuthorizationContext(request, matchResult.getVariables())); @@ -89,6 +89,10 @@ public AuthorizationDecision check(Supplier authentication, Http return DENY; } + private static String requestLine(HttpServletRequest request) { + return request.getMethod() + " " + UrlUtils.buildRequestUrl(request); + } + /** * Creates a builder for {@link RequestMatcherDelegatingAuthorizationManager}. * @return the new {@link Builder} instance