-
Notifications
You must be signed in to change notification settings - Fork 154
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
Enroll command doesn't support --unprivileged
flag for deb and rpm agents.
#4125
Comments
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
@manishgupta-qasource Please review. |
Secondary review for this ticket is Done |
I don't understand the ask here. I know there was discussion about adding the ability to switch from privileged mode to unprivileged mode and back again with another command, that should be what is used here for this, not during |
Thanks @blakerouse for your inputs. |
I agree that the flag need not be available on the enroll. (apologies @amolnater-qasource i didn't fully understand your original question which prompted this issue) @blakerouse RPMs always will need root priv to install - I don;t think theres an exception to this. However here the application that it installs needs to run without root priv. But I suspect that there's no way for us to pass this flag to RPM/DEB for the installation phase of the agent (i don;t even think such a thing exists). If we can't pass a flag to the installation phase of the agent, then the only option is to allow for the conversion to happen after install. That issue we had deprioritized for now. @pierrehilbert from a product perspective I see it simply as the same use case (as in the user needs the application to be running without root privileges). They're using a tool to install the agents. |
Chatted with @blakerouse today. Summarizing:
|
@ycombinator, @nimarezainia It's just an early draft, but I'm gathering the "unprivileged" docs together in this PR. @blakerouse whenever you have them, if you'd like to just let me know the how-to steps I can look after adding them into the docs: @kaanyalti I think the "pre-requisites and gotchas" could go in tables like these, but we can update the format once the list becomes more clear. |
Reading through the steps mentioned in #4125 (comment) needed to close this issue:
This is something @kilfoyle already took care of in elastic/ingest-docs#1087.
@kilfoyle would you mind taking care of this part as well, since it's docs-related, either as part of elastic/ingest-docs#1087 or in a follow up PR? |
Pinging @elastic/ingest-docs (Team:Docs) |
@ycombinator Sure thing. Here's a docs PR: elastic/ingest-docs#1144 |
I think there is one thing we need to validate, and that is an upgrade of the RPM/DEB doesn't revert some of the paths from unprivileged back to a privileged Elastic Agent. Once an Elastic Agent is switched it should remain that way even if upgraded from RPM/DEB. That will be on me to check. |
Just adding a note here that this docs PR should merge after this issue is resolved. |
Kibana Build details:
Host OS: Linux- SLES15, Ubuntu 22
Preconditions:
Steps to reproduce:
sudo ./elastic-agent enroll --url=<url> --enrollment-token=<token> --unprivileged
Screenshot:
![image](https://private-user-images.githubusercontent.com/77374876/299202075-d91266e4-2594-4187-b657-aead68e21daa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MTE3MzksIm5iZiI6MTczOTYxMTQzOSwicGF0aCI6Ii83NzM3NDg3Ni8yOTkyMDIwNzUtZDkxMjY2ZTQtMjU5NC00MTg3LWI2NTctYWVhZDY4ZTIxZGFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA5MjM1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJiZjdhNGU2MDBjMjIyNTIxNjNhMzk2ZTk5MDg4YjAwMGZjNzUxY2YxYmZiNDcwNmQ3NDI1YmYyNTg3NmJmNzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IpeUDVAee11iPPGEWXzt_OX8pa0mLL2Cz1lwm0D0-Ew)
Expected Result:
User should be able to enroll agents using
--unprivileged
flag.Feature:
https://github.com/elastic/ingest-dev/issues/1766
Definition of done:
Taken from #4125 (comment):
The text was updated successfully, but these errors were encountered: