Repository navigation
[system][auth] Populate user.target.* for IAM events (expand phase) - #20339
Merged
Merged
Conversation
Contributor
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
|
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
stanek-michal
approved these changes
Jul 23, 2026
fearful-symmetry
approved these changes
Jul 23, 2026
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
Adds ECS target-user mappings for Linux account-management events in the system.auth pipeline (#20105): - useradd: "new user: name=..., UID=..." maps the created account to user.target.name/user.target.id. - usermod: group membership additions and other account changes ("change user 'X' expiration ...") map the modified account to user.target.name. - PAM chauthtok (passwd): "password changed for X" maps the affected account to user.target.name. - userdel: new grok patterns extract user.target.name and group.name from "delete 'X' from (shadow) group 'Y'" (with event.action group-member-removed), "delete user 'X'", and "removed (shadow) group". To avoid a breaking change this is the expand half of an expand-and-contract migration: the affected account is still duplicated into user.name (and user.id for useradd) everywhere it was written before, so existing outputs are unchanged apart from the new fields. The duplication is deprecated; a future major version (contract phase) will stop writing user.name/user.id for these events once users have had a chance to move detections and dashboards to user.target.*. The compatibility processors are tagged *_compat so the contract-phase removal is mechanical. related.user includes the target names as before.
nicholasberlin
force-pushed
the
fix/system-auth-iam-user-target
branch
from
July 24, 2026 15:14
c1cb6cd to
845e82c
Compare
Contributor
|
✅ All changelog entries have the correct PR link. |
Contributor
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
History
|
This was referenced Jul 24, 2026
nicholasberlin
added a commit
that referenced
this pull request
Jul 24, 2026
…M events Contract phase of the expand-and-contract migration started in 2.22.0 (#20339): the auth data stream no longer writes the affected account to user.name/user.id for useradd account creation, usermod group membership, userdel deletion, and PAM password change events. The affected account remains in user.target.name (and user.target.id for useradd); user.name on these events is reserved for the acting user, matching ECS semantics. On journald input, useradd events now keep the actor UID from journald metadata in user.id instead of having it overwritten by the created account's UID. Mechanically this deletes the five *_compat processors that 2.22.0 introduced for backward compatibility and regenerates the pipeline test expectations, whose diff is exactly the removal of the duplicated fields. Ships as 3.0.0 with a breaking-change changelog entry so Kibana requires users to acknowledge the change before upgrading. The bundled New users and groups dashboard already reads user.target.* as of 2.23.0.
nicholasberlin
added a commit
that referenced
this pull request
Aug 3, 2026
Updates the "[Logs System] New users and groups" dashboard to read the created account from user.target.name/user.target.id instead of user.name/user.id in the four New users panels (table, over time, by shell, by home directory). The New groups panels are unchanged, as groupadd events still map group.name/group.id. Since system 2.22.0 (#20339) useradd events populate user.target.* with the created account; user.name/user.id only carry a deprecated duplication that a future major version will remove (contract phase of the expand-and-contract migration, #20105). Moving the dashboard to the new fields now means it keeps working after that removal. Note the New users panels only show events ingested with system 2.22.0 or later, where user.target.* was introduced for useradd events.
nicholasberlin
added a commit
that referenced
this pull request
Aug 3, 2026
…M events Contract phase of the expand-and-contract migration started in 2.22.0 (#20339): the auth data stream no longer writes the affected account to user.name/user.id for useradd account creation, usermod group membership, userdel deletion, and PAM password change events. The affected account remains in user.target.name (and user.target.id for useradd); user.name on these events is reserved for the acting user, matching ECS semantics. On journald input, useradd events now keep the actor UID from journald metadata in user.id instead of having it overwritten by the created account's UID. Mechanically this deletes the five *_compat processors that 2.22.0 introduced for backward compatibility and regenerates the pipeline test expectations, whose diff is exactly the removal of the duplicated fields. Ships as 3.0.0 with a breaking-change changelog entry so Kibana requires users to acknowledge the change before upgrading. The bundled New users and groups dashboard already reads user.target.* as of 2.23.0.
nicholasberlin
added a commit
that referenced
this pull request
Aug 3, 2026
…M events Contract phase of the expand-and-contract migration started in 2.22.0 (#20339): the auth data stream no longer writes the affected account to user.name/user.id for useradd account creation, usermod group membership, userdel deletion, and PAM password change events. The affected account remains in user.target.name (and user.target.id for useradd); user.name on these events is reserved for the acting user, matching ECS semantics. On journald input, useradd events now keep the actor UID from journald metadata in user.id instead of having it overwritten by the created account's UID. Mechanically this deletes the five *_compat processors that 2.22.0 introduced for backward compatibility and regenerates the pipeline test expectations, whose diff is exactly the removal of the duplicated fields. Ships as 3.0.0 with a breaking-change changelog entry so Kibana requires users to acknowledge the change before upgrading. The bundled New users and groups dashboard already reads user.target.* as of 2.23.0.
nicholasberlin
added a commit
that referenced
this pull request
Aug 3, 2026
Updates the "[Logs System] New users and groups" dashboard to read the created account from user.target.name/user.target.id instead of user.name/user.id in the four New users panels (table, over time, by shell, by home directory). The New groups panels are unchanged, as groupadd events still map group.name/group.id. Since system 2.22.0 (#20339) useradd events populate user.target.* with the created account; user.name/user.id only carry a deprecated duplication that a future major version will remove (contract phase of the expand-and-contract migration, #20105). Moving the dashboard to the new fields now means it keeps working after that removal. Note the New users panels only show events ingested with system 2.22.0 or later, where user.target.* was introduced for useradd events.
nicholasberlin
added a commit
that referenced
this pull request
Sep 14, 2026
Updates the "[Logs System] New users and groups" dashboard to read the created account from user.target.name/user.target.id instead of user.name/user.id in the four New users panels (table, over time, by shell, by home directory). The New groups panels are unchanged, as groupadd events still map group.name/group.id. Since system 2.22.0 (#20339) useradd events populate user.target.* with the created account; user.name/user.id only carry a deprecated duplication that a future major version will remove (contract phase of the expand-and-contract migration, #20105). Moving the dashboard to the new fields now means it keeps working after that removal. Note the New users panels only show events ingested with system 2.22.0 or later, where user.target.* was introduced for useradd events.
nicholasberlin
added a commit
that referenced
this pull request
Sep 14, 2026
…M events Contract phase of the expand-and-contract migration started in 2.22.0 (#20339): the auth data stream no longer writes the affected account to user.name/user.id for useradd account creation, usermod group membership, userdel deletion, and PAM password change events. The affected account remains in user.target.name (and user.target.id for useradd); user.name on these events is reserved for the acting user, matching ECS semantics. On journald input, useradd events now keep the actor UID from journald metadata in user.id instead of having it overwritten by the created account's UID. Mechanically this deletes the five *_compat processors that 2.22.0 introduced for backward compatibility and regenerates the pipeline test expectations, whose diff is exactly the removal of the duplicated fields. Ships as 3.0.0 with a breaking-change changelog entry so Kibana requires users to acknowledge the change before upgrading. The bundled New users and groups dashboard already reads user.target.* as of 2.24.0.
nicholasberlin
added a commit
that referenced
this pull request
Sep 14, 2026
…M events Contract phase of the expand-and-contract migration started in 2.22.0 (#20339): the auth data stream no longer writes the affected account to user.name/user.id for useradd account creation, usermod account changes (for example group membership or expiration changes), userdel deletion, and PAM password change events. The affected account remains in user.target.name (and user.target.id for useradd); user.name on these events is reserved for the acting user, matching ECS semantics. On journald input, useradd events now keep the actor UID from journald metadata in user.id instead of having it overwritten by the created account's UID. Mechanically this deletes the five *_compat processors that 2.22.0 introduced for backward compatibility and regenerates the pipeline test expectations, whose diff is exactly the removal of the duplicated fields. Ships as 3.0.0 with a breaking-change changelog entry so Kibana requires users to acknowledge the change before upgrading. The bundled New users and groups dashboard already reads user.target.* as of 2.24.0.
nicholasberlin
added a commit
that referenced
this pull request
Sep 15, 2026
Updates the "[Logs System] New users and groups" dashboard to read the created account from user.target.name/user.target.id instead of user.name/user.id in the four New users panels (table, over time, by shell, by home directory). The New groups panels are unchanged, as groupadd events still map group.name/group.id. Since system 2.22.0 (#20339) useradd events populate user.target.* with the created account; user.name/user.id only carry a deprecated duplication that a future major version will remove (contract phase of the expand-and-contract migration, #20105). Moving the dashboard to the new fields now means it keeps working after that removal. Note the New users panels only show events ingested with system 2.22.0 or later, where user.target.* was introduced for useradd events.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Adds ECS target-user mappings for Linux account-management (IAM) events in the
system.auth pipeline, where the affected account was previously only available
in
user.name(semantically the actor) or not extracted at all(#20105):
new user: name=..., UID=...maps the created account touser.target.name/user.target.id.(
change user 'X' expiration ...) map the modified account touser.target.name.password changed for Xmaps the affected accountto
user.target.name.user.target.nameandgroup.namefromdelete 'X' from (shadow) group 'Y'(withevent.action: group-member-removed, mirroring usermod'sgroup-member-added),delete user 'X', andremoved (shadow) group 'X'. Previously nothing wasextracted from these messages.
To avoid a breaking change this is the expand half of an expand-and-contract
migration: the affected account is still duplicated into
user.name(anduser.idfor useradd) everywhere it was written before, so existing outputsare unchanged apart from the new fields. The duplication is deprecated; a
future major version (contract phase) will stop writing
user.name/user.idfor these events once users have had a chance to move detections and
dashboards to
user.target.*(user.name= actor,user.target.name=account the action was performed on). The compatibility processors are
tagged
*_compatso the contract-phase removal is mechanical. The changelogentry announces the deprecation.
related.userincludes the affected accounts as before.The regenerated expected files also pick up 2025 -> 2026 year changes for
test logs with year-less syslog timestamps; the date processor fills in the
current year at execution time, so these are required for the tests to pass.
Checklist
I have verified that all data streams collect metrics or logs.N/A, pipeline-only changechangelog.ymlfile.I have verified that Kibana version constraints are current according to guidelines.N/AI have verified that any added dashboard complies with Kibana's Dashboard good practicesN/AAuthor's Checklist
release except for added
user.target.*(andgroup.name/event.actionon the new userdel extractions) — verified by diffing regenerated expected
files against main.
*_compatprocessors, ship atype: breaking-changechangelog entry, andmigrate content still reading the affected account from
user.name(e.g. the "[Logs System] New users and groups" dashboard).
How to test this PR locally
Or simulate directly, e.g.:
with the sample events from #20105 (useradd, usermod,
userdel, and passwd chauthtok messages) and verify
user.target.name,group.name, andrelated.userare populated as described, whileuser.name/user.idkeep their previous values.Related issues