mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-15 17:20:25 +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'] }}'
|
||||
{%- elif user['password'] is defined and user['password'] != None %}
|
||||
- password: '{{ user['password'] }}'
|
||||
{%- elif user['unix_socket'] is defined and user['unix_socket'] != None %}
|
||||
- allow_passwordless: True
|
||||
- unix_socket: True
|
||||
{%- else %}
|
||||
- allow_passwordless: True
|
||||
{%- endif %}
|
||||
|
|
|
@ -135,6 +135,13 @@ mysql:
|
|||
- database: bar
|
||||
table: foobar
|
||||
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:
|
||||
password: ~
|
||||
host: localhost
|
||||
|
|
Loading…
Add table
Reference in a new issue