Skip to main content
By default, Subtrace redacts all known authorization credentials from every request. To change this behaviour, set the authCredentials field in your config YAML file. Here’s an example:
To use the config file, set the --config command line flag when starting Subtrace:
This option affects the following HTTP headers across all requests:
  • Cookie header on the request
  • Set-Cookie header on the response
  • Authorization header on the response
The following values are allowed:
  • redact will redact the auth credential completely (default).
  • hash will replace the value with a SHA256 hash of the original value (see below).
  • keep will trace the full auth credential string in cleartext (NOT recommended).

Using authCredentials: "hash"

The authCredentials: "hash" allows you to cross-match credentials across different requests safely without storing raw auth credentials in cleartext. For example, let’s say a client makes an API call with following request header:
Setting authCredentials: "hash" will hash the value when the request is traced:
Two requests using the same Authorization header will have the same redacted hash. If you know the original API key, you can also compute the hash yourself using the sha256sum command: