Skip to content

🔒️ Redact sensitive values from debug logging output#707

Merged
pboling merged 1 commit intomainfrom
feat/redact-debug-logging
Apr 6, 2026
Merged

🔒️ Redact sensitive values from debug logging output#707
pboling merged 1 commit intomainfrom
feat/redact-debug-logging

Conversation

@pboling
Copy link
Copy Markdown
Member

@pboling pboling commented Apr 6, 2026

  • Add OAuth2.config[:filtered_label] to configure the placeholder used for filtered sensitive values in inspected objects and debug logging output.
  • Add OAuth2.config[:filtered_debug_keys] to configure which key names have their values redacted from debug logging output.
  • Add OAuth2::ThingFilter as the shared filtering primitive used by inspect-time and debug-log filtering.
  • Make inspect-time and debug-log filters snapshot their configuration at initialization time rather than tracking later config changes.
  • Automatically redacted values include:
    • Authorization headers
    • common token/secret fields in headers
    • query strings
    • form bodies
    • JSON payloads
  • NOTE: debug logging has always been, and remains, opt-in. It is turned off by default.

Copilot AI review requested due to automatic review settings April 6, 2026 05:26
@autobolt autobolt force-pushed the feat/redact-debug-logging branch from 217b7a8 to 8dde2d6 Compare April 6, 2026 05:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- Add `OAuth2.config[:filtered_label]` to configure the placeholder used for filtered sensitive values in inspected objects and debug logging output.
- Add `OAuth2.config[:filtered_debug_keys]` to configure which key names have their values redacted from debug logging output.
- Add `OAuth2::ThingFilter` as the shared filtering primitive used by inspect-time and debug-log filtering.
- Make inspect-time and debug-log filters snapshot their configuration at initialization time rather than tracking later config changes.
- Automatically redacted values include:
  - Authorization headers
  - common token/secret fields in headers
  - query strings
  - form bodies
  - JSON payloads
- NOTE: debug logging has always been, and remains, opt-in. It is turned off by default.

Co-authored-by: autobolt <autobots@9thbit.net>
@autobolt autobolt force-pushed the feat/redact-debug-logging branch from 8dde2d6 to 594484b Compare April 6, 2026 05:55
@pboling pboling enabled auto-merge April 6, 2026 05:55
@pboling pboling disabled auto-merge April 6, 2026 06:02
@pboling pboling merged commit 9bc38fd into main Apr 6, 2026
33 of 36 checks passed
@pboling pboling deleted the feat/redact-debug-logging branch April 6, 2026 06:02
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