[Security Assistant] DocumentsDataWriter user query fix#233545
Merged
stephmilovic merged 4 commits intoelastic:mainfrom Aug 30, 2025
Merged
[Security Assistant] DocumentsDataWriter user query fix#233545stephmilovic merged 4 commits intoelastic:mainfrom
DocumentsDataWriter user query fix#233545stephmilovic merged 4 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
DocumentsDataWriter user query fix
spong
approved these changes
Aug 29, 2025
Member
spong
left a comment
There was a problem hiding this comment.
Checked out, tested locally, and confirmed the issues reported in #233523 have been resolved. ++ to the approach taken here to separate out user filters. LGTM! 👍
Thanks for the quick fix here @stephmilovic!
Contributor
💚 Build Succeeded
Metrics [docs]Saved Objects .kibana field count
History
|
jkelas
pushed a commit
to jkelas/kibana
that referenced
this pull request
Sep 2, 2025
ymao1
pushed a commit
to ymao1/kibana
that referenced
this pull request
Sep 2, 2025
MichelLosier
pushed a commit
to MichelLosier/kibana
that referenced
this pull request
Sep 2, 2025
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.
Add user-specific filtering to
DocumentsDataWriterSummary
Conversation sharing introduced a new concept of users/ownership for conversations. However, the users filter in
DocumentsDataWriteris used on more than just the conversations data stream. Therefore, this change broke updates/deletes on other data stream types.This PR implements proper user-specific filtering in the
DocumentsDataWriterclass to ensure users can only access and modify documents they have permission to view. The implementation adds different filtering strategies for conversation documents and other (kb, prompt, etc) documents.getFilterByUsermethod: Implements filtering for non-conversation documents using nested user queries (previous implementation)getFilterByConversationUsermethod: Implements filtering for conversation documents usingcreated_byfieldbulkanddeletemethods now apply appropriate user filtering based on document typegetResourceName('conversation')to determine if operations are on conversation documents