MySQL 8.0.39
Source Code Documentation
|
#include <atomic>
#include <string>
#include <mysql/components/my_service.h>
#include <mysql/components/component_implementation.h>
#include <mysql/components/service_implementation.h>
#include <mysql/components/services/keyring_aes.h>
#include <mysql/components/services/keyring_generator.h>
#include <mysql/components/services/keyring_keys_metadata_iterator.h>
#include <mysql/components/services/keyring_load.h>
#include <mysql/components/services/keyring_metadata_query.h>
#include <mysql/components/services/keyring_reader_with_status.h>
#include <mysql/components/services/keyring_writer.h>
#include <components/keyrings/common/component_helpers/include/keyring_encryption_service_definition.h>
#include <components/keyrings/common/component_helpers/include/keyring_generator_service_definition.h>
#include <components/keyrings/common/component_helpers/include/keyring_keys_metadata_iterator_service_definition.h>
#include <components/keyrings/common/component_helpers/include/keyring_metadata_query_service_definition.h>
#include <components/keyrings/common/component_helpers/include/keyring_reader_service_definition.h>
#include <components/keyrings/common/component_helpers/include/keyring_load_service_definition.h>
#include <components/keyrings/common/component_helpers/include/keyring_writer_service_definition.h>
Go to the source code of this file.
Namespaces | |
namespace | keyring_lockable |
Functions | |
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_t * | srv_keyring_aes |
Server handle for keyring AES encryption service. More... | |
const mysql_service_keyring_generator_t * | srv_keyring_generator |
Server handle for keyring generator service. More... | |
const mysql_service_keyring_keys_metadata_iterator_t * | srv_keyring_keys_metadata_iterator |
Server handle for keyring keys metadata service. More... | |
const mysql_service_keyring_component_status_t * | srv_keyring_component_status |
Server handle for keyring status service. More... | |
const mysql_service_keyring_component_metadata_query_t * | srv_keyring_component_metadata_query |
Server handle for keyring component metadata service. More... | |
const mysql_service_keyring_reader_with_status_t * | srv_keyring_reader |
Server handle for keyring reader service. More... | |
const mysql_service_keyring_load_t * | srv_keyring_load |
Server handle for keyring load service. More... | |
const mysql_service_keyring_writer_t * | srv_keyring_writer |
Server handle for keyring writer service. More... | |
void keyring_lockable_deinit | ( | ) |
Deinitialize lockable keyring component.
void keyring_lockable_init | ( | ) |
Initialize lockable keyring component.
bool keyring_status_no_error | ( | ) |
void release_keyring_handles | ( | ) |
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.
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:
After this point, keyring functionality can be used.
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.
|
extern |
Server handle for keyring AES encryption service.
|
extern |
Server handle for keyring component metadata service.
|
extern |
Server handle for keyring status service.
|
extern |
Server handle for keyring generator service.
|
extern |
Server handle for keyring keys metadata service.
|
extern |
Server handle for keyring load service.
|
extern |
Server handle for keyring reader service.
|
extern |
Server handle for keyring writer service.