[elasticsearch] Fix audit event.outcome for security config changes - #21041
[elasticsearch] Fix audit event.outcome for security config changes#21041consulthys wants to merge 3 commits into
Conversation
Stop defaulting unmatched audit actions to failure so successful security_config_change events are not labeled as failures, and keep the target user on destination.user. Co-authored-by: Cursor <cursoragent@cursor.com>
✅ 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. |
Set event.category and event.type as ECS arrays, and apply the target-user fallback only after actor user.name is copied. Co-authored-by: Cursor <cursoragent@cursor.com>
TL;DRThe failed Buildkite step ( Remediation
Investigation detailsRoot CauseThe PR updates audit event outcome behavior for security config changes (e.g., Evidence
Verification
Follow-upIf regenerating expected outputs still fails, please share the uploaded What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
Static tests require event.category and event.type to be arrays after those fields were declared as ECS in the audit data stream. Co-authored-by: Cursor <cursoragent@cursor.com>
|
✅ All changelog entries have the correct PR link. |
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
History
|
Proposed commit message
Stop defaulting unmatched Elasticsearch audit actions to
event.outcome: failure. Successfulsecurity_config_changeevents such asput_userwere indexed as failures, which broke dashboards and detection rules. Map config-change targets todestination.userso actor attribution does not overwrite the affected user.Checklist
changelog.ymlfile.Author's Checklist
event.outcomeissuccessforsecurity_config_changeactions (put_user,change_password,put_role,delete_user, …)event.outcomeremainsfailurefor denied/failed authn/authz actionsunknown, notfailuredestination.user.*; actor stays onuser.namewhen presentelasticsearch.audit.put/change/deletepayloads are retainedHow to test this PR locally
If expected documents need a refresh after pipeline tweaks:
elastic-package test pipeline --data-streams audit --generateelastic-package check(lint + build) passed locally. Pipeline tests were not executed here because Docker was not available.Related issues
cc @ebarlas