node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

Add support for auth_gssapi_client MariaDB authentication plugin

Open Flofus opened this issue 1 year ago • 4 comments

i want to connect to my mariadb and i got

Error: Server requests authentication using unknown plugin auth_gssapi_client. See TODO: add plugins doco here on how to configure or author authentication plugins.

Do you need more information?

Flofus avatar Jun 30 '24 17:06 Flofus

your server requires clients to use this plugin, and we don't have that supported out of the box

There is a bit of documentation on how to write a plugin and use it in the client here: https://sidorares.github.io/node-mysql2/docs/documentation/authentication-switch

MariaDb page on auth_gssapi_client plugin:

https://mariadb.com/kb/en/authentication-plugin-gssapi/

So you have basically 2 options:

  • change server config and allow some "standard" mysql auth methods ( mysql_native_password , caching_sha2_password )
  • or write client side implementation of auth_gssapi_client plugin flow ( or wait until somebody makes it for you )

sidorares avatar Jul 01 '24 04:07 sidorares

MariaDB Connector/Node.js does not yet support gssapi authentication.

https://jira.mariadb.org/browse/CONJS-72

sidorares avatar Jul 01 '24 04:07 sidorares

https://github.com/go-sql-driver/mysql/pull/1233

sidorares avatar Jul 01 '24 04:07 sidorares

Some initial search on 'gssapi in node.js':

https://en.wikipedia.org/wiki/Generic_Security_Services_Application_Program_Interface

https://github.com/mongodb-js/kerberos https://www.npmjs.com/package/krb5 https://www.npmjs.com/package/webgss

sidorares avatar Jul 01 '24 04:07 sidorares