1#ifndef MYSQL_PLUGIN_AUTH_INCLUDED
33#define MYSQL_PLUGIN_AUTH_INCLUDED
37#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0201
43#define PASSWORD_USED_NO 0
44#define PASSWORD_USED_YES 1
45#define PASSWORD_USED_NO_MENTION 2
49#define AUTH_FLAG_PRIVILEGED_USER_FOR_PASSWORD_CHANGE (1L << 0)
50#define AUTH_FLAG_USES_INTERNAL_STORAGE (1L << 1)
51#define AUTH_FLAG_REQUIRES_REGISTRATION (1L << 2)
175 unsigned int *outbuflen,
177 unsigned int inbuflen);
189 unsigned int buflen);
205 unsigned char *salt,
unsigned char *salt_len);
219 unsigned long hash_length,
220 const char *cleartext,
221 unsigned long cleartext_length,
static char * password
Definition: mysql_secure_installation.cc:58
int(* generate_authentication_string_t)(char *outbuf, unsigned int *outbuflen, const char *inbuf, unsigned int inbuflen)
New plugin API to generate password digest out of authentication string.
Definition: plugin_auth.h:174
int(* authenticate_user_t)(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
Function provided by the plugin which should perform authentication (using the vio functions if neces...
Definition: plugin_auth.h:156
int(* validate_authentication_string_t)(char *const inbuf, unsigned int buflen)
Plugin API to validate password digest.
Definition: plugin_auth.h:188
int(* set_salt_t)(const char *password, unsigned int password_len, unsigned char *salt, unsigned char *salt_len)
Plugin API to convert scrambled password to binary form based on scramble type.
Definition: plugin_auth.h:204
int(* compare_password_with_hash_t)(const char *hash, unsigned long hash_length, const char *cleartext, unsigned long cleartext_length, int *is_error)
Plugin API to compare a clear text password with a stored hash.
Definition: plugin_auth.h:218
This file defines constants and data structures that are the same for both client- and server-side au...
#define MYSQL_USERNAME_LENGTH
the max allowed length for a user name
Definition: plugin_auth_common.h:39
Provides plugin access to communication channel.
Definition: plugin_auth_common.h:147
Provides server plugin access to authentication information.
Definition: plugin_auth.h:71
unsigned int user_name_length
Length of user_name.
Definition: plugin_auth.h:81
char * user_name
User name as sent by the client and shown in USER().
Definition: plugin_auth.h:76
int password_used
This only affects the "Authentication failed. Password used: %s" error message.
Definition: plugin_auth.h:116
const char * host_or_ip
Set to the name of the connected client host, if it can be resolved, or to its IP address otherwise.
Definition: plugin_auth.h:122
unsigned long auth_string_length
Length of auth_string.
Definition: plugin_auth.h:92
char external_user[512]
The unique user name that was used by the plugin to authenticate.
Definition: plugin_auth.h:106
unsigned int host_or_ip_length
Length of host_or_ip.
Definition: plugin_auth.h:127
auth_factor_desc * multi_factor_auth_info
Refers to authentication details of 1st, 2nd or 3rd factor authentication method.
Definition: plugin_auth.h:147
char authenticated_as[MYSQL_USERNAME_LENGTH+1]
Matching account name as found in the mysql.user table.
Definition: plugin_auth.h:99
unsigned long additional_auth_string_length
Length of additional password.
Definition: plugin_auth.h:137
unsigned int current_auth_factor
Refers to which factor auth_string to consider during authentication.
Definition: plugin_auth.h:142
const char * additional_auth_string
Additional password.
Definition: plugin_auth.h:132
const char * auth_string
Refers to multi_factor_auth_info based on which factor is being authenticated.
Definition: plugin_auth.h:87
Definition: plugin_auth.h:53
const char * auth_string
authentication string for 1st, 2nd and 3rd factor auth plugins
Definition: plugin_auth.h:57
unsigned int is_registration_required
Flag which tells if connecting user has performed registration or not.
Definition: plugin_auth.h:65
unsigned long auth_string_length
Length of authentication string for 1st, 2nd and 3rd factor auth plugins.
Definition: plugin_auth.h:61
Server authentication plugin descriptor.
Definition: plugin_auth.h:227
compare_password_with_hash_t compare_password_with_hash
Definition: plugin_auth.h:245
const char * client_auth_plugin
version plugin uses
Definition: plugin_auth.h:233
int interface_version
Definition: plugin_auth.h:228
set_salt_t set_salt
Definition: plugin_auth.h:238
authenticate_user_t authenticate_user
Definition: plugin_auth.h:235
const unsigned long authentication_flags
Authentication plugin capabilities.
Definition: plugin_auth.h:243
generate_authentication_string_t generate_authentication_string
Definition: plugin_auth.h:236
validate_authentication_string_t validate_authentication_string
Definition: plugin_auth.h:237