mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-16 09:40:26 +00:00
feat(socket_authentication): allow unix_socket authentication
Co-authored-by: Tristan Charbonneau <tcharbonneau@oceanet-technology.com>
This commit is contained in:
parent
f1084e5925
commit
8eccd5a68c
2 changed files with 10 additions and 0 deletions
|
@ -42,6 +42,9 @@ include:
|
||||||
- password_hash: '{{ user['password_hash'] }}'
|
- password_hash: '{{ user['password_hash'] }}'
|
||||||
{%- elif user['password'] is defined and user['password'] != None %}
|
{%- elif user['password'] is defined and user['password'] != None %}
|
||||||
- password: '{{ user['password'] }}'
|
- password: '{{ user['password'] }}'
|
||||||
|
{%- elif user['unix_socket'] is defined and user['unix_socket'] != None %}
|
||||||
|
- allow_passwordless: True
|
||||||
|
- unix_socket: True
|
||||||
{%- else %}
|
{%- else %}
|
||||||
- allow_passwordless: True
|
- allow_passwordless: True
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -135,6 +135,13 @@ mysql:
|
||||||
- database: bar
|
- database: bar
|
||||||
table: foobar
|
table: foobar
|
||||||
grants: ['select', 'insert', 'update', 'delete']
|
grants: ['select', 'insert', 'update', 'delete']
|
||||||
|
|
||||||
|
# User 'alice' will be allowed to connect to the server without password
|
||||||
|
# as long as she has access to the unix socket.
|
||||||
|
# This option forces allow_passwordless to be set to True
|
||||||
|
alice:
|
||||||
|
host: 'localhost'
|
||||||
|
unix_socket: true
|
||||||
nopassuser:
|
nopassuser:
|
||||||
password: ~
|
password: ~
|
||||||
host: localhost
|
host: localhost
|
||||||
|
|
Loading…
Add table
Reference in a new issue