Skip to content
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

Avoid logging potentially sensitive data #100

Closed
davidje13 opened this issue Sep 7, 2016 · 2 comments
Closed

Avoid logging potentially sensitive data #100

davidje13 opened this issue Sep 7, 2016 · 2 comments

Comments

@davidje13
Copy link

I have a use-case where semi-sensitive data is passed around through a redis queue. This data should not be revealed in the logs, but https://github.com/RichardKnop/machinery/blob/master/v1/brokers/redis.go#L211 causes the data to appear.

Ideally it should be possible to suppress this output without suppressing all log output (currently it is possible to provide an alternative logger implementation but since the log line doesn't set any log level such as Debug, it can't be selectively filtered)

Using a custom broker seems to be the only possibility, but this is awkward since it requires copying the code of brokers/redis.go and factories.go to create an alternative redis implementation (an issue which seems to be related to #97).

Could a flag be added to denote data as sensitive, and therefore not to be logged anywhere? Alternatively, could that log line be changed to debug level (or other log lines be changed to warn level as appropriate) so that this could be filtered by the logger?

@RichardKnop
Copy link
Owner

@davidje13 If you would like to contribute, this sounds like a useful feature. PR welcome!

I might add this functionality to filter out certain logs (perhaps based on level) in the future but not sure how soon it will be as there are other issues higher on my list of things I want to do first.

So if you need this quickly, I'm open to merging a PR that solves this.

@RichardKnop
Copy link
Owner

@davidje13 You can use your custom logger to filter out certain logs: https://github.com/RichardKnop/machinery#custom-logger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants