MySQL 8.4.3
Source Code Documentation
|
Test driver for the mysql-test/t/plugin_auth.test. More...
#include <mysql/client_plugin.h>
#include <mysql/components/my_service.h>
#include <mysql/components/services/log_builtins.h>
#include <mysql/plugin_auth.h>
#include <mysqld_error.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mysql.h>
#include "my_compiler.h"
Macros | |
#define | LOG_COMPONENT_TAG "test_plugin_server" |
#define | ORDINARY_QUESTION "\2" |
first byte of the question string is the question "type". More... | |
#define | LAST_QUESTION "\3" |
#define | LAST_PASSWORD "\4" |
#define | PASSWORD_QUESTION "\5" |
Functions | |
static int | test_plugin_init (MYSQL_PLUGIN plugin_info) |
static int | auth_test_plugin (MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) |
dialog test plugin mimicking the ordinary auth mechanism. More... | |
static int | generate_auth_string_hash (char *outbuf, unsigned int *buflen, const char *inbuf, unsigned int inbuflen) |
static int | validate_auth_string_hash (char *const inbuf, unsigned int buflen) |
static int | set_salt (const char *password, unsigned int password_len, unsigned char *salt, unsigned char *salt_len) |
static int | auth_cleartext_plugin (MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) |
dialog test plugin mimicking the ordinary auth mechanism. More... | |
mysql_declare_plugin (test_plugin) | |
static int | test_plugin_client (MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) |
The main function of the test plugin. More... | |
mysql_declare_client_plugin (AUTHENTICATION) "auth_test_plugin" | |
Variables | |
static const mysql_service_registry_t * | reg_srv = nullptr |
Initialize parameters required for error logging. More... | |
const mysql_service_log_builtins_t * | log_bi = nullptr |
accessor built-ins More... | |
const mysql_service_log_builtins_string_t * | log_bs = nullptr |
string built-ins More... | |
static MYSQL_PLUGIN | plugin_info_ptr |
Handle assigned when loading the plugin. More... | |
static struct st_mysql_auth | auth_test_handler |
static struct st_mysql_auth | auth_cleartext_handler |
MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE | |
Dialog Client Authentication | Plugin |
Dialog Client Authentication | GPL |
Dialog Client Authentication | nullptr |
Dialog Client Authentication | test_plugin_client |
Dialog Client Authentication | mysql_end_client_plugin |
Test driver for the mysql-test/t/plugin_auth.test.
This is a set of test plugins used to test the external authentication implementation. See the above test file for more details. This test plugin is based on the dialog plugin example.
#define LAST_PASSWORD "\4" |
#define LAST_QUESTION "\3" |
#define LOG_COMPONENT_TAG "test_plugin_server" |
#define ORDINARY_QUESTION "\2" |
first byte of the question string is the question "type".
It can be a "ordinary" or a "password" question. The last bit set marks a last question in the authentication exchange.
#define PASSWORD_QUESTION "\5" |
|
static |
dialog test plugin mimicking the ordinary auth mechanism.
Used to test the clear text plugin API
|
static |
dialog test plugin mimicking the ordinary auth mechanism.
Used to test the auth plugin API
|
static |
mysql_declare_client_plugin | ( | AUTHENTICATION | ) |
mysql_declare_plugin | ( | test_plugin | ) |
|
static |
|
static |
The main function of the test plugin.
Reads the prompt, check if the handshake is done and if the prompt is a password request and returns the password. Otherwise return error.
|
static |
|
static |
|
static |
|
static |
Dialog Client Authentication GPL |
const mysql_service_log_builtins_t* log_bi = nullptr |
accessor built-ins
accessor built-ins
const mysql_service_log_builtins_string_t* log_bs = nullptr |
string built-ins
MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE |
Dialog Client Authentication mysql_end_client_plugin |
Dialog Client Authentication nullptr |
Dialog Client Authentication Plugin |
|
static |
Handle assigned when loading the plugin.
Used with the error reporting functions.
|
static |
Initialize parameters required for error logging.
Dialog Client Authentication test_plugin_client |