sidorares / sidorares/node-mysql2

It fails connection when server uses PAM

Open
#438 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request mysqljs/mysql incompatibilities
Dominant language
TypeScript
Stars
4.4k
Forks
680
Avg merge
9h 7m
Merged PRs (30d)
59

Description

When I try to connect as a user the server expects to authenticate via the PAM Authentication Plugin, the following error is thrown

Error: Client does not support authentication protocol requested by server;
       consider upgrading MariaDB client

After reading your node-mysql2 docs, and some investigations, I finally realized there's no support for mysql_clear_password capabilities yet. I realized you provided an authSwitchHandler configuration setting to properly react when the server asks for specific authentication methods.

Couldn't it be useful providing mysql_clear_password the same way mysql_native_password authentication capabilities have been already provided internally? After reading the official MySQL Clear Text Authentication piece of documentation, we could easily implement it in Javascript.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing authSwitchHandler configuration and the internally supported mysql_native_password authentication capability. Read the MySQL Clear Text Authentication documentation and compare it with the PAM Authentication Plugin flow. Done means the client supports mysql_clear_password so connections to servers using PAM authentication can complete successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, nodejs, typescript
Domain
authentication, backend, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.