Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(configx): add HTTP header log redaction config #725

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

whisky-is-life
Copy link

This PR introduces a change that allows configuration of additional HTTP headers to be redacted in the logs to address a case where custom HTTP headers containing sensitive information (e.g. tokens) are logged on production environments when a deployment such as one for Ory Kratos triggers a webhook request with these headers

Some alternatives that were considered include:

  • Setting the log level to fatal to keep these kind of information out of the logs, which is not really a desirable log level as it would result in decreased observability of the deployments
  • Trying to place tokens inside of the Authorization header, which would be ideal, but some 3rd party APIs do not accept a standard Authorization header and instead require non-standard HTTP headers such as X-Auth-Token in which case it is simpler to have deployments accept such headers with redaction, rather than having some proxy rewrite the HTTP headers

Related Issue or Design Document

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

@whisky-is-life whisky-is-life force-pushed the feat/configx/add-http-header-redaction-config branch from df4a341 to d330f61 Compare September 19, 2023 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants