-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Censor write only variables logging and added a new callback to sanitize any logging that would be passed to the existing message_callback #911
base: main
Are you sure you want to change the base?
Conversation
The log line here: https://github.com/EVerest/libocpp/blob/main/lib/ocpp/common/websocket/websocket_libwebsockets.cpp#L996 can still leak secrets as it's not filtered. You could argue that it's debug so that's not needed, but better safe then sorry imo. Would love to here you're opinion on that. EDIT: as discussed during call today: remove it |
9f75036
to
bd8f5f4
Compare
…riable can be checked before the value change is logged. This prevents write-only varaiables to be logged Signed-off-by: Wilco den Besten <[email protected]>
…o the existing message_callback. Can be used to remove secrets from log lines Signed-off-by: Wilco den Besten <[email protected]>
Signed-off-by: Wilco den Besten <[email protected]>
Signed-off-by: Wilco den Besten <[email protected]>
Signed-off-by: Wilco den Besten <[email protected]>
d031c56
to
983b199
Compare
@@ -60,6 +60,7 @@ class MessageLogging { | |||
std::filesystem::path security_log_file; | |||
std::ofstream security_log_os; | |||
std::mutex output_file_mutex; | |||
std::function<std::string(const std::string& message)> sanitize_message_callback; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in the last WG meeting, lets drop this callback from this PR and just merge the write only variable logging changes. I'll follow up with a generic solution
Describe your changes
Checklist before requesting a review