• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: Commit

Grid環境構築用のChefリポジトリです。


Commit MetaInfo

Revisioneb808f9ae05d8b24888d8477f9ac6d89d40752b6 (tree)
Zeit2016-01-31 18:14:16
Autorwhitestar <whitestar@gaea...>
Commiterwhitestar

Log Message

add SSH-CA KRL configuration.

Ändern Zusammenfassung

Diff

--- a/cookbooks/ssh_utils/CHANGELOG.md
+++ b/cookbooks/ssh_utils/CHANGELOG.md
@@ -1,6 +1,10 @@
11 ssh_utils CHANGELOG
22 ===================
33
4+0.2.0
5+-----
6+- add SSH-CA KRL configuration.
7+
48 0.1.1
59 -----
610 - update for Ubuntu 14.04
--- a/cookbooks/ssh_utils/README.md
+++ b/cookbooks/ssh_utils/README.md
@@ -20,7 +20,8 @@ Attributes
2020 |Key|Type|Description, example|Default|
2121 |:--|:--|:--|:--|
2222 |`['ssh_utils']['with_ssl_cert_cookbook']`|Boolean|works with `ssl_cert` cookbook.|`false`|
23-|`['ssh_utils']['ssl_cert']['ca_pubkey_name']`|String|deployed SSH-CA public key name.|`nil`|
23+|`['ssh_utils']['ssl_cert']['ca_pubkey_name']`|String|deployed SSH-CA public key name from chef-fault.|`nil`|
24+|`['ssh_utils']['ssl_cert']['ssh_ca_krl_name']`|String|deployed SSH-CA KRL name from chef-vault. (0.2.0 or later)|`nil`|
2425 |`['ssh_utils']['sshd_config']['extra_props']['<property_name>']`|String of Array|properties for sshd_config.|empty|
2526
2627 Usage
@@ -32,7 +33,10 @@ Usage
3233 - set up OpenSSH server.
3334 - If `node['ssh_utils']['with_ssl_cert_cookbook']` is true,
3435 `node['ssh_utils']['sshd_config']['extra_props']['TrustedUserCAKeys']` is overridden
35- by the file path based on `node['ssh_utils']['ssl_cert']['ca_pubkey_name']` attributes.
36+ by the file path based on `node['ssh_utils']['ssl_cert']['ca_pubkey_name']` attribute.
37+- If `node['ssh_utils']['with_ssl_cert_cookbook']` is true,
38+`node['ssh_utils']['sshd_config']['extra_props']['RevokedKeys']` is overridden
39+ by the file path based on `node['ssh_utils']['ssl_cert']'ssh_ca_krl_name']` attribute too.
3640
3741 License and Authors
3842 -------------------
--- a/cookbooks/ssh_utils/attributes/default.rb
+++ b/cookbooks/ssh_utils/attributes/default.rb
@@ -22,13 +22,18 @@ default['ssh_utils']['with_ssl_cert_cookbook'] = false
2222 # node['ssh_utils']['sshd_config']['extra_props']['TrustedUserCAKeys']
2323 # is overridden by the following 'ca_pubkey_name' attributes.
2424 default['ssh_utils']['ssl_cert']['ca_pubkey_name'] = nil
25+# If node['ssh_utils']['with_ssl_cert_cookbook'] is true,
26+# node['ssh_utils']['sshd_config']['extra_props']['RevokedKeys']
27+# is overridden by the following 'ssh_ca_krl_name' attributes.
28+default['ssh_utils']['ssl_cert']['ssh_ca_krl_name'] = nil # e.g. 'grid_ssh_ca'
2529
2630 # server
2731 default['ssh_utils']['sshd_config'] = {
2832 'extra_props' => {
2933 # e.g.
3034 #'Banner' => '/etc/issue.net',
31- #'TrustedUserCAKeys' => '/path/to/ca_public_keys.pub',
35+ #'TrustedUserCAKeys' => '/path/to/ssh_ca_public_keys.pub',
36+ #'RevokedKeys' => '/path/to/ssh_ca.krl',
3237 },
3338 }
3439
--- a/cookbooks/ssh_utils/metadata.rb
+++ b/cookbooks/ssh_utils/metadata.rb
@@ -4,7 +4,7 @@ maintainer_email ''
44 license 'Apache 2.0'
55 description 'Installs/Configures ssh_utils'
66 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7-version '0.1.1'
7+version '0.2.0'
88
9-depends 'ssl_cert', '>= 0.2.0'
9+depends 'ssl_cert', '>= 0.3.0'
1010
--- a/cookbooks/ssh_utils/recipes/server.rb
+++ b/cookbooks/ssh_utils/recipes/server.rb
@@ -17,10 +17,16 @@
1717 # limitations under the License.
1818 #
1919
20-if node['ssh_utils']['with_ssl_cert_cookbook'] \
21- && !node['ssh_utils']['ssl_cert']['ca_pubkey_name'].nil? then
22- node.override['ssh_utils']['sshd_config']['extra_props']['TrustedUserCAKeys'] \
23- = node['ssl_cert']["#{node['ssh_utils']['ssl_cert']['ca_pubkey_name']}_pubkey_path"]
20+if node['ssh_utils']['with_ssl_cert_cookbook'] then
21+ if !node['ssh_utils']['ssl_cert']['ca_pubkey_name'].nil? then
22+ node.override['ssh_utils']['sshd_config']['extra_props']['TrustedUserCAKeys'] \
23+ = node['ssl_cert']["#{node['ssh_utils']['ssl_cert']['ca_pubkey_name']}_pubkey_path"]
24+ end
25+
26+ if !node['ssh_utils']['ssl_cert']['ssh_ca_krl_name'].nil? then
27+ node.override['ssh_utils']['sshd_config']['extra_props']['RevokedKeys'] \
28+ = node['ssl_cert']["#{node['ssh_utils']['ssl_cert']['ssh_ca_krl_name']}_krl_path"]
29+ end
2430 end
2531
2632 [
Show on old repository browser