Quantcast
Channel: Planet MySQL
Viewing all articles
Browse latest Browse all 18776

New feature: Pluggable authentication

$
0
0
Starting with MySQL 5.5.7 or MariaDB 5.2, the server allows the client to authenticate via plugin. HeidiSQL now fully supports establishing such connections, by providing an exported method called mysql_authentication_dialog_ask, which is automatically invvoked by libmysql.dll, if the server says so during the connection handshake.

Curious how that works? Here's a simple example:

1. Be sure to have the "plugins" directory in C:\Program files\HeidiSQL\, and the dialog.dll. This is done automatically when installing a newer beta build from the download page.

2. On your server, install the plugin "dialog.dll":

INSTALL PLUGIN three_attempts SONAME 'dialog.dll';


3. On your server, create a new user which authenticates via this plugin:

CREATE USER test_dialog IDENTIFIED VIA three_attempts USING 'SECRET';
FLUSH PRIVILEGES;


4. That's it. Start HeidiSQL and try to connect with a wrong or empty password. libmysql calls Heidi's mysql_authentication_dialog_ask method which pops up the following dialog:


See also:
* MariaDB knowledge base article on pluggable authentication
* MariaDB: Improve Security with Two-Step Verification, an article by Sergei.
PlanetMySQL Voting: Vote UP / Vote DOWN

Viewing all articles
Browse latest Browse all 18776

Trending Articles