-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
make config files readonly to daemons #324
Conversation
@@ -177,7 +177,7 @@ | |||
|
|||
file { $config_dir: | |||
ensure => 'directory', | |||
owner => $user, | |||
owner => 'root', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't there an issue on BSD and this needed to be 0
instead of root
? I'm not 100% sure anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, that was only the group that is wheel
instead of root
, and where you use gid=0
. this is the owner
, and root
definitely exists on bsd.
Hi @anarcat, can you please rebase? |
On 2019-07-11 07:06:49, Tim Meusel wrote:
bastelfreak commented on this pull request.
> @@ -177,7 +177,7 @@
file { $config_dir:
ensure => 'directory',
- owner => $user,
+ owner => 'root',
Wasn't there an issue on BSD and this needed to be `0` instead of `root`? I'm not 100% sure anymore.
That's for the "root" group, which is called "wheel" in BSD, so we use
the numeric UID. I do not think it applies here.
|
Ping @anarcat |
It's bad practice to allow daemons to modify their own config files. This pattern seems to be common across this module, and I cannot think of a good reason why, as there is little chance (say) an exporter should have to modify its own config file. This reverts the policy by ensuring only minimal permissions are set on config files and directories deployed by Puppet. Only two directories are writable after this change: * /var/lib/prometheus * /usr/local/share/prometheus And I'm not even sure about the latter.
@bastelfreak pong, rebased. |
make config files readonly to daemons
Pull Request (PR) description
It's bad practice to allow daemons to modify their own config
files. This pattern seems to be common across this module, and I
cannot think of a good reason why, as there is little chance (say) an
exporter should have to modify its own config file.
This reverts the policy by ensuring only minimal permissions are set
on config files and directories deployed by Puppet. Only two
directories are writable after this change:
And I'm not even sure about the latter.
This Pull Request (PR) fixes the following issues
No issue was filed, but this problem was identified while working on the Debian packaging PR (#303) because the permissions on the files deployed by the Debian package would be broken.