C Authentication Plugin
The MongoDB authentication plugin is embedded in the MongoDB BI Connector ODBC Driver. If your BI tool connects using the MongoDB BI Connector ODBC Driver through a DSN or the driver directly, you do not need to install the authentication plugin separately. Install the standalone authentication plugin if your BI tool does not use an ODBC driver and accepts authentication plugins, such the MySQL shell.
The mongosql_auth
plugin allows a client to authenticate with a
BI Connector and MongoDB deployment running with authentication enabled
using one of the following authentication mechanisms:
SCRAM-SHA-1
SCRAM-SHA-256
PLAIN
(LDAP)GSSAPI
(Kerberos)
Note
The
SCRAM-SHA-1
andSCRAM-SHA-256
mechanisms hash the passwords in the client plugin; however, all other data is in cleartext. If possible, use with encrypted connections.The
PLAIN
mechanism sends the password in cleartext. Use encrypted connections with thePLAIN
mechanism .
Supported Platforms
The plugin is built and tested on the following platforms:
Windows 2008 R2 (32- and 64-bit)
macOS 10.12 (64-bit)
Ubuntu 14.04 (64-bit)
RHEL 7.0 (64-bit)
Important
Testing Environment
The C Authentication plugin was developed against MySQL 5.7.X Community Edition (64-bit), and tested with MySQL 5.7.X Community Edition and the latest version of MongoDB Connector for BI. The plugin is not compatible with MySQL Server or Connector/ODBC driver version 8 and later.
Installing the Plugin
Download the MySQL 5.7.x installer. The required product to install depends on your connection method:
Connection MethodRequired MySQL ComponentDSN (Data Source Name) using the MySQL Connector/ODBC driverMySQL Connector/ODBCMySQL ShellMySQL ShellNote
Install the version (64-bit or 32-bit) of the MySQL component that is appropriate for your operating system.
Download the
mongosql_auth
plugin component .msi installer and install themongosql_auth
plugin component. The plugin is installed into one of the following directories depending on your version of windows:PlatformDefault Location32-bit WindowsC:\Program Files (x86)\MySQL\MySQL Server 5.7\lib\plugin
64-bit WindowsC:\Program Files\MySQL\MySQL Server 5.7\lib\plugin
Note
macOS Catalina users:
The C authentication plugin uses OpenSSL v1.0. If you have OpenSSL v1.1 or greater installed, you must downgrade to v1.0 to use the C authentication plugin. You can do so with the following command:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/30fd2b68feb458656c2da2b91e577960b11c42f4/Formula/openssl.rb
If you have both versions 1.0 and 1.1 of OpenSSL installed,
create a symlink to version 1.0 from /usr/local/opt/openssl
and remove the symlink to v1.1.
Download the MySQL 5.7.x installer and install the MySQL Community Server, which includes the MySQL shell.
Download
mongosql_auth
plugin library from the releases page.After downloading, move the file
mongosql_auth.so
to either:<mysql-home>/lib/plugin/
directory.The default location of
<mysql-home>
varies by platform.To discover the location of the plugin directory, run the following at the command line:
mysql_config --plugindir
- OR -
A directory of your choice if you provide the
plugin-dir=<your-install-dir>
option to your MySQL client.
Download the MySQL 5.7.x installer and install the MySQL Community Server, which includes the MySQL shell.
Download
mongosql_auth
plugin library from the releases page.After downloading, move the file
mongosql_auth.so
to either:<mysql-home>/lib/plugin/
directory.The default location of
<mysql-home>
varies by platform.To discover the location of the plugin directory, run the following at the command line:
mysql_config --plugindir
- OR -
A directory of your choice if you provide the
plugin-dir=<your-install-dir>
option to your MySQL client.
Using the Plugin for Authentication
Before you use the authentication plugin, you must set up authenticated users for MongoDB. For more information on creating authenticated users, see Enable Authentication. If you are using the Atlas-hosted BI Connector, see Configure Database Users.
The procedure for using the C Authentication plugin library varies depending on your SQL client. The C Authentication plugin can be used via one of the following methods:
DSN (Data Source Name) using the MySQL Connector/ODBC driver. For more information, see Create a System DSN.
The
--default-auth
option for the MySQL Shell. For more information, see Connect from the MySQL Client.
This plugin can is compatible with both the 32-bit or 64-bit versions of the MySQL shell and MySQL Connector/ODBC driver. The installation directory differs depending on the version you install.