While we decided that Netable shouldn't actually handle redaction itself, it should certainly make it easy for people to implement their own redaction.
Nigel outlined some things that would be required for this in Slack:
We never print anything except through the LogEvent / LogDestination interfaces.
The .message event never contains any sensitive data (We should maybe see if we can make .message take a StaticString, in order to guarantee that it’s impossible to leak data through it.
Anything that might want to be redacted gets it’s own LogEvent case, and is using a structured data (an object or dictionary) to represent it rather than raw strings
To address these I:
Made sure we aren't printing anything except thru LogEvent
Changed .message to accept only StaticStrings.
Added a new LogEvent.startupInfo to print the dynamic info we might want to know for debugging at startup
Made sure anything we may want to redact has its own log event
I also fixed a place where we were throwing a fatalError that should throw an error the client can handle, and fixed the formatting on some multi-line messages that don't print properly.
Fixes #21
While we decided that Netable shouldn't actually handle redaction itself, it should certainly make it easy for people to implement their own redaction.
Nigel outlined some things that would be required for this in Slack:
To address these I:
StaticStrings
.LogEvent.startupInfo
to print the dynamic info we might want to know for debugging at startupI also fixed a place where we were throwing a
fatalError
that should throw an error the client can handle, and fixed the formatting on some multi-line messages that don't print properly.