fraenki / puppet-sshkeys

Puppet module to manage ssh public keys.
https://forge.puppetlabs.com/fraenki/sshkeys
BSD 2-Clause "Simplified" License
9 stars 9 forks source link

automatically fix permissions of authorized_keys file #4

Closed fraenki closed 9 years ago

fraenki commented 9 years ago

This introduces a new parameter fix_permissions to automatically fix file permissions of the $home/.ssh/authorized_keys files. The new parameter defaults to true but can be disabled by setting it to false.

Why? A user could easily set file permissions to 0400 and not only make sshkeys unusable, but also stop puppet from working:

Notice: /Stage[main]/Sshkeys/Sshkeys::User[test]/Sshkeys::Key[test@host_at_test@example.com]/Ssh_authorized_key[test@host_at_test@example.com]/ensure: created
Error: Puppet::Util::FileType::FileTypeFlat could not write /home/test/.ssh/authorized_keys: Permission denied - /home/test/.ssh/authorized_keys
artem-sidorenko commented 9 years ago

@fraenki It's definitely usefull and makes sense, but may you please make Travis CI happy?;)

fraenki commented 9 years ago

@artem-sidorenko I don't think it's related to my commit. It fails even without my changes. Can you confirm this?

fraenki commented 9 years ago

@artem-sidorenko Please retest after applying #5.

fraenki commented 9 years ago

@artem-sidorenko It finally passes CI tests :)

artem-sidorenko commented 9 years ago

@fraenki yes, thx a lot:)