MariaDB starting with 10.1.11

This plugin first appeared in MariaDB 10.1.11.

Versions

VersionStatusIntroduced
1.0StableMariaDB 10.1.11

Description

This plugin allows the user to use operating system credentials when connecting to MariaDB via named pipe on Windows. It works by retrieving the user name of the process that has connected to the named pipe (using named pipe impersonation and GetUserName()) and allowing a connection to the MariaDB account with the corresponding user name. See plugins for information about using plugins in general and Pluggable Authentication for the authentication plugin's details.

To install the plugin, use:

INSTALL  SONAME 'auth_named_pipe';

Examples

CREATE USER wlad IDENTIFIED VIA named_pipe;
CREATE USER monty IDENTIFIED VIA named_pipe;
quit

C:\>echo %USERNAME%
wlad

C:\> mysql --user=wlad --protocol=PIPE
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 10.1.12-MariaDB-debug Source distribution

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> quit
Bye

C:\> mysql --user=monty  --protocol=PIPE
ERROR 1698 (28000): Access denied for user 'monty'@'localhost'

In this example, a user wlad is already logged into the system. Because he has identified himself to the operating system, he does not need to do it again for the database MariaDB trusts the operating system credentials. However, he cannot connect to the database as another user.

Comments

Comments loading...