Skip to content
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

Can this exporter be simplified by using sudo #10

Open
altmind opened this issue Jul 11, 2019 · 2 comments
Open

Can this exporter be simplified by using sudo #10

altmind opened this issue Jul 11, 2019 · 2 comments

Comments

@altmind
Copy link

altmind commented Jul 11, 2019

Thanks for a great exporter.
I see that the only reason this app is split in two subcomponents is to avoid running the whole thing as root. It seems that the only place that actually need root is running smartctl subprocess.

Dont you think exporter can be dramatically simplified if there is option to skip smart_exporter_helper and run sudo smartctl directly instead. sudo is flexible enough to allow only smartctl for designated user.

@altmind
Copy link
Author

altmind commented Jul 11, 2019

Worth noting, that by skipping helper we can skip the dependency on pkg-config and python-systemd.

@horazont
Copy link
Collaborator

horazont commented Jan 13, 2020

@altmind Yes, sudo is flexible enough. It is a trade-off between system configuration (which we cannot really manage) and dependencies (which we have control over).

In addition, this separation allows to put many more restrictions into place. Think about ProtectSystem=full, PrivateDevices (via systemd) etc. etc. all of which wouldn’t be possible if smartctl needs to run as a child of the web server process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants