Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of nested fields in index reader wrappers #118757

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Dec 16, 2024

This update enhances the handling of parent filters to ensure proper exclusion of child documents.

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
@jimczi jimczi requested a review from jpountz December 16, 2024 11:03
@elasticsearchmachine elasticsearchmachine added the Team:Security Meta label for security team label Dec 16, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

@elasticsearchmachine
Copy link
Collaborator

Hi @jimczi, I've created a changelog YAML for you.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if (NestedHelper.mightMatchNestedDocs(roleQuery, context)) {
roleQuery = new BooleanQuery.Builder().add(roleQuery, FILTER)
.add(Queries.newNonNestedFilter(context.indexVersionCreated()), FILTER)
.build();
}
filter.add(roleQuery, SHOULD);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, the fix here is that roleQuery was updated, but not in the filter bool query. This ensures that roleQuery is added when we determined nested docs can match.

@jimczi jimczi added v8.16.3 auto-backport Automatically create backport pull requests when merged labels Dec 18, 2024
@jimczi jimczi merged commit ad9caae into elastic:main Dec 18, 2024
21 checks passed
@jimczi jimczi deleted the document_permissions_nested branch December 18, 2024 14:01
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.17 Commit could not be cherrypicked due to conflicts
8.x Commit could not be cherrypicked due to conflicts
8.16 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 118757

rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Dec 18, 2024
…18757)

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
@jimczi jimczi removed the auto-backport Automatically create backport pull requests when merged label Dec 18, 2024
jimczi added a commit to jimczi/elasticsearch that referenced this pull request Dec 18, 2024
…18757)

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
jimczi added a commit to jimczi/elasticsearch that referenced this pull request Dec 18, 2024
…18757)

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
jimczi added a commit to jimczi/elasticsearch that referenced this pull request Dec 18, 2024
…18757)

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
elasticsearchmachine pushed a commit that referenced this pull request Dec 18, 2024
…118976)

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
elasticsearchmachine pushed a commit that referenced this pull request Dec 18, 2024
…118977)

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
elasticsearchmachine pushed a commit that referenced this pull request Dec 18, 2024
…118981)

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
navarone-feekery pushed a commit to navarone-feekery/elasticsearch that referenced this pull request Dec 26, 2024
…18757)

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
sarog pushed a commit to sarog/elasticsearch that referenced this pull request Jan 22, 2025
…18757) (elastic#118977)

This update enhances the handling of parent filters to ensure proper exclusion of child documents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team v8.16.3 v8.17.1 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants