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

Fix min_doc_count handling when using Document Level Security #1712

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

cliu123
Copy link
Member

@cliu123 cliu123 commented Mar 29, 2022

Signed-off-by: cliu123 [email protected]

Description

[Describe what this change achieves]

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation) Bug fix
  • Why these changes are required?
    Fixes an issue in Document Level Security (DLS) by improving how the min_doc_count parameter is handled. The previous behavior returns keys for aggregations with 0 matches when min_doc_count is passed as 0, regardless of whether there are actually 0 matches or matches are not visible due to DLS rules. With this fix, we throw an error message if min_doc_count is passed as 0 and DLS rules are present for that index.

Testing

UTs

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@cliu123 cliu123 requested a review from a team March 29, 2022 17:05
@davidlago
Copy link

@cliu123 please backport to main as well once this merges. Thanks!

@cliu123 cliu123 merged commit c18a50a into opensearch-project:1.3 Mar 29, 2022
@cliu123 cliu123 deleted the min_doc_count branch March 29, 2022 18:36
floragunncom pushed a commit to floragunncom/search-guard that referenced this pull request Mar 3, 2024
floragunncom pushed a commit to floragunncom/search-guard that referenced this pull request Mar 3, 2024
floragunncom pushed a commit to floragunncom/search-guard that referenced this pull request Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants