26#ifndef KEYRING_INFO_INCLUDED
27#define KEYRING_INFO_INCLUDED
47 :
std::runtime_error(msg) {}
58 :
std::runtime_error(msg) {}
69 :
std::runtime_error(msg) {}
96 std::chrono::milliseconds rw_timeout_ = std::chrono::milliseconds(30000);
116 const std::string &master_key_file)
117 : keyring_file_(
keyring_file), master_key_file_(master_key_file) {}
126 master_key_file_ = master_key_file;
130 return master_key_file_;
134 master_key_reader_ = master_key_reader;
138 return master_key_reader_;
142 master_key_writer_ = master_key_writer;
146 return master_key_writer_;
150 master_key_ = master_key;
168 bool read_master_key() noexcept;
175 bool write_master_key() const noexcept;
181 void generate_master_key() noexcept;
189 void add_router_id_to_env(uint32_t router_id) const;
198 bool use_master_key_external_facility() const noexcept;
207 bool use_master_key_file() const noexcept;
216 void validate_master_key() const;
static mysql_service_status_t init()
Component initialization.
Definition: audit_api_message_emit.cc:571
KeyringInfo class encapsulates loading and storing master key using master-key-reader and master-key-...
Definition: keyring_info.h:76
void set_master_key(const std::string &master_key)
Definition: keyring_info.h:149
std::string master_key_reader_
The path to master-key-reader that is used to read master key.
Definition: keyring_info.h:86
std::string keyring_file_
The path to keyring file.
Definition: keyring_info.h:79
std::string master_key_
The master key that is used to encode/decode keyring content.
Definition: keyring_info.h:92
const std::string & get_master_key_file() const noexcept
Definition: keyring_info.h:129
void set_master_key_writer(const std::string &master_key_writer)
Definition: keyring_info.h:141
std::string master_key_writer_
The path to master-key-writer that is used to store master key.
Definition: keyring_info.h:89
void set_master_key_reader(const std::string &master_key_reader)
Definition: keyring_info.h:133
void set_keyring_file(const std::string &keyring_file)
Definition: keyring_info.h:119
KeyringInfo(const std::string &keyring_file, const std::string &master_key_file)
Constructs KeyringInfo and assigns keyring file and master key file.
Definition: keyring_info.h:115
void set_master_key_file(const std::string &master_key_file)
Definition: keyring_info.h:125
std::string master_key_file_
The path to master key file, empty if master key file is not used.
Definition: keyring_info.h:83
const std::string & get_master_key_reader() const noexcept
Definition: keyring_info.h:137
const std::string & get_master_key_writer() const noexcept
Definition: keyring_info.h:145
const std::string & get_master_key() const noexcept
Definition: keyring_info.h:153
const std::string & get_keyring_file() const noexcept
Definition: keyring_info.h:123
KeyringInfo(bool verbose=true) noexcept
Default constructor.
Definition: keyring_info.h:107
MasterKeyReadError class represents error during reading master key using master-key-reader.
Definition: keyring_info.h:55
MasterKeyReadError(const std::string &msg)
Definition: keyring_info.h:57
MasterKeyWriteError class represents error during writing master key using master-key-writer.
Definition: keyring_info.h:44
MasterKeyWriteError(const std::string &msg)
Definition: keyring_info.h:46
SetRouterIdEnvVariableError class represents error duing adding ROUTER_ID variable to environment.
Definition: keyring_info.h:66
SetRouterIdEnvVariableError(const std::string &msg)
Definition: keyring_info.h:68
Configuration.
Definition: config_parser.h:253
static uint verbose
Definition: mysqlcheck.cc:66
Definition: backend.cc:38
Definition: gcs_xcom_synode.h:64
#define ROUTER_UTILS_EXPORT
Definition: router_utils_export.h:15