Support pluggable auth plugin mechanism
See original GitHub issue@sidorares , I raise this issue to talk about the pluggable auth plugin mechanism design. Your mysql2 have a design
const conn = mysql.createClient({
authPlugins: {
some_custom_plugin: (data, cb) => { /* ... * /},
// mysql_native_plugin and sha256_password_plugin automaticlly merged to here unless you do something like
// mysql_native_plugin: null
// 'mysql_clear_password' not enabled by default:
mysql_clear_password: mysql.authPlugins.mysql_clear_password
},
connectAuthPluginName: 'mysql_native_password' // this would be default, but if you need to start with sha256_password_plugin for example you need to put this option
})
Which describe in documented here: https://github.com/sidorares/node-mysql2/blob/master/documentation/Authentication-Switch.md
I also want to add the pluggable auth plugin mechanism, and want to let the API is same. What’s your decision on mysql2? If you like, could we talk about the auth plugin mechanism design here?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Extension:PluggableAuth - MediaWiki
The PluggableAuth extension provides a framework for creating authentication and authorization extensions. Authentication is the process of ...
Read more >Authorization Plug-ins | Apple Developer Documentation
Supporting Types and Constants. AuthorizationValue. A structure used to pass data between the authorization engine and the plug-in mechanism.
Read more >Pluggable Authorization - Axway Documentation Portal
To support any authorization operation, a plug-in must implement CustomAuthorizer interface. Create a class that implements the CustomAuthorizer ...
Read more >Netbackup and Pluggable Authentication Mechanism Module ...
A PAM plugin to the VERITAS Authentication service (VxAT) enables customers to make use of their existing PAM authentication modules to ...
Read more >An introduction to Pluggable Authentication Modules (PAM) in ...
Learn how Pluggable Authentication Modules are used to help applications make proper use of user accounts in Linux.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think just copying the public API of mysql2 is good enough. There are other ways it could be done, but no real reason to implement it differently, I suppose.
The only other way I could think of is to add methods on the main export to register plugins, which should be OK to register globally, but the down side is that it removes the flexibility to disable at a per-instance unless a different thing is done, haha.
for docs it’s “name of auth plugin current packet talking about” for api discussed it’s “name of auth plugin to be used during initial handshake”