-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New cookbook: fb_ssh #58
base: main
Are you sure you want to change the base?
Conversation
|
||
module FB | ||
class SSH | ||
DESTDIR = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should probably be configurable (not everybody will have/want the same paths).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree... one of the things we've almost never done in fb cookbooks is make configuration paths configurable....
rebased and addressed review comments |
bb22af9
to
0356777
Compare
6402389
to
eea046d
Compare
Added windows support |
This is a cookbook to manage SSH using the FB attribute-driven model. It handles daemon and client configs as well as authorized_keys and authorized_principals. There are few things worth noting here: 1. The API for public keys uses a `data_bag`. Grocery delivery and taste-tester have long supported data_bags even though FB doesn't use them in prod... but it doesn't matter since FB uses principals in prod and not keys, so this shouldn't be an issue no matter what. 2. The CLA for FB includes a grant of all copyrights, but the copyright, AIUI still should say me, so it does. However, I've left the maintainer as the standard FB template.
Hey there @jaymzh (and @davide125)! Apologies for resurrecting this PR, but I wanted to a) point out what I think is a bug I found, and b) ask if there was any chance this could get merged, as we'd like to use it! Regarding the bug, I believe that the current default of joining arrays by spaces does not work for the node.default['fb_ssh']['sshd_config'] = {
'HostKey' => [
'/etc/ssh/ssh_host_rsa_key',
'/etc/ssh/ssh_host_ecdsa_key',
'/etc/ssh/ssh_host_ed25519_key',
],
# ...
} Using this results in the following error:
I'm not familiar with openssh's codebase, but I believe this is because the ...and here is how it parses If I understand correctly, it's only taking one argument at a time from the Finally, regarding merging, at Etsy we've been exploring using Facebook-style cookbooks for freshening up our Chef configuration, and found it really pleasant so far! We'd like to be able to customize our Thanks both! |
Hi @ericnorris - thanks for commenting. The delay on merging this is because FB has an internal fb_ssh cookbook, so it's a migration for them, and resources on that team are currently a bit limited. I'm happy to continue keeping this up-to-date in the PR though, and the Vicarious folks are already using it (I just left there, but I wrote it while I was there). FB will get to it, but it'll take some time. I'm hoping to update a bunch of my PRs that submit new cookbooks in the coming weeks now that I have a bit more time. The HostKey is an interesting one. I think there are only two config keys that require multi-define - |
Appreciate the fast response @jaymzh! Understood, we have a mechanism for pulling in your fork for a given cookbook (e.g. this and Also appreciate you offering to keep it up to date! I agree, Finally, I'd be curious to see if there's an |
If you'd like to contribute a cookbook to manage PAM, we should be able to merge it without issues. As @jaymzh mentioned, the main blocker to merging this one is refactoring our internal one and migrating off it. |
I don't think multi-defining works for anything else. For example So I don't think there's a format that works for everything, unfortunately. |
This is a cookbook to manage SSH using the FB attribute-driven model.
It handles daemon and client configs as well as authorized_keys and
authorized_principals.
There are few things worth noting here:
The API for public keys uses a
data_bag
. Grocery delivery andtaste-tester have long supported data_bags even though FB doesn't use
them in prod... but it doesn't matter since FB uses principals in prod
and not keys, so this shouldn't be an issue no matter what.
The CLA for FB includes a grant of all copyrights, but the copyright,
AIUI still should say me, so it does. However, I've left the maintainer
as the standard FB template.