forked from dev-sec/ansible-nginx-hardening
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Gumprich
committed
Jul 26, 2016
0 parents
commit 1b9dcf1
Showing
22 changed files
with
665 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
README.pdf | ||
README.html | ||
shared_test_repo/ | ||
test/integration | ||
.kitchen | ||
coverage | ||
Vagrantfile.erb | ||
|
||
Gemfile.lock | ||
Berksfile.lock | ||
|
||
ansible.cfg | ||
hosts |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
driver: | ||
name: vagrant | ||
|
||
provisioner: | ||
name: ansible_playbook | ||
test_repo_uri: https://github.com/hardening-io/tests-ssh-hardening.git | ||
hosts: all | ||
require_ansible_repo: false | ||
require_ansible_omnibus: true | ||
require_chef_for_busser: false | ||
require_ruby_for_busser: false | ||
ansible_verbose: true | ||
roles_path: ../ansible-ssh-hardening/ | ||
playbook: default.yml | ||
|
||
platforms: | ||
- name: ubuntu-12.04 | ||
driver_config: | ||
box: opscode-ubuntu-12.04 | ||
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box | ||
- name: ubuntu-14.04 | ||
driver_config: | ||
box: opscode-ubuntu-14.04 | ||
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box | ||
- name: centos-6.4 | ||
driver_config: | ||
box: opscode-centos-6.4 | ||
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box | ||
- name: centos-6.5 | ||
driver_config: | ||
box: opscode-centos-6.5 | ||
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box | ||
- name: oracle-6.4 | ||
driver_config: | ||
box: oracle-6.4 | ||
box_url: https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel64-64.box | ||
- name: oracle-6.5 | ||
driver_config: | ||
box: oracle-6.5 | ||
box_url: https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel65-64.box | ||
- name: debian-6 | ||
driver_config: | ||
box: debian-6 | ||
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-6.0.10_chef-provisionerless.box | ||
- name: debian-7 | ||
driver_config: | ||
box: debian-7 | ||
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8_chef-provisionerless.box | ||
- name: debian-8 | ||
driver_config: | ||
box: debian-8 | ||
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-8.1_chef-provisionerless.box | ||
|
||
verifier: | ||
name: inspec | ||
sudo: true | ||
inspec_tests: | ||
- https://github.com/dev-sec/tests-ssh-hardening | ||
|
||
suites: | ||
- name: ssh-ansible_1.9 | ||
provisioner: | ||
ansible_version: 1.9.4 | ||
- name: ssh-ansible_latest |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
driver: | ||
name: docker | ||
|
||
transport: | ||
max_ssh_sessions: 5 | ||
|
||
provisioner: | ||
name: ansible_playbook | ||
hosts: all | ||
require_ansible_repo: false | ||
require_ansible_omnibus: true | ||
require_chef_for_busser: false | ||
require_ruby_for_busser: false | ||
requirements_path: requirements.yml | ||
ansible_verbose: true | ||
ansible_diff: true | ||
roles_path: ../ansible-nginx-hardening/ | ||
playbook: default.yml | ||
|
||
verifier: | ||
name: inspec | ||
sudo: true | ||
inspec_tests: | ||
- https://github.com/dev-sec/tests-nginx-hardening | ||
|
||
platforms: | ||
- name: ubuntu-12.04 | ||
driver: | ||
image: ubuntu:12.04 | ||
- name: ubuntu-14.04 | ||
driver: | ||
image: ubuntu:14.04 | ||
- name: ubuntu-16.04 | ||
driver: | ||
image: ubuntu:16.04 | ||
- name: centos-6.6 | ||
driver: | ||
image: centos:6.6 | ||
- name: centos-6.7 | ||
driver: | ||
image: centos:6.7 | ||
- name: centos-7 | ||
driver: | ||
image: centos:7 | ||
privileged: true | ||
run_command: /usr/sbin/init | ||
- name: debian-7 | ||
driver: | ||
image: debian:7 | ||
- name: debian-8 | ||
driver: | ||
image: debian:8 | ||
|
||
verifier: | ||
name: inspec | ||
sudo: true | ||
inspec_tests: | ||
- https://github.com/dev-sec/tests-nginx-hardening | ||
|
||
suites: | ||
- name: nginx-ansible_1.9 | ||
provisioner: | ||
ansible_version: 1.9.4 | ||
- name: nginx-ansible_latest |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
notifications: | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ | ||
language: python | ||
python: "2.7" | ||
|
||
env: | ||
- ANSIBLE_VERSION=latest | ||
- ANSIBLE_VERSION=1.9.4 | ||
|
||
before_install: | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -qq python-apt python-pycurl | ||
install: | ||
- if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install ansible==$ANSIBLE_VERSION; fi | ||
- echo -e 'localhost ansible_connection=local' > spec/inventory | ||
- echo -e '[defaults]\nroles_path = ../\nhostfile = ./spec/inventory' > ansible.cfg | ||
|
||
script: | ||
- ansible-playbook --syntax-check spec/travis.yml | ||
- ansible-playbook --sudo -v --diff spec/travis.yml | ||
- ansible-playbook --sudo -v --diff spec/travis.yml --extra-vars "network_ipv6_enable=true ssh_allow_root_with_key=true ssh_client_password_login=true ssh_client_cbc_required=true ssh_server_weak_hmac=true ssh_client_weak_kex=true sftp_enabled=true" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Change Log | ||
|
||
## [3.0.0](https://github.com/hardening-io/ansible-ssh-hardening/tree/HEAD) | ||
|
||
[Full Changelog](https://github.com/hardening-io/ansible-ssh-hardening/compare/2.0.0...HEAD) | ||
|
||
**Implemented enhancements:** | ||
|
||
- Added sftp\_enabled, sftp\_chroot\_dir, and ssh\_client\_roaming from the … [\#57](https://github.com/hardening-io/ansible-ssh-hardening/pull/57) ([shirokatze](https://github.com/shirokatze)) | ||
- add test support for ansible 1.9 and 2.0 [\#56](https://github.com/hardening-io/ansible-ssh-hardening/pull/56) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- update platforms in meta-file [\#52](https://github.com/hardening-io/ansible-ssh-hardening/pull/52) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- add webhook for ansible galaxy [\#51](https://github.com/hardening-io/ansible-ssh-hardening/pull/51) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Disable experimental client roaming. [\#49](https://github.com/hardening-io/ansible-ssh-hardening/pull/49) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- use inspec as test framework [\#48](https://github.com/hardening-io/ansible-ssh-hardening/pull/48) ([chris-rock](https://github.com/chris-rock)) | ||
- Change categories to tags for upcoming ansible 2.0 [\#47](https://github.com/hardening-io/ansible-ssh-hardening/pull/47) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- add changelog generator [\#46](https://github.com/hardening-io/ansible-ssh-hardening/pull/46) ([chris-rock](https://github.com/chris-rock)) | ||
|
||
**Closed issues:** | ||
|
||
- Fail at TASK \[remove selinux-policy when Pam is used...\] when ssh\_use\_pam: true [\#54](https://github.com/hardening-io/ansible-ssh-hardening/issues/54) | ||
- Install from ansible galaxy missing files \(tasks\) [\#50](https://github.com/hardening-io/ansible-ssh-hardening/issues/50) | ||
- should generate new ssh host key files [\#45](https://github.com/hardening-io/ansible-ssh-hardening/issues/45) | ||
|
||
## [2.0.0](https://github.com/hardening-io/ansible-ssh-hardening/tree/2.0.0) (2015-11-28) | ||
[Full Changelog](https://github.com/hardening-io/ansible-ssh-hardening/compare/1.2.1...2.0.0) | ||
|
||
**Closed issues:** | ||
|
||
- Fix directory structure. [\#43](https://github.com/hardening-io/ansible-ssh-hardening/issues/43) | ||
|
||
**Merged pull requests:** | ||
|
||
- New dir layout. Fix \#43 [\#44](https://github.com/hardening-io/ansible-ssh-hardening/pull/44) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Add var to travis job [\#42](https://github.com/hardening-io/ansible-ssh-hardening/pull/42) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- sftp\_enable option [\#41](https://github.com/hardening-io/ansible-ssh-hardening/pull/41) ([fitz123](https://github.com/fitz123)) | ||
|
||
## [1.2.1](https://github.com/hardening-io/ansible-ssh-hardening/tree/1.2.1) (2015-10-16) | ||
[Full Changelog](https://github.com/hardening-io/ansible-ssh-hardening/compare/1.2.0...1.2.1) | ||
|
||
**Merged pull requests:** | ||
|
||
- Allow whitelisted groups on ssh [\#40](https://github.com/hardening-io/ansible-ssh-hardening/pull/40) ([fheinle](https://github.com/fheinle)) | ||
|
||
## [1.2.0](https://github.com/hardening-io/ansible-ssh-hardening/tree/1.2.0) (2015-09-28) | ||
[Full Changelog](https://github.com/hardening-io/ansible-ssh-hardening/compare/1.1.0...1.2.0) | ||
|
||
**Merged pull requests:** | ||
|
||
- bugfix. Now option true for PrintLastLog is available again [\#39](https://github.com/hardening-io/ansible-ssh-hardening/pull/39) ([fitz123](https://github.com/fitz123)) | ||
- Add more travis-tests [\#38](https://github.com/hardening-io/ansible-ssh-hardening/pull/38) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Support for selinux and pam. fix \#23 [\#35](https://github.com/hardening-io/ansible-ssh-hardening/pull/35) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
|
||
## [1.1.0](https://github.com/hardening-io/ansible-ssh-hardening/tree/1.1.0) (2015-09-01) | ||
[Full Changelog](https://github.com/hardening-io/ansible-ssh-hardening/compare/1.0.0...1.1.0) | ||
|
||
**Closed issues:** | ||
|
||
- ssh\_ports - individual client/server config [\#33](https://github.com/hardening-io/ansible-ssh-hardening/issues/33) | ||
- UsePAM should probably default to yes on Red Hat Linux 7 [\#23](https://github.com/hardening-io/ansible-ssh-hardening/issues/23) | ||
|
||
**Merged pull requests:** | ||
|
||
- Change variable for hmac from server to client [\#37](https://github.com/hardening-io/ansible-ssh-hardening/pull/37) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Update kitchen-ansible, remove separate debian install [\#36](https://github.com/hardening-io/ansible-ssh-hardening/pull/36) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Separate ssh client and server ports. Fix \#33 [\#34](https://github.com/hardening-io/ansible-ssh-hardening/pull/34) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- update common kitchen.yml platforms \(ansible\), kitchen\_debian.yml platforms \(ansible\) [\#32](https://github.com/hardening-io/ansible-ssh-hardening/pull/32) ([chris-rock](https://github.com/chris-rock)) | ||
- Make MaxAuthTries configurable [\#31](https://github.com/hardening-io/ansible-ssh-hardening/pull/31) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Change oneliner if-statements to be more readable [\#30](https://github.com/hardening-io/ansible-ssh-hardening/pull/30) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Make ssh client password login configurable. [\#29](https://github.com/hardening-io/ansible-ssh-hardening/pull/29) ([ypid](https://github.com/ypid)) | ||
- Fix join-filter, jinja-cases, intendation [\#27](https://github.com/hardening-io/ansible-ssh-hardening/pull/27) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Short role review. Fixed role when ssh\_client\_weak\_kex == true. [\#26](https://github.com/hardening-io/ansible-ssh-hardening/pull/26) ([ypid](https://github.com/ypid)) | ||
- Make it configurable to only harden ssh client/server or both \(default\). [\#25](https://github.com/hardening-io/ansible-ssh-hardening/pull/25) ([ypid](https://github.com/ypid)) | ||
- Separate system-vars from editable vars [\#24](https://github.com/hardening-io/ansible-ssh-hardening/pull/24) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Add correct CONTRIB-file [\#22](https://github.com/hardening-io/ansible-ssh-hardening/pull/22) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Add Ansible Galaxy badge [\#21](https://github.com/hardening-io/ansible-ssh-hardening/pull/21) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- fix configuration of playbook path [\#20](https://github.com/hardening-io/ansible-ssh-hardening/pull/20) ([chris-rock](https://github.com/chris-rock)) | ||
- Debian install script [\#19](https://github.com/hardening-io/ansible-ssh-hardening/pull/19) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
|
||
## [1.0.0](https://github.com/hardening-io/ansible-ssh-hardening/tree/1.0.0) (2015-04-30) | ||
**Implemented enhancements:** | ||
|
||
- Update variable-documentation [\#12](https://github.com/hardening-io/ansible-ssh-hardening/pull/12) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
|
||
**Closed issues:** | ||
|
||
- add travis test for ubuntu 12.04 [\#7](https://github.com/hardening-io/ansible-ssh-hardening/issues/7) | ||
- Use handler for sshd restart [\#6](https://github.com/hardening-io/ansible-ssh-hardening/issues/6) | ||
- Running test-kitchen fails [\#2](https://github.com/hardening-io/ansible-ssh-hardening/issues/2) | ||
|
||
**Merged pull requests:** | ||
|
||
- add self as author [\#18](https://github.com/hardening-io/ansible-ssh-hardening/pull/18) ([chris-rock](https://github.com/chris-rock)) | ||
- add badges [\#17](https://github.com/hardening-io/ansible-ssh-hardening/pull/17) ([chris-rock](https://github.com/chris-rock)) | ||
- fix meta.yml [\#16](https://github.com/hardening-io/ansible-ssh-hardening/pull/16) ([chris-rock](https://github.com/chris-rock)) | ||
- add more information to changelog [\#15](https://github.com/hardening-io/ansible-ssh-hardening/pull/15) ([chris-rock](https://github.com/chris-rock)) | ||
- Add meta-information for Ansible Galaxy [\#14](https://github.com/hardening-io/ansible-ssh-hardening/pull/14) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Update CHANGELOG.md [\#13](https://github.com/hardening-io/ansible-ssh-hardening/pull/13) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Add handler to restart ssh only if necessary. Fix \#6 [\#11](https://github.com/hardening-io/ansible-ssh-hardening/pull/11) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- add more descriptions [\#10](https://github.com/hardening-io/ansible-ssh-hardening/pull/10) ([chris-rock](https://github.com/chris-rock)) | ||
- add travis config for ansible [\#9](https://github.com/hardening-io/ansible-ssh-hardening/pull/9) ([chris-rock](https://github.com/chris-rock)) | ||
- update .kitchen.yml to find playbook role in tests [\#8](https://github.com/hardening-io/ansible-ssh-hardening/pull/8) ([chris-rock](https://github.com/chris-rock)) | ||
- Oracle support [\#5](https://github.com/hardening-io/ansible-ssh-hardening/pull/5) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Remove custom Vagrantfile-reference. Fix \#2 [\#4](https://github.com/hardening-io/ansible-ssh-hardening/pull/4) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Remove custom Vagrantfile-reference. Fix \#2 [\#3](https://github.com/hardening-io/ansible-ssh-hardening/pull/3) ([rndmh3ro](https://github.com/rndmh3ro)) | ||
- Fix missing gem [\#1](https://github.com/hardening-io/ansible-ssh-hardening/pull/1) ([chris-rock](https://github.com/chris-rock)) | ||
|
||
|
||
|
||
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Contributor Guideline | ||
|
||
This document provides an overview of how you can participate in improving this project or extending it. We are grateful for all your help: bug reports and fixes, code contributions, documentation or ideas. Feel free to join, we appreciate your support!! | ||
|
||
## Communication | ||
|
||
### GitHub repositories | ||
|
||
Much of the issues, goals and ideas are tracked in the respective projects in GitHub. Please use this channel to report bugs and post ideas. | ||
|
||
## git and GitHub | ||
|
||
In order to contribute code please: | ||
|
||
1. Fork the project on GitHub | ||
2. Clone the project | ||
3. Add changes (and tests) | ||
4. Commit and push | ||
5. Create a merge-request | ||
|
||
To have your code merged, see the expectations listed below. | ||
|
||
You can find a well-written guide [here](https://help.github.com/articles/fork-a-repo). | ||
|
||
Please follow common commit best-practices. Be explicit, have a short summary, a well-written description and references. This is especially important for the merge-request. | ||
|
||
Some great guidelines can be found [here](https://wiki.openstack.org/wiki/GitCommitMessages) and [here](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message). | ||
|
||
|
||
## Expectations | ||
|
||
### Don't reinvent the wheel | ||
|
||
This hardening project doesn't intend to reinvent the configuration stack for services. Aim to use official configuration projects first and provide hardening as a layer on top. The goal is remove the need for a user to configure all aspects of services and maintain security configuration. This way, the user can still configure a service using the interface provided by the official project. | ||
|
||
* For Chef refer to the official [opscode community cookbooks](http://community.opscode.com/cookbooks). | ||
* For Puppet head to the [Puppet Forge](https://forge.puppetlabs.com/) and take a node of the Puppet supported modules. | ||
* For Ansible check the [Ansible Module Index](http://docs.ansible.com/list_of_all_modules.html) | ||
|
||
These projects are generally hosted on GitHub as well. | ||
|
||
In some cases, we in fact create the full rollout stack, but this is generally the exception ([os-hardening](https://github.com/TelekomLabs/chef-os-hardening), [nginx-hardening](https://github.com/TelekomLabs/chef-nginx-hardening)). | ||
|
||
|
||
### Be explicit | ||
|
||
* Please avoid using nonsensical property and variable names. | ||
* Use self-describing attribute names for user configuration. | ||
* In case of failures, communicate what happened and why a failure occurs to the user. Make it easy to track the code or action that produced the error. Try to catch and handle errors if possible to provide improved failure messages. | ||
|
||
|
||
### Add tests | ||
|
||
The security review of this project is done using integration tests. | ||
|
||
Whenever you add a new security configuration, please start by writing a test that checks for this configuration. For example: If you want to set a new attribute in a configuration file, write a test that expects the value to be set first. Then implement your change. | ||
|
||
You may add a new feature request by creating a test for whatever value you need. | ||
|
||
All tests will be reviewed internally for their validity and overall project direction. | ||
|
||
|
||
### Document your code | ||
|
||
As code is more often read than written, please provide documentation in all projects. | ||
|
||
Adhere to the respective guidelines for documentation: | ||
|
||
* Chef generally documents code based explicit readme files. For code documentation please use [yard-chef](https://github.com/rightscale/yard-chef) | ||
* [Puppet module documentation](http://docs.puppetlabs.com/puppet/latest/reference/modules_documentation.html) | ||
|
||
|
||
### Follow coding styles | ||
|
||
We generally include test for coding guidelines: | ||
|
||
* Chef follows [Foodcritic](http://acrmp.github.io/foodcritic/) | ||
* Puppet is checked with [puppet-lint](http://puppet-lint.com/checks/) | ||
* Ansible is checked by running the playbook with the syntax-check option, e.g. `ansible-playbook foo.yml --syntax-check` | ||
|
||
Remember: Code is generally read much more often than written. | ||
|
||
### Use Markdown | ||
|
||
Wherever possible, please refrain from any other formats and stick to simple markdown. |
Oops, something went wrong.