-
Notifications
You must be signed in to change notification settings - Fork 213
Upload cookbooks to secure location #1
Comments
Starting to think that rsync might not be idea. Rather we could probably examine the cookbook dependency tree and sha's and upload using that which would be more inline with what Chef server does. Bonus points if we can leverage chef client code to do this. |
Extra note on this: for Windows support we'll have to ensure the folder can be changed (ie: c:/tmp instead of /tmp, or even something else). Just so you know! |
Use system! fail-fast calls for rsync
Making some progress on this in https://github.com/matschaffer/knife-solo/tree/issue/sudo-rsync-1 Still need to do a full test and set up error messages for people to update their solo.rb accordingly. |
Boo... so turns out that trick makes some assumptions about the sudo environment. Instead I've opted to move the root path config to a knife[:solo_path] config and chmod 700 the dir to avoid it being seen by anything other than the user controlling the ssh connection. |
Should be fixed with #145 |
Set the provisioning_path dir mode so that it is not world-readable. Fixes matschaffer#1.
In order to keep my cookbooks more secure
As a developer
I want my cookbooks to be uploaded to a non-world-readable location
Right now since we upload using rsync potentially as a non-privileged user we put all cookbooks in /tmp/chef-solo. Ideally we should be writing these to /var/chef or something more secure, but we'll need to figure out how to get rsync doing that. See https://github.com/matschaffer/knife-solo/blob/master/lib/chef/knife/cook.rb#L67 for rsync stuff.
The text was updated successfully, but these errors were encountered: