MySQL  8.0.18
Source Code Documentation
sql_authentication.h File Reference
#include <stddef.h>
#include <sys/types.h>
#include "lex_string.h"
#include "m_ctype.h"
#include "my_thread_local.h"
#include "mysql/plugin_auth.h"
#include "mysql/plugin_auth_common.h"
#include "sql/sql_plugin_ref.h"

Go to the source code of this file.

Classes

class  Thd_charset_adapter
 
struct  MPVIO_EXT
 The internal version of what plugins know as MYSQL_PLUGIN_VIO, basically the context of the authentication session. More...
 
class  Cached_authentication_plugins
 

Macros

#define AUTH_DEFAULT_RSA_PRIVATE_KEY   "private_key.pem"
 
#define AUTH_DEFAULT_RSA_PUBLIC_KEY   "public_key.pem"
 

Enumerations

enum  cached_plugins_enum { PLUGIN_CACHING_SHA2_PASSWORD = 0, PLUGIN_MYSQL_NATIVE_PASSWORD, PLUGIN_SHA256_PASSWORD, PLUGIN_LAST }
 

Functions

ACL_USERdecoy_user (const LEX_CSTRING &username, const LEX_CSTRING &hostname, MEM_ROOT *mem, struct rand_struct *rand, bool is_initialized)
 When authentication is attempted using an unknown username a dummy user account with no authentication capabilites is assigned to the connection. More...
 

Variables

LEX_CSTRING validate_password_plugin_name
 
bool allow_all_hosts
 
LEX_CSTRING default_auth_plugin_name
 
Cached_authentication_pluginsg_cached_authentication_plugins
 

Macro Definition Documentation

◆ AUTH_DEFAULT_RSA_PRIVATE_KEY

#define AUTH_DEFAULT_RSA_PRIVATE_KEY   "private_key.pem"

◆ AUTH_DEFAULT_RSA_PUBLIC_KEY

#define AUTH_DEFAULT_RSA_PUBLIC_KEY   "public_key.pem"

Enumeration Type Documentation

◆ cached_plugins_enum

Enumerator
PLUGIN_CACHING_SHA2_PASSWORD 
PLUGIN_MYSQL_NATIVE_PASSWORD 
PLUGIN_SHA256_PASSWORD 
PLUGIN_LAST 

Function Documentation

◆ decoy_user()

ACL_USER* decoy_user ( const LEX_CSTRING username,
const LEX_CSTRING hostname,
MEM_ROOT mem,
struct rand_struct rand,
bool  is_initialized 
)

When authentication is attempted using an unknown username a dummy user account with no authentication capabilites is assigned to the connection.

When server is started with -skip-grant-tables, a dummy user account with authentication capabilities is assigned to the connection. Dummy user authenticates with the empty authentication string. This is done to decrease the cost of enumerating user accounts based on authentication protocol.

Parameters
[in]usernameA dummy user to be created.
[in]hostnameHost of the dummy user.
[in]memMemory in which the dummy ACL user will be created.
[in]randSeed value to generate random data
[in]is_initializedState of ACL caches
Return values
Adummy ACL USER

Variable Documentation

◆ allow_all_hosts

bool allow_all_hosts

◆ default_auth_plugin_name

LEX_CSTRING default_auth_plugin_name

◆ g_cached_authentication_plugins

Cached_authentication_plugins* g_cached_authentication_plugins

◆ validate_password_plugin_name

LEX_CSTRING validate_password_plugin_name