-
Notifications
You must be signed in to change notification settings - Fork 166
Username not logged in HTTP access logs #760
Comments
These are standard HTTP server logs. They don't typically include acting user in, say, Nginx or Apache. Acting user is already listed in internal events available via |
FWIW the common log format, which is used by the plugin does include a field for the acting user. See user-identifier in https://en.wikipedia.org/wiki/Common_Log_Format |
@essen is including additional information feasible with Cowboy 2? I could not find much since ninenines/cowboy#1251. |
We are still using the old module from Webmachine (modified for Cowboy) so it's just a matter of finding the user from the Req: https://github.com/rabbitmq/rabbitmq-web-dispatch/blob/master/src/webmachine_log_handler.erl |
I'd just stick with common log format.
Would become
|
I have opened rabbitmq/rabbitmq-web-dispatch#42 for the HTTP/Management side of things. |
@essen are there other PRs involved? I can see username logged with just that one. |
Ah, I see that there's interest in having user information for every operation. While we already have that information in internal event metadata, it will be substantially more effort simply because there are so many events, and a user may or may not be present. Let's keep this issue specific to management plugin and if there's enough interest in logging specifically, we can always open another one. An audit plugin is what this is really asking for and we have the plumbing for that exposed via |
Currently, it appears there is no logging of a user who takes action in the main rabbit log or http access log. This is a bad thing, as one can not determine what user performed actions from a security investigation perspective.
For example, a user with admin access created a generic role based user in our system today that violates our security policy. Ideally in both log areas where this action occurred, the username of that initiated the action would have been logged.
From the access logs:
From rabbitmq.log:
The text was updated successfully, but these errors were encountered: