Skip to content

Add --redaction option to log forwarding integrations - #117

Merged
pjcdawkins merged 3 commits into
upsun:mainfrom
mharacewiat:feat/sre-1663-log-redaction
Jul 29, 2026
Merged

Add --redaction option to log forwarding integrations#117
pjcdawkins merged 3 commits into
upsun:mainfrom
mharacewiat:feat/sre-1663-log-redaction

Conversation

@mharacewiat

Copy link
Copy Markdown
Contributor

Enables opt-in PII redaction for log lines forwarded via log forwarding integrations. When enabled, agilis strips sensitive data (e.g. email addresses) from log lines before they leave the host — satisfying the PCI-DSS requirement to never transmit PII off-machine unredacted.

Defaults to false (opt-in).

Ref SRE-1663.

@mharacewiat
mharacewiat force-pushed the feat/sre-1663-log-redaction branch from 35e88d8 to 4319d05 Compare June 26, 2026 08:49
@mharacewiat
mharacewiat marked this pull request as ready for review June 26, 2026 08:52
Copilot AI review requested due to automatic review settings June 26, 2026 08:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an opt-in boolean configuration field for log-forwarding integrations so users can enable PII redaction via the CLI (intended to prevent sensitive data from being forwarded off-host unredacted).

Changes:

  • Introduces a redaction BooleanField on integrations, gated to log-forwarding integration types.
  • Defaults the new setting to false (opt-in) and exposes it as a CLI option through the existing ConsoleForm wiring.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pjcdawkins and others added 2 commits July 29, 2026 07:04
PR upsun#20 extracted the six log-forwarding integration types into a
variable. Use it here instead of a fourth copy of the list, so adding
or removing a type updates every conditional field at once.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@pjcdawkins pjcdawkins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed and merging. Verified the field shape against agilis origin/master: Redaction bool on containers.LogsForwarderConfig, applied in transport.Forwarder.forwardEvent and shared by all six forwarders, so the six-type condition is right and false is the correct default.

I pushed one commit and merged main in. PR #20 landed just before this and extracted the six log-forwarding types into $logForwardingTypes; the redaction condition now uses that variable instead of a fourth copy of the list, so adding or removing a type updates every conditional field at once. No behavior change.

Two things I checked that turned out not to be problems, for the record:

  • integration:add does not transmit redaction: false unnecessarily — an absent flag yields no value rather than the field default.
  • The help text is accurate about what the built-in rule set covers.

Docs follow-up is mine: the forward-logs.md property table and the generated CLI reference need --redaction and --excluded-services from #20. One pass for both.

@pjcdawkins
pjcdawkins merged commit 6776dc9 into upsun:main Jul 29, 2026
5 checks passed
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.

3 participants