MySQL 8.4.2
Source Code Documentation
|
#include "my_config.h"
#include <mysql/service_mysql_alloc.h>
#include <my_compiler.h>
#include <my_dir.h>
#include <my_sys.h>
#include <mysql.h>
#include <mysql/client_plugin.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fstream>
#include <iostream>
#include <ostream>
#include "sql-common/oci/signing_key.h"
#include "sql-common/oci/ssl.h"
#include "sql-common/oci/utilities.h"
Functions | |
void | log_error (const std::string &message) |
Log error message to client. More... | |
void | free_plugin_option (char *&option) |
Free plugin option. More... | |
oci::OCI_config_file | parse_oci_config_file (std::string &err_msg) |
Parse the system variables for the location of the ~/.oci/config file. More... | |
static int | try_parse_and_set_config_file (std::string &err_msg) |
Try to parse and assess the currently effective config file. More... | |
static int | oci_authenticate_client_plugin (MYSQL_PLUGIN_VIO *vio, MYSQL *) |
client auth function More... | |
static int | initialize_plugin (char *, size_t, int, va_list) |
static int | oci_authenticate_client_option (const char *option, const void *val) |
oci_authenticate_client_option plugin API to allow server to pass optional data for plugin to process More... | |
mysql_declare_client_plugin (AUTHENTICATION) "authentication_oci_client" | |
Variables | |
static char * | s_oci_config_location = nullptr |
static char * | s_authentication_oci_client_config_profile = nullptr |
static oci::OCI_config_file * | s_oci_config_file = nullptr |
static std::string | s_expanded_path {} |
static const int | s_max_token_size = 10000 |
MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE | |
OCI Client Authentication | Plugin |
OCI Client Authentication | COMMUNITY |
OCI Client Authentication | nullptr |
OCI Client Authentication | initialize_plugin |
OCI Client Authentication | deinitialize_plugin |
OCI Client Authentication | oci_authenticate_client_option |
OCI Client Authentication | oci_authenticate_client_plugin |
OCI Client Authentication nullptr | mysql_end_client_plugin |
|
inline |
Free plugin option.
[in] | option | Plugin option to be freed |
|
static |
void log_error | ( | const std::string & | message | ) |
Log error message to client.
[in] | message | Message to be displayed |
mysql_declare_client_plugin | ( | AUTHENTICATION | ) |
|
static |
oci_authenticate_client_option plugin API to allow server to pass optional data for plugin to process
|
static |
client auth function
read stuff via the VIO. try to read first get (login) data from the MYSQL handle: mysql->user, mysql->passwd return CR_OK on success, CR_ERROR on failure
Step 1: Receive the nonce from the server.
Step 2: Sign the nonce with the private key.
Step 3: Prepare the response.
Step 4: Send the encrypted nonce back to the server for verification.
oci::OCI_config_file parse_oci_config_file | ( | std::string & | err_msg | ) |
Parse the system variables for the location of the ~/.oci/config file.
Extract the key_file= value from the ~/.oci/config file.
|
static |
Try to parse and assess the currently effective config file.
0 | : success |
1 | : parsing failed or not initialized |
OCI Client Authentication COMMUNITY |
OCI Client Authentication deinitialize_plugin |
OCI Client Authentication initialize_plugin |
MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE |
OCI Client Authentication nullptr mysql_end_client_plugin |
OCI Client Authentication nullptr |
OCI Client Authentication oci_authenticate_client_option |
OCI Client Authentication oci_authenticate_client_plugin |
OCI Client Authentication Plugin |
|
static |
|
static |
|
static |
|
static |
|
static |