1#ifndef MYSQL_PLUGIN_AUTH_INCLUDED
32#define MYSQL_PLUGIN_AUTH_INCLUDED
36#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0201
42#define PASSWORD_USED_NO 0
43#define PASSWORD_USED_YES 1
44#define PASSWORD_USED_NO_MENTION 2
48#define AUTH_FLAG_PRIVILEGED_USER_FOR_PASSWORD_CHANGE (1L << 0)
49#define AUTH_FLAG_USES_INTERNAL_STORAGE (1L << 1)
50#define AUTH_FLAG_REQUIRES_REGISTRATION (1L << 2)
174 unsigned int *outbuflen,
176 unsigned int inbuflen);
188 unsigned int buflen);
204 unsigned char *salt,
unsigned char *salt_len);
218 unsigned long hash_length,
219 const char *cleartext,
220 unsigned long cleartext_length,
static char * password
Definition: mysql_secure_installation.cc:57
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:173
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:155
int(* validate_authentication_string_t)(char *const inbuf, unsigned int buflen)
Plugin API to validate password digest.
Definition: plugin_auth.h:187
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:203
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:217
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:38
Provides plugin access to communication channel.
Definition: plugin_auth_common.h:145
Provides server plugin access to authentication information.
Definition: plugin_auth.h:70
unsigned int user_name_length
Length of user_name.
Definition: plugin_auth.h:80
char * user_name
User name as sent by the client and shown in USER().
Definition: plugin_auth.h:75
int password_used
This only affects the "Authentication failed. Password used: %s" error message.
Definition: plugin_auth.h:115
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:121
unsigned long auth_string_length
Length of auth_string.
Definition: plugin_auth.h:91
char external_user[512]
The unique user name that was used by the plugin to authenticate.
Definition: plugin_auth.h:105
unsigned int host_or_ip_length
Length of host_or_ip.
Definition: plugin_auth.h:126
auth_factor_desc * multi_factor_auth_info
Refers to authentication details of 1st, 2nd or 3rd factor authentication method.
Definition: plugin_auth.h:146
char authenticated_as[MYSQL_USERNAME_LENGTH+1]
Matching account name as found in the mysql.user table.
Definition: plugin_auth.h:98
unsigned long additional_auth_string_length
Length of additional password.
Definition: plugin_auth.h:136
unsigned int current_auth_factor
Refers to which factor auth_string to consider during authentication.
Definition: plugin_auth.h:141
const char * additional_auth_string
Additional password.
Definition: plugin_auth.h:131
const char * auth_string
Refers to multi_factor_auth_info based on which factor is being authenticated.
Definition: plugin_auth.h:86
Definition: plugin_auth.h:52
const char * auth_string
authentication string for 1st, 2nd and 3rd factor auth plugins
Definition: plugin_auth.h:56
unsigned int is_registration_required
Flag which tells if connecting user has performed registration or not.
Definition: plugin_auth.h:64
unsigned long auth_string_length
Length of authentication string for 1st, 2nd and 3rd factor auth plugins.
Definition: plugin_auth.h:60
Server authentication plugin descriptor.
Definition: plugin_auth.h:226
compare_password_with_hash_t compare_password_with_hash
Definition: plugin_auth.h:244
const char * client_auth_plugin
version plugin uses
Definition: plugin_auth.h:232
int interface_version
Definition: plugin_auth.h:227
set_salt_t set_salt
Definition: plugin_auth.h:237
authenticate_user_t authenticate_user
Definition: plugin_auth.h:234
const unsigned long authentication_flags
Authentication plugin capabilities.
Definition: plugin_auth.h:242
generate_authentication_string_t generate_authentication_string
Definition: plugin_auth.h:235
validate_authentication_string_t validate_authentication_string
Definition: plugin_auth.h:236