MySQL  8.0.27
Source Code Documentation
authentication_oci_client_plugin.cc File Reference
#include "my_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <ostream>
#include <my_compiler.h>
#include <mysql.h>
#include <mysql/client_plugin.h>
#include "sql-common/oci/signing_key.h"
#include "sql-common/oci/ssl.h"
#include "sql-common/oci/utilities.h"

Functions

oci::OCI_config_file parse_oci_config_file ()
 Parse the system variables for the location of the ~/.oci/config file. More...
 
static int oci_authenticate_client_plugin (MYSQL_PLUGIN_VIO *vio, MYSQL *)
 client auth function More...
 
static int try_parse_and_set_config_file ()
 Try to parse and assess the currently effective config file. 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 const char * s_oci_config_location = nullptr
 
static oci::OCI_config_files_oci_config_file = nullptr
 
 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
 

Function Documentation

◆ initialize_plugin()

static int initialize_plugin ( char *  ,
size_t  ,
int  ,
va_list   
)
static

◆ mysql_declare_client_plugin()

mysql_declare_client_plugin ( AUTHENTICATION  )

◆ oci_authenticate_client_option()

static int oci_authenticate_client_option ( const char *  option,
const void *  val 
)
static

oci_authenticate_client_option plugin API to allow server to pass optional data for plugin to process

◆ oci_authenticate_client_plugin()

static int oci_authenticate_client_plugin ( MYSQL_PLUGIN_VIO vio,
MYSQL  
)
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.

◆ parse_oci_config_file()

oci::OCI_config_file parse_oci_config_file ( )

Parse the system variables for the location of the ~/.oci/config file.

Extract the key_file= value from the ~/.oci/config file.

◆ try_parse_and_set_config_file()

static int try_parse_and_set_config_file ( )
static

Try to parse and assess the currently effective config file.

Return values
0: success
1: parsing failed or not initialized

Variable Documentation

◆ COMMUNITY

OCI Client Authentication COMMUNITY

◆ deinitialize_plugin

OCI Client Authentication deinitialize_plugin

◆ initialize_plugin

OCI Client Authentication initialize_plugin

◆ MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE

MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE

◆ mysql_end_client_plugin

OCI Client Authentication nullptr mysql_end_client_plugin

◆ nullptr

OCI Client Authentication nullptr

◆ oci_authenticate_client_option

OCI Client Authentication oci_authenticate_client_option

◆ oci_authenticate_client_plugin

OCI Client Authentication oci_authenticate_client_plugin

◆ Plugin

OCI Client Authentication Plugin

◆ s_oci_config_file

oci::OCI_config_file* s_oci_config_file = nullptr
static

◆ s_oci_config_location

const char* s_oci_config_location = nullptr
static