-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Elastic Agent Upgrade Command Allows Downgrade to Insecure version #5543
Comments
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
I don't think we'll ever forbid going backwards as it is a useful escape hatch when the unexpected happens (although we are likely going to change the way this is implemented see discussion in elastic/kibana#172745). Up until the --unprivileged option was added, you had to be root on the local machine to do this which was reasonable protection. With unprivileged perhaps we could consider requiring root to upgrade as install and uninstall do since it is a similarly powerful operation. Root isn't naturally required for upgrade the way it is when installing because we aren't changing any of the OS service definitions. A potentially less disruptive change in the same vein would be to guard use of |
I believe the main concern here is the lack of restrictions on which versions you can downgrade to which is also discussed in the issue you referred to #172745 . While the suggestion to require root access for using
While downgrades can be valuable in certain situations, they should be tightly controlled in environments where security is critical, especially when reverting to older versions with potentially known vulnerabilities. https://discuss.elastic.co/t/beats-and-elastic-agent-8-11-3-7-17-16-security-update-esa-2023-30/349180 |
I think the reasoning behind using --skip-verify In an air-gapped environment, the agent won’t be able to download the remote key and therefore cannot be upgraded. Please check the release notes for 8.9.0 https://www.elastic.co/guide/en/fleet/8.9/release-notes-8.9.0.html |
The end implementation in elastic/kibana#172745 will be similar to this, we will only allow rolling back to the previously installed version and can disallow downgrades to arbitrary versions. I link that issue back to this one. |
Elastic Agent Upgrade Command Allows Downgrade to Insecure or older version.
Reproduction steps:
Currently we using 8.9.0
Recommendations:
Example use case:
Running the command elastic-agent upgrade <old_version> should either:
The text was updated successfully, but these errors were encountered: