Documentation ¶
Overview ¶
Package protosanitizer supports logging of gRPC messages without accidentally revealing sensitive fields.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StripSecrets ¶
StripSecrets returns a wrapper around the original CSI gRPC message which has a Stringer implementation that serializes the message as one-line JSON, but without including secret information. Instead of the secret value(s), the string "***stripped***" is included in the result.
StripSecrets relies on an extension in CSI 1.0 and thus can only be used for messages based on that or a more recent spec!
StripSecrets itself is fast and therefore it is cheap to pass the result to logging functions which may or may not end up serializing the parameter depending on the current log level.
func StripSecretsCSI03 ¶ added in v0.2.0
StripSecretsCSI03 is like StripSecrets, except that it works for messages based on CSI 0.3 and older. It does not work for CSI 1.0, use StripSecrets for that.
Types ¶
This section is empty.