Affected Puppet, Ruby, OS and module versions/distributions
Puppet: all
Ruby: all
Distribution: all
Module version: 8.2.0
How to reproduce (e.g Puppet code you use)
Install a Redis using default conf with a password
class{"redis":
requirepass => "foo",
}
What are you seeing
The file /etc/redis/redis.conf which contains the password is readable by all users. Thus, it is trivial to a local unauthorized user to connect to the protected db.
What behaviour did you expect instead
The file /etc/redis/redis.conf should be readable only by redis user and its group.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Install a Redis using default conf with a password
What are you seeing
The file /etc/redis/redis.conf which contains the password is readable by all users. Thus, it is trivial to a local unauthorized user to connect to the protected db.
What behaviour did you expect instead
The file /etc/redis/redis.conf should be readable only by redis user and its group.
Output log
N/A
Any additional information you'd like to impart
I would advocate setting the
config_file_mode
to640
(see https://github.com/voxpupuli/puppet-redis/blob/3f7ecdd69061be0436c04c1dc9df8c20d884ea5f/manifests/init.pp#L276 ) It has an easy workaround (just set manually theconfig_file_mode
), however, since I assume a lot of instance are using default, I would think the more secure value should be the default. Plus640
is the default redis mode for the package.