Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit f56e209

Browse files
author
Sebastian Gumprich
committed
update readme, kitchen.yml, requirements.yml
readme: - make vars a table - replace hardening with dev-sec - add anton to authors kitchen.yml - consolidate variables use geerlingguy mysql role
1 parent bf3bcc2 commit f56e209

File tree

4 files changed

+26
-60
lines changed

4 files changed

+26
-60
lines changed

.kitchen.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ provisioner:
55
name: ansible_playbook
66
test_repo_uri: https://github.com/hardening-io/tests-mysql-hardening.git
77
hosts: all
8+
playbook: default.yml
89
require_ansible_repo: false
910
require_ansible_omnibus: true
10-
requirements_path: requirements.txt
11+
requirements_path: requirements.yml
12+
ansible_verbose: true
13+
ansible_diff: true
14+
roles_path: ../ansible-mysql-hardening/
15+
1116
platforms:
1217
- name: ubuntu-12.04
1318
driver_config:
@@ -47,17 +52,6 @@ platforms:
4752
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-8.1_chef-provisionerless.box
4853
suites:
4954
- name: ansible_1.9
50-
hosts: all
51-
ansible_verbose: true
52-
ansible_diff: true
53-
roles_path: ../ansible-mysql-hardening/
5455
provisioner:
55-
playbook: test/integration/playbooks/default.yml
5656
ansible_version: 1.9.4
5757
- name: ansible_latest
58-
hosts: all
59-
ansible_verbose: true
60-
ansible_diff: true
61-
roles_path: ../ansible-mysql-hardening/
62-
provisioner:
63-
playbook: test/integration/playbooks/default.yml

README.md

Lines changed: 19 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This role focuses on security configuration of MySQL. Therefore you can add this
1111
## Requirements
1212

1313
* Ansible
14+
* Python MySQL-DB Package
1415

1516
## Usage
1617

@@ -20,7 +21,7 @@ Before you use this role make sure to have a valid login-configuration in `~/.my
2021

2122
- hosts: localhost
2223
roles:
23-
- hardening.mysql-hardening
24+
- dev-sec.mysql-hardening
2425

2526
This hardening role installs the hardening but expects an existing installation of MySQL, MariaDB or Percona. Please ensure that the following variables are set accordingly:
2627

@@ -32,48 +33,21 @@ This hardening role installs the hardening but expects an existing installation
3233

3334
Further information is already available at [Deutsche Telekom (German)](http://www.telekom.com/static/-/155996/7/technische-sicherheitsanforderungen-si) and [Symantec](http://www.symantec.com/connect/articles/securing-mysql-step-step)
3435

35-
* `mysql_hardening_chroot` - [chroot](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_chroot)
36-
* `mysql_hardening_options.safe-user-create` - [safe-user-create](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_safe-user-create)
37-
* `mysql_hardening_options.safe-user-create` - [secure-auth](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_secure-auth)
38-
* `mysql_hardening_options.skip-symbolic-links` - [skip-symbolic-links](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_symbolic-links)
39-
* `mysql_hardening_skip_show_database` - [skip-show-database](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_skip-show-database)
40-
* `mysql_hardening_options.local-infile` - [local-infile](http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_local_infile)
41-
* `mysql_hardening_options.allow-suspicious-udfs` - [allow-suspicious-udfs](https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_allow-suspicious-udfs)
42-
* `mysql_hardening_chroot.automatic-sp-privileges` - [automatic_sp_privileges](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_automatic_sp_privileges)
43-
* `mysql_hardening_options.secure-file-priv` - [secure-file-priv](https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_secure-file-priv)
44-
45-
## Security Configuration
46-
47-
This setup sets the following parameters by default
48-
49-
# via `mysql_hardening_options.local-infile`
50-
local-infile = 0
51-
52-
# via `mysql_hardening_options.safe-user-create`
53-
safe-user-create = 1
54-
55-
# via `mysql_hardening_options.safe-user-create`
56-
secure-auth = 1
57-
58-
# via `mysql_hardening_skip_show_database`
59-
skip-show-database
60-
61-
# via `mysql_hardening_options.skip-symbolic-links`
62-
skip-symbolic-links
63-
64-
# via `mysql_hardening_chroot.automatic-sp-privileges`
65-
automatic_sp_privileges = 0
66-
67-
# via `mysql_hardening_options.secure-file-priv`
68-
secure-file-priv = /tmp
69-
70-
71-
Additionally it ensures that the following parameters are not set
72-
73-
* deactivate old-passwords via `mysql_hardening_options.secure-auth`
74-
* deactivate allow-suspicious-udfs via `mysql_hardening_options.allow-suspicious-udfs`
75-
* skip-grant-tables via `mysql_hardening_skip_grant_tables`
76-
* the permissions of `/var/lib/mysql` is limited to `mysql` user.
36+
| Name | Default Value | Description |
37+
| -------------- | ------------- | -----------------------------------|
38+
| `mysql_hardening_chroot` | "" | [chroot](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_chroot)|
39+
| `mysql_hardening_options.safe-user-create` | 1 | [safe-user-create](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_safe-user-create)|
40+
| `mysql_hardening_options.secure-auth` | 1 | [secure-auth](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_secure-auth)|
41+
| `mysql_hardening_options.skip-symbolic-links` | 1 | [skip-symbolic-links](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_symbolic-links)|
42+
| `mysql_hardening_skip_grant_tables:` | false | [skip-grant-tables](https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_skip-grant-tables)|
43+
| `mysql_hardening_skip_show_database` | 1 | [skip-show-database](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_skip-show-database)|
44+
| `mysql_hardening_options.local-infile` | 0 | [local-infile](http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_local_infile)|
45+
| `mysql_hardening_options.allow-suspicious-udfs` | 0 | [allow-suspicious-udfs](https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_allow-suspicious-udfs)|
46+
| `mysql_hardening_chroot.automatic-sp-privileges` | 0 | [automatic_sp_privileges](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_automatic_sp_privileges)|
47+
| `mysql_hardening_options.secure-file-priv` | /tmp | [secure-file-priv](https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_secure-file-priv)|
48+
| `mysql_allow_remote_root` | false | delete remote root users |
49+
| `mysql_remove_anonymous_users` | true | remove users without authentication |
50+
| `mysql_remove_test_database` | true | remove test database |
7751

7852
## Local Testing
7953

@@ -108,13 +82,11 @@ bundle exec kitchen converge default-ubuntu-1204
10882

10983
For more information see [test-kitchen](http://kitchen.ci/docs/getting-started)
11084

111-
## Contributors + Kudos
112-
113-
...
11485

11586
## License and Author
11687

11788
* Author:: Sebastian Gumprich <sebastian.gumprich@38.de>
89+
* Author:: Anton Lugovoi <anton.lugovoi@outlook.com>
11890

11991
Licensed under the Apache License, Version 2.0 (the "License");
12092
you may not use this file except in compliance with the License.
@@ -128,4 +100,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128100
See the License for the specific language governing permissions and
129101
limitations under the License.
130102

131-
[3]: https://gitter.im/hardening-io/general
103+
[3]: https://gitter.im/dev-sec/general

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- src: geerlingguy.mysql

0 commit comments

Comments
 (0)