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
Update logging to redact AccessToken if provided at commandline
All API accessing methods allow users to provide an AccessToken to be used
for the duration of that API call. The problem with that is that the
command is also logged by default, which means that the AccessToken value
might be logged in plain text to the log file.
To fix this, `Write-InvocationLog` has been modified in a few ways:
* Can now redact the value of specified parameters, or exclude the parameter altogether.
* `AccessToken` has been configured to _always_ be redacted, and
`NoStatus` has been configured to _always_ be excluded (to avoid noise)
* Instead of logging the originally invoked line, as well as the individual
values of the parameters, this now logs a single line with a modified version
of the invocation with the substitution of parameter values performed in-place.
* The `DisableParameterLogging` configuation value has been removed, as we're no
longer taking up additional verbose space (we're always logging a single line), and
we have to process the parameters anyway to ensure that we're excluding/redacting
the necessary parameters, meaning that we can't log the invoked line no matter what.
0 commit comments