-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
need kibana internal user to have read/write access to .kibana*
ILM resources
#46894
Comments
@pmuellr, does this set of privileges sound correct to you based on what you're trying to accomplish? We need the internal kibana user (
And we do not need privileges to do the following:
The |
Pinging @elastic/es-security |
Since we currently don't offer permissions for just a namespace of ILM policies, is it possible to hardcode those policies? It's not entirely clear how we can leverage this, but I thought I might ask. |
This is an interesting idea -- are you thinking about a "reserved" policy that would live inside ES, similar to how we have reserved users and roles defined? If ES defines a I also have 0 experience with IM development, so I don't know what the LoE is to introduce this concept to ES and the ILM UI itself. If we take this approach, are reserved ILM policies something that other stack components/solutions would want to take advantage of? Alerting probably won't be the last offering to want to leverage ILM "automatically", so maybe this is an idea worth exploring further. We likely won't want all of these service accounts to have the ability to create/edit these policies, especially since they aren't namespaced on their own. |
Ya, sounds right. Currently, we check if an ILM policy with the calculated name exists, and if it doesn't, we create it. We'll also then reference this in the index settings (I think that's where the association is made). We'll provide some default policy, but otherwise won't be updating it, or deleting it. |
@pmuellr before I open the PR, can you test this locally to make sure it suites your needs? 1) Create
|
Getting closer. I make two ILM-related calls, currently. A GET policy, and a PUT policy if the GET returned not found. Without the role/user above (just normal kibana run), I'd get a 403 on both. With the role/user above, now getting a 404 on the GET (yay, it works now!), but still get a 403 on the PUT. Here are the requests / responses:
|
For completeness, I'm making these calls with:
where
|
@pmuellr thanks for the quick feedback. Looks like I had a typo in my privilege set. This should do the trick:
|
Ya, that worked!
|
Opened #49451 |
Sorry, somehow completely missed this comment: #46894 (comment)
We are currently providing a very basic ILM policy, with the assumption a customer may want to customize it further. So "hard-coding" the policy values won't work. |
@pmuellr Even if we hard-coded an initial policy , we could document a way for the administrator to change it. For these uncommon changes we could require creating roles, etc... Under the present model, Larry's solution is the only option, but the new system role has potential for user data loss, if it can add the delete action to any existing ILM policy. I'll bring this issue up to the team and report back. |
Perhaps there's a better way to deal with this, compared to what I'm currently doing, this seemed like the most straight-forward approach. Open to other ideas. I'd imagine we might see more usage like this - Kibana subsystem wants to create some kind of new "log", that would be appropriate to apply ILM to, so set it up with a default ILM policy, and allow the customer to customize it. In fact, I've chatted with folks about a new log they might be adding in the future, that would probably have some of the same ILM type of characteristics. Seems like ultimately we want to have some kind of RBAC where we could give the kibana system user r/w access to just ILM policies with names that start with |
Currently, the internal kibana user does not have access to create or get ILM resources at all, as near as I can tell. For the "Make it Action" project, we're adding a new Kibana-specific index (with the default kibana prefix name
.kibana*
) and associated ILM policies, templates, etc. Currently creating templates and other resources works fine, but when trying to do a GET or PUT on an ILM policy with the.kibana*
prefix, we're seeing 403 errors. Not specific to that particular prefix, but if we end up allowing ILM GET/PUT on just indices with that prefix, WORKSFORME.Via off-line chat, @legrego believes the "answer" is to add more bits here:
elasticsearch/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java
Line 113 in 212e3e4
I'm unfamiliar with these bits of the Elastic Stack, so will defer to Larry, but am happy to provide more context if required.
The text was updated successfully, but these errors were encountered: