Skip to content

New LWRP: authorized_key#19

Closed
kampfschlaefer wants to merge 3 commits into
markolson:masterfrom
kampfschlaefer:feature/add_authorized_keys
Closed

New LWRP: authorized_key#19
kampfschlaefer wants to merge 3 commits into
markolson:masterfrom
kampfschlaefer:feature/add_authorized_keys

Conversation

@kampfschlaefer

Copy link
Copy Markdown

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...

Similar to the known_host resource, this allows adding authorized keys to users authorized_keys files.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

@markolson

Copy link
Copy Markdown
Owner

Just the one comment to start - looks good though! Thanks for the contribution.

Rename the cookbook here too.
@tejaycar

tejaycar commented Sep 1, 2015

Copy link
Copy Markdown
Collaborator

Closing in favor of #45

@tejaycar tejaycar closed this Sep 1, 2015
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

Successfully merging this pull request may close these issues.

3 participants