Skip to content

Commit

Permalink
fix: authorization filter is logging incorrect username (#3138)
Browse files Browse the repository at this point in the history
  • Loading branch information
spena authored Jul 29, 2019
1 parent e187e55 commit b15c6d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public void filter(final ContainerRequestContext requestContext) {
try {
authorizationProvider.checkEndpointAccess(user, method, path);
} catch (final Throwable t) {
log.warn(String.format("User:%s is denied access to \"%s %s\"", user, method, path), t);
log.warn(String.format("User:%s is denied access to \"%s %s\"",
user.getName(), method, path), t);
requestContext.abortWith(Errors.accessDenied(t.getMessage()));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private void checkAuthorization(final Session session) {
provider.checkEndpointAccess(user, method, path);
} catch (final Throwable t) {
log.warn(String.format("User:%s is denied access to Websocket "
+ "%s endpoint", user, path), t);
+ "%s endpoint", user.getName(), path), t);
throw new KsqlException(t);
}
}
Expand Down

0 comments on commit b15c6d0

Please sign in to comment.