-
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
Implement a way to run external scripts #18323
Comments
Pinging @elastic/integrations (Team:Integrations) |
Regarding the last point about dropping privileges. We definitely need to do this for heartbeat, which runs as root by default. Perhaps we could just switch users? Another thought is we could do a check to see if we're running as root by default. A final thought is that heartbeat no longer really needs to run as root now that we support rootless ping. Maybe it's time to change that. |
Big +1 to this feature, I think this will be great, specially for heartbeat.
The idea is to allow to run commands installed explicitly for beats? If not, I think it'd be good if binaries installed by root are also allowed, so Beats can use any command installed on the machine, without the need of being executed as root for that (though this opens the pandora's box of running shells and interpreters). Mentioned privileges dropping could still be used to limit some things in any case. |
Yes, actually I think this was in our initial discussions, I've added that option to the description
We will probably want both commands installed by beats (ie a JMX converter), and installed by the user. For the later, seems that a good security measure is that the folder where they are located must be included in the config before (ie, having a scripts folder) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue in favor of elastic/elastic-agent#1237 as this makes more sense in the context of Elastic Agent then beats itself. All the technical discussion here still makes sense and should be taken into account for elastic/elastic-agent#1237 |
We want to run external processes in some parts of Beats. A few cases we want to support are:
This issue is minded to implement a common mechanism that we can reuse in several places, with a simple API.
Security model:
Running external stuff can represent an attack vector so we should put some measures in place to avoid issues, for anything that we run we should require:
The text was updated successfully, but these errors were encountered: