refactor(system.auth): consolidate auth message parsing#16542
refactor(system.auth): consolidate auth message parsing#16542andrewkroh merged 3 commits intoelastic:mainfrom
Conversation
Extract duplicated message parsing logic from log.yml and journald.yml into a shared message.yml pipeline. This consolidates processing for SSH events, sudo commands, PAM messages, user/group management, and event categorization into a single location. The shared pipeline operates on an input contract where callers set the 'message' field before invocation. This eliminates the _temp.message intermediate field. The log pipeline parses the syslog header and extracts the message body directly into the message field (when the beats syslog processor hasn't already done so). The journald pipeline does some minor cleanup to fields produced by the journald input to align with ECS and eliminate noise. The message field is now preserved for all events regardless of input type, unifying behavior between log and journald inputs. Add event.kind: pipeline_error to the default.yml on_failure handler per best practices. Fix mustache template escaping in message.yml error messages to use triple braces for proper value interpolation.
239f83c to
f7a2aa4
Compare
|
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
🚀 Benchmarks reportTo see the full report comment with |
|
Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as |
Tacklebox
left a comment
There was a problem hiding this comment.
The auth log pipelines have a single source of truth and can't get out of sync now 👍
💚 Build Succeeded
History
|
|
Package system - 2.11.0 containing this change is available at https://epr.elastic.co/package/system/2.11.0/ |
Extract duplicated message parsing logic from log.yml and journald.yml into a shared message.yml pipeline. This consolidates processing for SSH events, sudo commands, PAM messages, user/group management, and event categorization into a single location. The shared pipeline operates on an input contract where callers set the 'message' field before invocation. This eliminates the _temp.message intermediate field. The log pipeline parses the syslog header and extracts the message body directly into the message field (when the beats syslog processor hasn't already done so). The journald pipeline does some minor cleanup to fields produced by the journald input to align with ECS and eliminate noise. The message field is now preserved for all events regardless of input type, unifying behavior between log and journald inputs. Add event.kind: pipeline_error to the default.yml on_failure handler per best practices. Fix mustache template escaping in message.yml error messages to use triple braces for proper value interpolation.
Proposed commit message
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
This will make it easier to incorporate the enhanced PAM log processing logic from #14456.
Screenshots