From 80c0af106c5e2474fd6e7435b1bc528634242d13 Mon Sep 17 00:00:00 2001 From: Jason Fulghum Date: Thu, 6 Nov 2025 13:06:05 -0800 Subject: [PATCH 1/3] updating auth interfaces from vitess changes, to pass connection --- sql/mysql_db/auth.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sql/mysql_db/auth.go b/sql/mysql_db/auth.go index 11bd6abdef..dead3fb36e 100644 --- a/sql/mysql_db/auth.go +++ b/sql/mysql_db/auth.go @@ -17,7 +17,6 @@ package mysql_db import ( "bytes" "crypto/sha1" - "crypto/x509" "encoding/hex" "net" @@ -108,7 +107,7 @@ var _ mysql.CachingStorage = (*noopCachingStorage)(nil) // // This implementation also handles authentication when a client doesn't send an auth response and // the associated user account does not have a password set. -func (n noopCachingStorage) UserEntryWithCacheHash(_ []*x509.Certificate, _ []byte, user string, authResponse []byte, remoteAddr net.Addr) (mysql.Getter, mysql.CacheState, error) { +func (n noopCachingStorage) UserEntryWithCacheHash(_ *mysql.Conn, _ []byte, user string, authResponse []byte, remoteAddr net.Addr) (mysql.Getter, mysql.CacheState, error) { db := n.db // If there is no mysql database of user info, then don't approve or reject, since we can't look at @@ -167,7 +166,7 @@ var _ mysql.PlainTextStorage = (*sha2PlainTextStorage)(nil) // UserEntryWithPassword implements the mysql.PlainTextStorage interface. // The auth framework in Vitess also passes in user certificates, but we don't support that feature yet. -func (s sha2PlainTextStorage) UserEntryWithPassword(_ []*x509.Certificate, user string, password string, remoteAddr net.Addr) (mysql.Getter, error) { +func (s sha2PlainTextStorage) UserEntryWithPassword(_ *mysql.Conn, user string, password string, remoteAddr net.Addr) (mysql.Getter, error) { db := s.db host, err := extractHostAddress(remoteAddr) @@ -230,7 +229,7 @@ var _ mysql.PlainTextStorage = (*extendedAuthPlainTextStorage)(nil) // UserEntryWithPassword implements the mysql.PlainTextStorage interface. This method is called by the // MySQL clear password auth method to authenticate a user with a custom PlaintextAuthPlugin that was // previously registered with the MySQLDb instance. -func (f extendedAuthPlainTextStorage) UserEntryWithPassword(userCerts []*x509.Certificate, user string, password string, remoteAddr net.Addr) (mysql.Getter, error) { +func (f extendedAuthPlainTextStorage) UserEntryWithPassword(conn *mysql.Conn, user string, password string, remoteAddr net.Addr) (mysql.Getter, error) { db := f.db host, err := extractHostAddress(remoteAddr) @@ -330,7 +329,7 @@ var _ mysql.HashStorage = (*nativePasswordHashStorage)(nil) // UserEntryWithHash implements the mysql.HashStorage interface. This implementation is called by the MySQL // native password auth method to validate a password hash with the user's stored password hash. -func (nphs *nativePasswordHashStorage) UserEntryWithHash(_ []*x509.Certificate, salt []byte, user string, authResponse []byte, remoteAddr net.Addr) (mysql.Getter, error) { +func (nphs *nativePasswordHashStorage) UserEntryWithHash(_ *mysql.Conn, salt []byte, user string, authResponse []byte, remoteAddr net.Addr) (mysql.Getter, error) { db := nphs.db host, err := extractHostAddress(remoteAddr) From 00d873c28614ec4a9ec1ba69ef80fb45f4a18784 Mon Sep 17 00:00:00 2001 From: Jason Fulghum Date: Thu, 6 Nov 2025 13:20:50 -0800 Subject: [PATCH 2/3] Updating vitess dependency to latest from fulghum/mutual_tls branch --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 03ad0f5e4f..da2ca7c835 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 - github.com/dolthub/vitess v0.0.0-20251105091622-b08b393fd9b1 + github.com/dolthub/vitess v0.0.0-20251106211859-7fc324e71968 github.com/go-sql-driver/mysql v1.9.3 github.com/gocraft/dbr/v2 v2.7.2 github.com/google/uuid v1.3.0 diff --git a/go.sum b/go.sum index de8d9687c6..ed7d616c3e 100644 --- a/go.sum +++ b/go.sum @@ -24,6 +24,8 @@ github.com/dolthub/vitess v0.0.0-20251031205214-d09b65bd77b0 h1:RXopPQP1bwb5fsnX github.com/dolthub/vitess v0.0.0-20251031205214-d09b65bd77b0/go.mod h1:FLWqdXsAeeBQyFwDjmBVu0GnbjI2MKeRf3tRVdJEKlI= github.com/dolthub/vitess v0.0.0-20251105091622-b08b393fd9b1 h1:2uiHo4gkf2n/Cw9uCBDkCWj35Vz48Uhif2B9P+DqgCg= github.com/dolthub/vitess v0.0.0-20251105091622-b08b393fd9b1/go.mod h1:FLWqdXsAeeBQyFwDjmBVu0GnbjI2MKeRf3tRVdJEKlI= +github.com/dolthub/vitess v0.0.0-20251106211859-7fc324e71968 h1:FenLTizlxjNqEpaiwaoCmWS6xDwZ2XB2slnLJODQEjo= +github.com/dolthub/vitess v0.0.0-20251106211859-7fc324e71968/go.mod h1:FLWqdXsAeeBQyFwDjmBVu0GnbjI2MKeRf3tRVdJEKlI= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= From 07efc57e3496415ada3210ca60a74262611e1ded Mon Sep 17 00:00:00 2001 From: fulghum Date: Fri, 7 Nov 2025 00:34:53 +0000 Subject: [PATCH 3/3] [ga-bump-dep] Bump dependency in GMS by fulghum --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 03ad0f5e4f..dca193043e 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 - github.com/dolthub/vitess v0.0.0-20251105091622-b08b393fd9b1 + github.com/dolthub/vitess v0.0.0-20251107003339-843d10a6a8d4 github.com/go-sql-driver/mysql v1.9.3 github.com/gocraft/dbr/v2 v2.7.2 github.com/google/uuid v1.3.0 diff --git a/go.sum b/go.sum index de8d9687c6..8b721b8171 100644 --- a/go.sum +++ b/go.sum @@ -24,6 +24,8 @@ github.com/dolthub/vitess v0.0.0-20251031205214-d09b65bd77b0 h1:RXopPQP1bwb5fsnX github.com/dolthub/vitess v0.0.0-20251031205214-d09b65bd77b0/go.mod h1:FLWqdXsAeeBQyFwDjmBVu0GnbjI2MKeRf3tRVdJEKlI= github.com/dolthub/vitess v0.0.0-20251105091622-b08b393fd9b1 h1:2uiHo4gkf2n/Cw9uCBDkCWj35Vz48Uhif2B9P+DqgCg= github.com/dolthub/vitess v0.0.0-20251105091622-b08b393fd9b1/go.mod h1:FLWqdXsAeeBQyFwDjmBVu0GnbjI2MKeRf3tRVdJEKlI= +github.com/dolthub/vitess v0.0.0-20251107003339-843d10a6a8d4 h1:vOF5qPLC0Yd4BN/FKJlRLNELIZZlev40TrckORQqzhA= +github.com/dolthub/vitess v0.0.0-20251107003339-843d10a6a8d4/go.mod h1:FLWqdXsAeeBQyFwDjmBVu0GnbjI2MKeRf3tRVdJEKlI= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=