-
Notifications
You must be signed in to change notification settings - Fork 458
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
[Meta] Highlight packages that need to be run as root #8642
Comments
Pinging @elastic/fleet (Team:Fleet) |
fyi: @jamiehynds @andrewkroh for Security external integrations |
We're figuring out impacted packages on the security side. @norrietaylor's already linked the linux host integrations that require root, and @pzl's opened a PR to update the endpoint package. |
Universal Profiling is affected as well but should be fixed with #8651. Just out of curiosity: |
Both are not linked for now but need to be done in a near future where Agent will need to report through metadata the mode it is running in.
|
Should we be doing this for packages (or data streams) that normally require admin access on Windows too? Or should we wait for Elastic Agent to implement this feature for Windows (equivalent to elastic/elastic-agent#3598)? |
I'd say do it for all the packages and datastreams. Whether we have the implementation for Windows or not. At the moment, this mainly allows us to notify the user and there are no controls or checks to see what mode the agent is running. |
@graphaelli & @simitt wanted to also bring this issue to your attention. |
Thanks @lucabelluccini. |
@bturquet @lalit-satapathy @tommyers-elastic any follow up issue to add here or will all 'your' integrations work out of the box without root/admin privilegeS? |
Last time we discussed it we could not think of any issues for Hosted Services |
@bturquet does your team have a suite of smoktests for us to determine how the proposed changes will impact the integrations? We have a linux image that is going through some smoketesting. It would be great to be as comprehensive as possible. |
The apm-server itself does not require root privileges, so we do not expect issues with the apm-server. Once this is available for testing, please let us know so we can verify everything still works as expected. |
@simitt this is available for testing on linux host once you provide the |
@jlind23 I'm a bit confused now, my understanding is as follows: starting in version x ( It's not clear to me from reading this and related issues where the |
Hey @simitt |
Hi @jlind23, Is there a quick way to find out which integration would require a root access to be run? Are there any static checks today, which will fail, if agent.privileges is not set and the integration requires a root permission? Out of the long list integrations, How do we find some specific corner case integration requiring root permission, if any ? |
More specifically than root, it will be anything that a basic user on the system cannot do without being granted additional privileges. There are generally two categories here:
That second category will be the one that causes the most problems, because anything that reads a log file is potentially affected depending on where that log file is located. This should allow us to exclude certain integrations from being affected quickly as well, for example integrations that are only making HTTP requests should not require root.
One thing that complicates this is that the tests in this repository run in containers, and container file systems do not always match up with the official native file system of that Linux distribution. For example the ubuntu:22.04 container does not contain |
A quick addition to this, there are ports that require root to bind to them (those <1024) so integrations that implement servers are potentially affected depending on what ports they use. |
@cmacknz, This is a good list of what to look for checking packages requiring root access. Assuming system & windows packages are being looked into already.
Does stated input fit into this category? This is one of inputs, where we are spawning a server in metricbeat. |
@lalit-satapathy You are probably the most knowledgeable about this input as according to the CODEOWNERS file your team owns it. The Elastic Agent team will not test each and every integration, this has to be done by the packages owners.
|
@kpollich What do you think about closing this as the only remaining task is elastic/elastic-package#1586? Using only elastic/elastic-package#1586 is probably enough wdyt? |
Yes we can close this issue in favor of the Elastic Package work. FYI that issue is blocked on elastic/elastic-package#787 for now. |
We are driving an effort to encourage the declaration packages that need to be run as root.
This option has been added here and will require new package version in order to let developers define this value.
By default all packages are NOT marked as requiring root privileges to properly run which might lead to confusion if users try to deploy a package that need root privileges but that was never updated.
Tasks
The text was updated successfully, but these errors were encountered: