You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The porter console io.Writer goes through the CensoredWriter that ***'s out any sensitive data. Now that we are replacing a lot of printlns with open telemetry traces, and writing to the log file, we need that same censoring for those outputs as well.
Since the TraceLogger is the main way that we print to all 3 now, let's see if we can have the CensoredWriter intercept and rewrite messages there instead of just on the console output.
Relevant Code
Here is the CensoredWriter that we want to use everywhere to add *** to any sensitive data:
The porter console io.Writer goes through the
CensoredWriter
that ***'s out any sensitive data. Now that we are replacing a lot of printlns with open telemetry traces, and writing to the log file, we need that same censoring for those outputs as well.Since the TraceLogger is the main way that we print to all 3 now, let's see if we can have the CensoredWriter intercept and rewrite messages there instead of just on the console output.
Relevant Code
Here is the CensoredWriter that we want to use everywhere to add *** to any sensitive data:
porter/pkg/portercontext/context.go
Line 407 in 493db3f
TraceLogger is now the central point where we print to the console, log file or traces. https://github.com/getporter/porter/blob/release/v1/pkg/tracing/traceLogger.go
What to test
Do not try to test that the traces are being censored, we will make a better test setup for that in a separate issue.
Get Started
See our Contributing Tutorial and New Contributor Guide for help getting started contributing to Porter.
The text was updated successfully, but these errors were encountered: