-
Notifications
You must be signed in to change notification settings - Fork 4.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
Functionbeat requires manage_index_templates cluster permission with Elasticsearch 7.16 #29554
Comments
Same issue with filebeats
given the latest log4j RCE having overly permissive security configurations are getting more dangerous than ever. |
Pinging @elastic/es-security (Team:Security) |
Thanks for your feedback. I've tagged our security team for their context. However, I think this change may be specific to Beats and not Elasticsearch. We might need to transfer the issue to the Beats repo (https://github.com/elastic/beats) to hear from the experts there. |
I can provide more details if needed. Have a setup that i can demonstrate the issue |
We've tracked this down to being triggered by elastic/elasticsearch#78832 and the fact that |
All three template types (legacy templates, composable index templates and component templates) are stored in cluster state metadata (in fields "templates", "index_template" and "component_template"). This cluster state is readable (via GET /_cluster/state) for users who have the monitor privilege at the cluster level. However, calling the explicit read endpoints for these templates required the manage_index_templates privilege. This change grants access to the template specific retrieval APIs for all users (or API Keys) with the cluster monitor privilge so that they can make use of these fit-for-purpose APIs instead of parsing data directly from cluster metadata Relates: elastic/beats#29554, elastic#78832
All three template types (legacy templates, composable index templates and component templates) are stored in cluster state metadata (in fields "templates", "index_template" and "component_template"). This cluster state is readable (via GET /_cluster/state) for users who have the monitor privilege at the cluster level. However, calling the explicit read endpoints for these templates required the manage_index_templates privilege. This change grants access to the template specific retrieval APIs for all users (or API Keys) with the cluster monitor privilege so that they can make use of these fit-for-purpose APIs instead of parsing data directly from cluster metadata Relates: elastic/beats#29554 Relates: #78832
All three template types (legacy templates, composable index templates and component templates) are stored in cluster state metadata (in fields "templates", "index_template" and "component_template"). This cluster state is readable (via GET /_cluster/state) for users who have the monitor privilege at the cluster level. However, calling the explicit read endpoints for these templates required the manage_index_templates privilege. This change grants access to the template specific retrieval APIs for all users (or API Keys) with the cluster monitor privilege so that they can make use of these fit-for-purpose APIs instead of parsing data directly from cluster metadata Relates: elastic/beats#29554 Relates: elastic#78832
All three template types (legacy templates, composable index templates and component templates) are stored in cluster state metadata (in fields "templates", "index_template" and "component_template"). This cluster state is readable (via GET /_cluster/state) for users who have the monitor privilege at the cluster level. However, calling the explicit read endpoints for these templates required the manage_index_templates privilege. This change grants access to the template specific retrieval APIs for all users (or API Keys) with the cluster monitor privilge so that they can make use of these fit-for-purpose APIs instead of parsing data directly from cluster metadata Relates: elastic/beats#29554, elastic#78832 Backport of: elastic#82046
All three template types (legacy templates, composable index templates and component templates) are stored in cluster state metadata (in fields "templates", "index_template" and "component_template"). This cluster state is readable (via GET /_cluster/state) for users who have the monitor privilege at the cluster level. However, calling the explicit read endpoints for these templates required the manage_index_templates privilege. This change grants access to the template specific retrieval APIs for all users (or API Keys) with the cluster monitor privilege so that they can make use of these fit-for-purpose APIs instead of parsing data directly from cluster metadata Relates: elastic/beats#29554 Relates: #78832
All three template types (legacy templates, composable index templates and component templates) are stored in cluster state metadata (in fields "templates", "index_template" and "component_template"). This cluster state is readable (via GET /_cluster/state) for users who have the monitor privilege at the cluster level. However, calling the explicit read endpoints for these templates required the manage_index_templates privilege. This change grants access to the template specific retrieval APIs for all users (or API Keys) with the cluster monitor privilge so that they can make use of these fit-for-purpose APIs instead of parsing data directly from cluster metadata Relates: elastic/beats#29554, #78832 Backport of: #82046
All three template types (legacy templates, composable index templates and component templates) are stored in cluster state metadata (in fields "templates", "index_template" and "component_template"). This cluster state is readable (via GET /_cluster/state) for users who have the monitor privilege at the cluster level. However, calling the explicit read endpoints for these templates required the manage_index_templates privilege. This change grants access to the template specific retrieval APIs for all users (or API Keys) with the cluster monitor privilege so that they can make use of these fit-for-purpose APIs instead of parsing data directly from cluster metadata Relates: elastic/beats#29554 Relates: elastic#78832
All three template types (legacy templates, composable index templates and component templates) are stored in cluster state metadata (in fields "templates", "index_template" and "component_template"). This cluster state is readable (via GET /_cluster/state) for users who have the monitor privilege at the cluster level. However, calling the explicit read endpoints for these templates required the manage_index_templates privilege. This change grants access to the template specific retrieval APIs for all users (or API Keys) with the cluster monitor privilege so that they can make use of these fit-for-purpose APIs instead of parsing data directly from cluster metadata Relates: elastic/beats#29554 Relates: elastic#78832
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Hi, This can really wreak havoc when updating to es 7.16+ with older clients (like what is recommended in the upgrade guide). I think that this has to be added to the upgrade documentation. -- |
If someone encounters this problem, this privelege structure works currently.
The one in the documentation didn't work for me
I'm going to give 8.xx a try to see whether this is fixed, there are couple of PRs linked to this issue. |
From my experience, 8.0.0 seems to work fine without |
Thanks @Nirusu for reporting it, closing it for now then. |
after a year, i still see the same problem
elasticsearch 8.8.1 |
Elasticsearch version (
bin/elasticsearch --version
): 7.16 (Elastic Cloud)Description of the problem including expected versus actual behavior:
After Elasticsearch was upgraded in Elastic Cloud to 7.16, our Functionbeat stopped working. We see following error in our logs:
This issue can circumvented by adding the
manage_index_templates
to the role. However, the question is why should Functionbeat need that privilege? Isn't this overly permissive? Why should Functionbeat be able to manage index templates? It's also not mentioned by Functionbeat 7.16 documentation, so I'm not sure whether this functionality is intended.Steps to reproduce:
Set up Elasticsearch 7.16 and try to index something with Functionbeat without
manage_index_template
privilege. Version does not seem to matter.The text was updated successfully, but these errors were encountered: