[okta] Fix user.target.email never being set for target users#18528
Draft
seanrathier wants to merge 1 commit intomainfrom
Draft
[okta] Fix user.target.email never being set for target users#18528seanrathier wants to merge 1 commit intomainfrom
seanrathier wants to merge 1 commit intomainfrom
Conversation
The ingest pipeline Painless script renames okta.target[].alternateId to alternate_id, but the subsequent `set` processor references the non-existent field okta_target_user.login. Because the condition `ctx.okta_target_user?.login != null` is always false, user.target.email is never populated for target user entities. Fix: copy from alternate_id (the renamed field) instead of login.
💔 Build Failed
Failed CI StepsHistory |
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
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.
Summary
user.target.emailis never populated for Okta target user entities due to a field name mismatch in the ingest pipeline.Root cause: The pipeline's Painless script (tag:
okta-target-modifications) renamesalternateId→alternate_idon every entry inokta.target. The firstUser-type entry is then stored asokta_target_user. However, the subsequentsetprocessor referencesokta_target_user.login— a field that was never created — instead ofokta_target_user.alternate_id.Impact: Any feature that reads
user.target.emailfrom Okta system logs (e.g. Entity Analyticscommunicates_withrelationship maintainer) receives no data from this index, even when hundreds of thousands of qualifying events are present.Test plan
application.user_membership.addor similar event with a User-type targetuser.target.emailis now populated with the target user's login/email (previouslynull)user.target.full_nameanduser.target.idare unaffected