Skip to content

Commit 5dd643c

Browse files
committed
authentication has been revamp.
Current implementation was requiring authentication plugin that are have multiple step to begin with iAuthMoreData, but that's only required for "caching_sha2_password" and "sha256_password" plugins. Additionally, now permits multi-authentication (in mariadb: https://mariadb.com/kb/en/create-user/#identified-viawith-authentication_plugin / mysql: https://dev.mysql.com/doc/refman/8.0/en/multifactor-authentication.html) goal is to add MariaDB main authentication plugins (like parsec, PAM, GSSAPI, ...)
1 parent 98f445c commit 5dd643c

15 files changed

+883
-581
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Daniel Montoya <dsmontoyam at gmail.com>
3737
Daniel Nichter <nil at codenode.com>
3838
Daniël van Eeden <git at myname.nl>
3939
Dave Protasowski <dprotaso at gmail.com>
40+
Diego Dupin <diego.dupin at gmail.com>
4041
Dirkjan Bussink <d.bussink at gmail.com>
4142
DisposaBoy <disposaboy at dby.me>
4243
Egor Smolyakov <egorsmkv at gmail.com>

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,17 @@ See [context support in the database/sql package](https://golang.org/doc/go1.8#d
534534
> The `QueryContext`, `ExecContext`, etc. variants provided by `database/sql` will cause the connection to be closed if the provided context is cancelled or timed out before the result is received by the driver.
535535
536536

537+
### Authentication Plugin System
538+
539+
The driver implements a pluggable authentication system that supports various authentication methods used by MySQL and MariaDB servers. The built-in authentication plugins include:
540+
541+
- `mysql_native_password` - The default MySQL authentication method
542+
- `caching_sha2_password` - Default authentication method in MySQL 8.0+
543+
- `mysql_clear_password` - Cleartext authentication (requires `allowCleartextPasswords=true`)
544+
- `mysql_old_password` - Old MySQL authentication (requires `allowOldPasswords=true`)
545+
- `sha256_password` - SHA256 authentication
546+
- `client_ed25519` - MariaDB Ed25519 authentication
547+
537548
### `LOAD DATA LOCAL INFILE` support
538549
For this feature you need direct access to the package. Therefore you must change the import path (no `_`):
539550
```go

0 commit comments

Comments
 (0)