feat(socket_authentication): allow unix_socket authentication

Co-authored-by: Tristan Charbonneau <tcharbonneau@oceanet-technology.com>
This commit is contained in:
Yoda-BZH 2020-07-10 17:12:24 +02:00 committed by GitHub
parent f1084e5925
commit 8eccd5a68c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -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 %}

View file

@ -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