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

[CPDNPQ-2411] Redact to addresses in mailer logs #2216

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rwrrll
Copy link
Contributor

@rwrrll rwrrll commented Feb 11, 2025

Context

Ticket: https://dfedigital.atlassian.net/browse/CPDNPQ-2411

When Rails mailers process and deliver outbound mail, recipient addresses are leaking into Rails log output, which is a PII concern.

  • We can't use Rails filter_parameters because it doesn't cover mailer parameters, only HTTP requests.
  • Rails Semantic Logger has filtering functionality, but it's primarily for dropping entire lines, implementing redaction felt too complex/heavy.
  • So the solution I've gone with is to intercept and redact the incoming event as it flows through the log stack by prepending a simple module.

Copy link
Contributor

@rwrrll rwrrll marked this pull request as ready for review February 11, 2025 15:50
@rwrrll rwrrll requested a review from a team as a code owner February 11, 2025 15:50
@rwrrll rwrrll marked this pull request as draft February 11, 2025 16:15
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.

1 participant