MXS-2355 If client is using the wrong authenticator, attempt a switch

Some SQL clients may default to a different authentication plugin than
"mysql_native_password". Since this is the only one supported by MySQL-
authenticator, the client is instructed to swap its plugin.
This commit is contained in:
Esa Korhonen
2019-03-15 19:41:58 +02:00
parent 216eb904c5
commit 9236ace077
3 changed files with 179 additions and 18 deletions

View File

@ -141,6 +141,9 @@ typedef struct mysql_session
char db[MYSQL_DATABASE_MAXLEN + 1]; /*< database */
int auth_token_len; /*< token length */
uint8_t *auth_token; /*< token */
bool correct_authenticator; /*< is session using mysql_native_password? */
uint8_t next_sequence; /*< Next packet sequence */
bool auth_switch_sent; /*< Expecting a response to AuthSwitchRequest? */
#if defined(SS_DEBUG)
skygw_chk_t myses_chk_tail;
#endif