Brighter icon indicating copy to clipboard operation
Brighter copied to clipboard

Obfuscate logs of sensitive data

Open jablamas opened this issue 6 years ago • 7 comments

We would need a way to obfuscate certain parts of the messages logged by Brighter on ElasticSearch. Is there a simple way to configure that functionality? Thanks!


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

jablamas avatar Aug 14 '18 08:08 jablamas

Not out of the box, although we use liblog, so essentially you provide the logger, not us. Otherwise I have not thought about it as yet.

Can you give me an idea of what it is you need to obfusticate? I assume there is some plain text information in the message body etc?

iancooper avatar Aug 16 '18 13:08 iancooper

Ok Ian, thanks for your quick response. Your assumption is correct, we are trying to obfuscate some parts of the string being logged. We find a problem when trying to use Destructurama package for Serilog: https://github.com/destructurama/attributed This package requires certain syntax for the variables in the log message, but on the other hand we are relying on the handlers: https://github.com/BrighterCommand/Brighter/blob/master/src/Paramore.Brighter/Logging/Handlers/RequestLoggingHandler.cs ...that call the logging functions (logger.Value.InfoFormat...) without the needed syntax. I suppose that we should find a workaround for this.

Thank you!

jablamas avatar Aug 16 '18 14:08 jablamas

Added to #242

iancooper avatar Dec 29 '20 10:12 iancooper

@holytshirt If you are looking at logging, worth noting if we can obfuscate for PII etc

iancooper avatar Mar 20 '21 15:03 iancooper

@jablamas will Destructurama work now that we have the ability for Structured Logging?

preardon avatar Jul 24 '21 14:07 preardon

@preardon @jablamas Where is this one?

iancooper avatar Oct 18 '21 12:10 iancooper

@iancooper as far as I am aware there is not yet a way native in our code, but haven't heard from @jablamas as to weather the Destructurama package may do this. I feel that given we Post to an ILogger it is better to have the logging sink look after this as opposed to creating an abstraction around this in our code for the purpose of obfuscating logs

preardon avatar Oct 18 '21 12:10 preardon

@preardon Closing this issue for now, based on your comment, and lack of activity on it

iancooper avatar Apr 18 '23 19:04 iancooper