-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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] Transform permissions enhancements to support Fleet install #93259
Comments
Pinging @elastic/ml-core (Team:ML) |
Sounds like a good plan, however I have to comment this wording:
I think most of the requirements listed already work exactly as described, e.g. There are some details which don't work as described, for example:
Afaik it currently skips over the privilege check. To implement this we would need to still make the check but don't error. For some details I am not sure it is feasible, e.g. it might be complex to check if a destination index can potentially be created without creating it. We can check the rights to create for sure, however I don't think we can check every possible reason why this might fail later, especially as by design the system isn't completely setup yet. I suggest to relax this and record only that install runs in Note that health should report the credentials problem already, however maybe not as user friendly:
TestingI think the 1st step should be to create fully automated test cases for this. However best to my knowledge with the tooling that is available in elasticsearch it will be hard, #89759 only added very basic yaml tests that verify that you can create |
Thanks for this hint Hendrik! I'll start with expanding the scope of the yaml tests you created for |
This project is all about how we can make the overall experience of installing a Fleet package nicer. The outline plan is:
I am not sure yaml tests are the best way to go for testing this long sequence of events that will require multiple intermediate states to be waited for. Could it be simulated in the |
Sure. I'll use yaml only for the simple scenarios. What I meant by "expanding the scope" referred to adding more use-cases that possibly result from this issue. |
elastic/kibana#137278 details a requirement for the Fleet installer to be able to install transforms where the
kibana_system
user does not have permissions to access the source and/or destination indices of the transform. In some cases the user installing the package may have access to the transform source and destination indices, while in other cases they may not, so this situation needs to be accounted for too.The plan is to make the following changes to transforms in Elasticsearch to support this:
defer_validation=true
is set when the transform is created, we should still check whether the supplied credentials are adequate. However, if they are not anddefer_validation=true
is set, we should record that the credentials are invalid but still let the transform be created.One problem here is that we'll be relying on
_has_privileges
to determine whether the credentials are valid, and that doesn't work for cross cluster search. This functionality will still be useful for transforms that don't search cross-cluster. But for transforms that do cross cluster search we'll end up documenting that the user who installs the Fleet package needs to have all the permissions required to run the transform, and relying on people to follow that documentation.cc @qn895
The text was updated successfully, but these errors were encountered: