New LWRP: authorized_key#19
Conversation
Similar to the known_host resource, this allows adding authorized keys to users authorized_keys files.
There was a problem hiding this comment.
There is a default_or_user_path helper (https://github.com/markolson/chef-ssh/blob/master/libraries/ssh_path_helpers.rb) that the config and known_host LWRPs use to get the .ssh path. Could this also use that? It also handles creating the directory as needed.
There was a problem hiding this comment.
Yeah, I used that first. But if I use that to select between the default path of #{node['etc']['passwd'][ssh_user]['dir']}/.ssh/authorized_keys and the path-argument, the mechanism creating the ssh-dir assumes its the global config dir and sets permission 0755, which for the 'default' personal .ssh-dir is so insecure that ssh will not use it...
|
Just the one comment to start - looks good though! Thanks for the contribution. |
Rename the cookbook here too.
|
Closing in favor of #45 |
A lwrp to add keys to a users authorized_keys file.
Remove keys could follow soon. But I don't yet know how to test that...