sidorares / sidorares/node-mysql2
It fails connection when server uses PAM
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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