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

Use 'should' clause instead of 'filter' when querying native privileges #47019

Merged
merged 2 commits into from
Sep 26, 2019

Conversation

bizybot
Copy link
Contributor

@bizybot bizybot commented Sep 24, 2019

When we added support for wildcard application names, we started to build
the prefix query along with the term query but we used 'filter' clause
instead of 'should', so this would not fetch the correct application
privilege descriptor thereby failing the _has_privilege checks.
This commit changes the clause to use should and with minimum_should_match
as 1.

When we added support for wildcard application names, we started to build
the prefix query along with the term query but we used 'filter' clause
instead of 'should', so this would not fetch the correct application
privilege descriptor thereby failing the `_has_privilege` checks.
This commit changes the clause to use `should` and with `minimum_should_match`
as 1.
@bizybot bizybot added >bug :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC v8.0.0 v7.5.0 labels Sep 24, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@bizybot
Copy link
Contributor Author

bizybot commented Sep 25, 2019

build failed due to existing intermittent issue
@elasticmachine run elasticsearch-ci/1

@tvernum
Copy link
Contributor

tvernum commented Sep 25, 2019

@bizybot This is a bug fix, it should be backported to 7.4.1 as well.

Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

LGTM

@tvernum tvernum added the v7.4.1 label Sep 25, 2019
Copy link
Contributor

@albertzaharovits albertzaharovits left a comment

Choose a reason for hiding this comment

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

LGTM

@bizybot bizybot merged commit cdd2d58 into elastic:master Sep 26, 2019
bizybot added a commit to bizybot/elasticsearch that referenced this pull request Sep 30, 2019
…es (elastic#47019)

When we added support for wildcard application names, we started to build
the prefix query along with the term query but we used 'filter' clause
instead of 'should', so this would not fetch the correct application
privilege descriptor thereby failing the _has_privilege checks.
This commit changes the clause to use should and with minimum_should_match
as 1.
bizybot added a commit to bizybot/elasticsearch that referenced this pull request Sep 30, 2019
…es (elastic#47019)

When we added support for wildcard application names, we started to build
the prefix query along with the term query but we used 'filter' clause
instead of 'should', so this would not fetch the correct application
privilege descriptor thereby failing the _has_privilege checks.
This commit changes the clause to use should and with minimum_should_match
as 1.
bizybot added a commit that referenced this pull request Sep 30, 2019
…es (#47019) (#47271)

When we added support for wildcard application names, we started to build
the prefix query along with the term query but we used 'filter' clause
instead of 'should', so this would not fetch the correct application
privilege descriptor thereby failing the _has_privilege checks.
This commit changes the clause to use should and with minimum_should_match
as 1.
bizybot added a commit that referenced this pull request Sep 30, 2019
…es (#47019) (#47272)

When we added support for wildcard application names, we started to build
the prefix query along with the term query but we used 'filter' clause
instead of 'should', so this would not fetch the correct application
privilege descriptor thereby failing the _has_privilege checks.
This commit changes the clause to use should and with minimum_should_match
as 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants