24#ifndef MIGRATE_KEYRING_H_INCLUDED
25#define MIGRATE_KEYRING_H_INCLUDED
39#define MAX_KEY_LEN 16384
67 const std::string &implementation_name);
85 const std::string &implementation_name);
104 const std::string &implementation_name);
122 bool init(
int argc,
char **argv,
char *source_plugin,
124 char *
socket, ulong
port,
bool migrate_to_component,
125 bool migrate_from_component);
Definition: migrate_keyring.h:101
const_keyring_writer_t * writer()
Definition: migrate_keyring.h:107
~Destination_keyring_component()
Definition: migrate_keyring.cc:183
Destination_keyring_component(const std::string &component_path, const std::string &implementation_name)
Definition: migrate_keyring.cc:149
const_keyring_writer_t * keyring_writer_service_
Definition: migrate_keyring.h:110
Definition: migrate_keyring.h:43
std::string m_key_id
Definition: migrate_keyring.h:52
Key_info(char *key_id, char *user_id)
Definition: migrate_keyring.h:46
Key_info(const Key_info &ki)
Definition: migrate_keyring.h:48
std::string m_user_id
Definition: migrate_keyring.h:53
Definition: migrate_keyring.h:63
Keyring_component()=default
bool component_loaded_
Definition: migrate_keyring.h:78
bool ok() const
Definition: migrate_keyring.h:72
const_keyring_load_t * keyring_load_service_
Definition: migrate_keyring.h:77
~Keyring_component()
Definition: migrate_keyring.cc:70
const std::string component_path_
Definition: migrate_keyring.h:75
const_keyring_load_t * initializer()
Definition: migrate_keyring.h:71
my_h_service h_keyring_load_service
Definition: migrate_keyring.h:76
bool ok_
Definition: migrate_keyring.h:79
Definition: migrate_keyring.h:113
st_mysql_keyring * m_source_plugin_handle
Definition: migrate_keyring.h:165
std::string m_source_plugin_option
Definition: migrate_keyring.h:160
Destination_keyring_component * m_destination_component
Definition: migrate_keyring.h:173
int m_argc
Definition: migrate_keyring.h:158
NET_SERVER server_extn
Definition: migrate_keyring.h:169
st_mysql_keyring * m_destination_plugin_handle
Definition: migrate_keyring.h:166
bool enable_keyring_operations()
Enable @keyring_operations variable.
Definition: migrate_keyring.cc:756
std::string m_destination_plugin_option
Definition: migrate_keyring.h:161
bool load_component()
Load component.
Definition: migrate_keyring.cc:454
bool fetch_and_store_keys()
Fetch keys from source plugin and store in destination plugin.
Definition: migrate_keyring.cc:622
~Migrate_keyring()
Standard destructor.
Definition: migrate_keyring.cc:774
MYSQL * mysql
Definition: migrate_keyring.h:168
char ** m_argv
Definition: migrate_keyring.h:159
Migrate_keyring()
Standard constructor.
Definition: migrate_keyring.cc:190
std::string m_source_plugin_name
Definition: migrate_keyring.h:162
bool init(int argc, char **argv, char *source_plugin, char *destination_plugin, char *user, char *host, char *password, char *socket, ulong port, bool migrate_to_component, bool migrate_from_component)
Initialize all needed parameters to proceed with migration process.
Definition: migrate_keyring.cc:231
bool m_migrate_to_component
Definition: migrate_keyring.h:170
std::vector< Key_info > m_source_keys
Definition: migrate_keyring.h:167
std::string m_internal_option[2]
Definition: migrate_keyring.h:164
bool disable_keyring_operations()
Disable @keyring_operations variable.
Definition: migrate_keyring.cc:739
std::string m_destination_plugin_name
Definition: migrate_keyring.h:163
Source_keyring_component * m_source_component
Definition: migrate_keyring.h:172
bool load_plugin(enum_plugin_type plugin_type)
Load source or destination plugin.
Definition: migrate_keyring.cc:486
bool execute()
Migrate keys from source keyring to destination keyring.
Definition: migrate_keyring.cc:390
bool m_migrate_from_component
Definition: migrate_keyring.h:171
Definition: migrate_keyring.h:82
~Source_keyring_component()
Definition: migrate_keyring.cc:136
const_keyring_keys_metadata_iterator_t * metadata_iterator()
Definition: migrate_keyring.h:91
Source_keyring_component(const std::string &component_path, const std::string &implementation_name)
Definition: migrate_keyring.cc:88
const_keyring_keys_metadata_iterator_t * keyring_keys_metadata_iterator_service_
Definition: migrate_keyring.h:97
const_keyring_reader_with_status_t * reader()
Definition: migrate_keyring.h:88
const_keyring_reader_with_status_t * keyring_reader_service_
Definition: migrate_keyring.h:98
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
struct my_h_service_imp * my_h_service
A handle type for acquired Service.
Definition: registry.h:33
enum_plugin_type
Definition: migrate_keyring.h:41
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
static char * password
Definition: mysql_secure_installation.cc:58
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol)
Definition: socket.h:63
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:33
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:76
Definition: mysql_com_server.h:59
Keyring load service provides way to initialize or reiniitalize keyring component.
Definition: keyring_load.h:52
Keyring reader with status service provides APIs to fetch sensitive data from keyring backend.
Definition: keyring_reader_with_status.h:128
Keyring writer service provides APIs to add/remove sensitive data to/from keyring backend.
Definition: keyring_writer.h:70
The descriptor structure for the plugin, that is referred from st_mysql_plugin.
Definition: plugin_keyring.h:39