Fix privileges

This commit is contained in:
Jorge-Rodriguez 2021-03-30 20:02:20 +03:00
parent d512500569
commit a3ebd7e055
No known key found for this signature in database
GPG key ID: 43153D1EFD8F7D90

View file

@ -33,7 +33,7 @@
<<: *mysql_params
name: "{{ user_name_1 }}"
password: "{{ user_password_1 }}"
priv: '*.*:USAGE,REQUIRESSL,GRANT'
priv: '*.*:SELECT,CREATE USER,REQUIRESSL,GRANT'
- name: attempt connection with newly created user not using TLS (expect access denied)
mysql_user:
@ -49,14 +49,14 @@
- assert:
that:
- result is failed and ('Access denied for user' in result.msg or 'command denied to user' in result.msg)
- result is failed and 'Access denied for user' in result.msg
- name: create user with equivalent ssl requirement in tls_requires (expect unchanged)
mysql_user:
<<: *mysql_params
name: "{{ user_name_1 }}"
password: "{{ user_password_1 }}"
priv: '*.*:USAGE,GRANT'
priv: '*.*:SELECT,CREATE USER,GRANT'
tls_requires:
SSL:
register: result
@ -70,7 +70,7 @@
<<: *mysql_params
name: "{{ user_name_1 }}"
password: "{{ user_password_1 }}"
priv: '*.*:USAGE,REQUIRESSL,GRANT'
priv: '*.*:SELECT,CREATE USER,REQUIRESSL,GRANT'
register: result
- assert:
@ -82,7 +82,7 @@
<<: *mysql_params
name: "{{ user_name_1 }}"
password: "{{ user_password_1 }}"
priv: '*.*:USAGE,REQUIRESSL,GRANT'
priv: '*.*:SELECT,CREATE USER,REQUIRESSL,GRANT'
tls_requires:
X509:
@ -91,7 +91,7 @@
<<: *mysql_params
name: "{{ user_name_1 }}"
password: "{{ user_password_1 }}"
priv: '*.*:USAGE,GRANT'
priv: '*.*:SELECT,CREATE USER,GRANT'
tls_requires:
X509:
register: result