This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file '/etc/issue.net' do | |
| content 'SUPER SECURE BANNER' | |
| end | |
| node.default['ssh-hardening']['ssh']['server']['banner'] = '/etc/issue.net' | |
| node.default['ssh-hardening']['ssh']['server']['challenge_response_authentication'] = true | |
| node.default['ssh-hardening']['ssh']['server']['password_authentication'] = true | |
| include_recipe 'ssh-hardening' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # encoding: utf-8 | |
| describe sshd_config do | |
| its('Banner') { should eq '/etc/issue.net' } | |
| its('ChallengeResponseAuthentication') { should eq 'yes' } | |
| its('PasswordAuthentication') { should eq 'yes' } | |
| end | |
| describe file('/etc/issue.net') do | |
| its('content') { should match /SUPER SECURE BANNER/ } | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| depends: | |
| - name: ssh-baseline | |
| url: https://github.com/dev-sec/ssh-baseline/archive/master.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node.default['ssh-hardening']['ssh']['server']['banner'] = '/etc/issue.net' | |
| node.default['ssh-hardening']['ssh']['server']['challenge_response_authentication'] = true | |
| node.default['ssh-hardening']['ssh']['server']['password_authentication'] = true | |
| include_recipe 'ssh-hardening' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # encoding: utf-8 | |
| describe sshd_config do | |
| its('Banner') { should eq '/etc/issue.net' } | |
| its('ChallengeResponseAuthentication') { should eq 'yes' } | |
| its('PasswordAuthentication') { should eq 'yes' } | |
| end | |
| describe file('/etc/issue.net') do | |
| its('content') { should match /SUPER SECURE BANNER/ } | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| driver: | |
| name: vagrant | |
| provisioner: | |
| name: chef_zero | |
| # You may wish to disable always updating cookbooks in CI or other testing environments. | |
| # For example: | |
| # always_update_cookbooks: <%= !ENV['CI'] %> | |
| always_update_cookbooks: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # encoding: utf-8 | |
| include_controls 'ssh-baseline' do | |
| skip_control 'sshd-27' | |
| skip_control 'sshd-29' | |
| skip_control 'sshd-46' | |
| end | |
| control 'mycorp-sshd-27' do | |
| impact 1.0 | |
| title 'Server: Enable password based authentication' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| all_web_nodes = search('node', 'role:web') | |
| members = [] | |
| all_web_nodes.each do |web_node| | |
| member = { | |
| 'address' => web_node['cloud']['public_hostname'], | |
| 'weight' => 100, | |
| 'port' => 80, | |
| 'ssl_port' => 80 |
NewerOlder