A customer complains that we config-schema logs sensitive data in the plain text
We provided an invalid encryption key for Kibana 7.6.0 and were surprised to find that when there is an error it logs the encryption key in plain text:
config validation of [xpack.encryptedSavedObjects].encryptionKey]: value is [some_value] but it must have a minimum length of [32].
We need to provide a way to filter out sensitive data. For example, we can mark a key as containing sensitive data to prevent disclosure.
Pinging @elastic/kibana-platform (Team:Platform)
One other option would be to have a convention to never display the actual data value in any error message. It seems there are only very few messages where we do display the raw values. Most messages are like expected value of type [string] but got [${typeDetect(value)}]
The value is [some_value] but it must have a minimum length of [32] could be changed to valuehas length [XX] but it must have a minimum length of [32].
This would avoid introducing a parameter for that, and the risk that a developer actually forget to flag sensitive data validation with it.
So, after a 'quick' look, impacted types are:
uristringnumberrecord / object / mapliteralbyte_sizeHiding the actual value in some of these errors will strongly reduce the help the message actually provides (thinking about literal, number, byte_size mostly but all overall). It's probably not that important though. Do we think this is still acceptable to just remove value reference in every of them?
Most helpful comment
One other option would be to have a convention to never display the actual data value in any error message. It seems there are only very few messages where we do display the raw values. Most messages are like
expected value of type [string] but got [${typeDetect(value)}]The
value is [some_value] but it must have a minimum length of [32]could be changed tovaluehas length [XX] but it must have a minimum length of [32].This would avoid introducing a parameter for that, and the risk that a developer actually forget to flag sensitive data validation with it.