pact-provider-verifier icon indicating copy to clipboard operation
pact-provider-verifier copied to clipboard

Redact authorization header contents from logged warnings when running provider verification

Open canny[bot] opened this issue 8 months ago • 1 comments

Currently when you use pact-provider-verifier ... --custom-provider-header="Authorization: xxx" to give, for example, a bearer token to Pact while running the provider verifications. The contents of the header get printed out in plain text as a warning: WARN: Adding header 'Authorization: Bearer <visible value>'

It would be nice if these contents could be redacted for the Authorization header and instead it would print something like: WARN: Adding header 'Authorization: [REDACTED]'

Even though we're talking about dev/test deployment related secrets, it still isn't very nice to expose them in a visible manner. Of course an easy workaround is to simply perform an inverted grep for discarding all lines that begin as the mentioned warning. But it would be nice to have this functionality built-in.

https://pact.canny.io/admin/board/feature-requests/p/redact-authorization-header-contents-from-logged-warnings-when-running-provider

canny[bot] avatar Jun 26 '24 11:06 canny[bot]