-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Validate read priv of enrich source indices #43595
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
Conversation
This commit adds permissions validation on the indices provided in the enrich policy. These indices should be validated at store time so as not to have cryptic error messages in the event the user does not have permissions to access said indices.
|
Pinging @elastic/es-core-features |
|
@elasticmachine run elasticsearch-ci/2 |
martijnvg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I left a note around the error message.
|
|
||
| import java.nio.file.Path; | ||
|
|
||
| public class LocalStateEnrich extends LocalStateCompositeXPackPlugin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets hope this can be nuked soon (in master)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh yea... sins of my past
| if (r.isCompleteMatch()) { | ||
| putPolicy(request, listener); | ||
| } else { | ||
| listener.onFailure(Exceptions.authorizationError("Could not store policy because an index specified {} did not" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe: unable to store policy, because no indices match with the specified index patterns [{}]
I don't think we have to include the fact that the user has no privileges to read specific indices,
because the user is unable to verify the existence of indices matching with the specified patterns.
|
@elasticmachine update branch |
This commit adds permissions validation on the indices provided in the enrich policy. These indices should be validated at store time so as not to have cryptic error messages in the event the user does not have permissions to access said indices.
This commit adds permissions validation on the indices provided in the
enrich policy. These indices should be validated at store time so as not
to have cryptic error messages in the event the user does not have
permissions to access said indices.