-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
[Transform] Fix privileges check failures by adding allow_restricted_indices
flag
#95187
[Transform] Fix privileges check failures by adding allow_restricted_indices
flag
#95187
Conversation
Pinging @elastic/ml-core (Team:ML) |
Hi @przemekwitek, I've created a changelog YAML for you. |
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 am happy to merge this to fix the immediate problem.
It wouldn't surprise me if another problem emerges in this area though. The docs for _has_privileges
say that allow_restricted_indices
is an option for that endpoint to stop spurious failures from indices that users might not know exist. For example, before if a user had *agents*
as their source index pattern and it was matching my-own-agents-1
and my-own-agents-2
then the previous check would have passed but the new one will fail because it will also match .fleet-agents-1
and the user won't have access to that. Hopefully what will help us avoid this is that most index patterns don't begin with a wildcard, and all system indices begin with a dot. So hopefully the change in this PR won't fix one situation but break a load of others.
Thanks for verifying this fix! |
## Summary Resolves #154740 #154741 These tests were skipped due to an ES promotion block. This PR: elastic/elasticsearch#95187 was added on the ES side and another snapshot was promoted which should allow us to un skip these tests. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Co-authored-by: Kibana Machine <[email protected]>
This PR adds
allow_restricted_indices
flag to theHasPrivilegesRequest
s issued byTransformPrivilegeChecker
.This allows having restricted indices as transforms' source indices so cases like Fleet are supported.
Relates #93259