@@ -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
2526This 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
3334Further 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
10983For 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
11991Licensed under the Apache License, Version 2.0 (the "License");
12092you 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.
128100See the License for the specific language governing permissions and
129101limitations under the License.
130102
131- [ 3 ] : https://gitter.im/hardening-io /general
103+ [ 3 ] : https://gitter.im/dev-sec /general
0 commit comments