MySQL 8.3.0
Source Code Documentation
mysql_server_keyring_lockable_imp.h File Reference

Go to the source code of this file.

Namespaces

namespace  keyring_lockable
 

Functions

void init_srv_event_tracking_handles ()
 
void deinit_srv_event_tracking_handles ()
 
void keyring_lockable_init ()
 Initialize lockable keyring component. More...
 
void keyring_lockable_deinit ()
 Deinitialize lockable keyring component. More...
 
void set_srv_keyring_implementation_as_default ()
 Set server's implementation of keyring as default. More...
 
void release_keyring_handles ()
 
bool keyring_status_no_error ()
 

Variables

const mysql_service_keyring_aes_tsrv_keyring_aes
 Server handle for keyring AES encryption service. More...
 
const mysql_service_keyring_generator_tsrv_keyring_generator
 Server handle for keyring generator service. More...
 
const mysql_service_keyring_keys_metadata_iterator_tsrv_keyring_keys_metadata_iterator
 Server handle for keyring keys metadata service. More...
 
const mysql_service_keyring_component_status_tsrv_keyring_component_status
 Server handle for keyring status service. More...
 
const mysql_service_keyring_component_metadata_query_tsrv_keyring_component_metadata_query
 Server handle for keyring component metadata service. More...
 
const mysql_service_keyring_reader_with_status_tsrv_keyring_reader
 Server handle for keyring reader service. More...
 
const mysql_service_keyring_load_tsrv_keyring_load
 Server handle for keyring load service. More...
 
const mysql_service_keyring_writer_tsrv_keyring_writer
 Server handle for keyring writer service. More...
 

Function Documentation

◆ deinit_srv_event_tracking_handles()

void deinit_srv_event_tracking_handles ( )

◆ init_srv_event_tracking_handles()

void init_srv_event_tracking_handles ( )

◆ keyring_lockable_deinit()

void keyring_lockable_deinit ( )

Deinitialize lockable keyring component.

◆ keyring_lockable_init()

void keyring_lockable_init ( )

Initialize lockable keyring component.

◆ keyring_status_no_error()

bool keyring_status_no_error ( )

◆ release_keyring_handles()

void release_keyring_handles ( )

◆ set_srv_keyring_implementation_as_default()

void set_srv_keyring_implementation_as_default ( )

Set server's implementation of keyring as default.

server component provides implementation of all keyring related services to provide concurrency control.

In turn it uses either one of the following as actual implementation(in order of priority): A> A keyring component loaded through manifest file B> Proxy keyring component over keyring plugin

There are two places where this function is called.

Path 1

At the time of server startup, server_component's services are registered when minimal chassis is initialized. However, without actual keyring implementation, they are not really of any use.

After minimal chassis initialization, server read manifest file. If file is present and contains keyring component details, the component is loaded and services are registered.

At this point we have 2 implementations of each keyring services: One provided by server and another provided by keyring component.

One component is loaded set_srv_keyring_implementation_as_default() is called. At this stage function will:

  1. Set server's implementation of lockable keyring as default
  2. Acquire handles to all services provided by keyring component

After this point, keyring functionality can be used.

Path 2

If manifest file is not provided or does not contain details of keyring plugin, call to set_srv_keyring_implementation_as_default() will still be made and set server's implementation as default.

However, no internal handles are set. Thus, keyring functionality can not be used still.

Startup sequence will then process –early-plugin-load if provided.

Afterwards, daemon_proxy_keyring_implementation plugin is loaded which registers a subset of keyring component services. These services will use keyring plugin if installed.

At this point set_srv_keyring_implementation_as_default() is called once again. If internal handles were not set with the first call, they are set now and will use daemon_proxy_keyring_implementation.

This means, if keyring plugin is available (either through –early-plugin-load OR loaded later through INSTALL PLUGIN), it will be used.

Variable Documentation

◆ srv_keyring_aes

const mysql_service_keyring_aes_t* srv_keyring_aes
extern

Server handle for keyring AES encryption service.

◆ srv_keyring_component_metadata_query

const mysql_service_keyring_component_metadata_query_t* srv_keyring_component_metadata_query
extern

Server handle for keyring component metadata service.

◆ srv_keyring_component_status

const mysql_service_keyring_component_status_t* srv_keyring_component_status
extern

Server handle for keyring status service.

◆ srv_keyring_generator

const mysql_service_keyring_generator_t* srv_keyring_generator
extern

Server handle for keyring generator service.

◆ srv_keyring_keys_metadata_iterator

const mysql_service_keyring_keys_metadata_iterator_t* srv_keyring_keys_metadata_iterator
extern

Server handle for keyring keys metadata service.

◆ srv_keyring_load

const mysql_service_keyring_load_t* srv_keyring_load
extern

Server handle for keyring load service.

◆ srv_keyring_reader

const mysql_service_keyring_reader_with_status_t* srv_keyring_reader
extern

Server handle for keyring reader service.

◆ srv_keyring_writer

const mysql_service_keyring_writer_t* srv_keyring_writer
extern

Server handle for keyring writer service.