Integration with CipherTrust Manager
To integrate MySQL with the CipherTrust Manager:
Configure the okvclient.ora File
Create and configure the okvclient.ora
client file.
cd /var/lib/mysql/mysql-keyring-okv
touch okvclient.ora
The okvclient.ora
file conatins lines similar to the following.
cat /var/lib/mysql/mysql-keyring-okv
SERVER=IP_CipherTrust_Node1:CM_Port
STANDBY_SERVER=IP_CipherTrust_Node2:CM_Port
Configure the keyring conf Directory
To set up the keyring conf directory:
Add the paths of the
keyring_okv.so
library andokvclient.ora
configuration file to themy.cnf
file using:early-plugin-load = keyring_okv.so keyring_okv_conf_dir = /var/lib/mysql/mysql-keyring-okv
Restart the mysql service using
systemctl restart mysqld
.
Test the Configuration
Create a new user and grant all privileges to the user.
CREATE USER 'TestUser'@'localhost' IDENTIFIED BY '********'; GRANT ALL PRIVILEGES ON *.* TO 'TestUser'@'localhost';
Log on to MySQL as “TestUser”, and create a database called
Players
and a table namedBaseballPlayers
.mysql -u TestUser –p create database Players; use Players; CREATE table BaseballPlayers (lastname varchar(16), firstname varchar(12), position varchar(16));
Insert some sample data into the table
BaseballPlayers
.INSERT INTO BaseballPlayers ( firstname, lastname, position ) values ('John','Doe','Outfield' ); INSERT INTO BaseballPlayers ( firstname, lastname, position ) values ('Joe','Smith','Pitcher' ); INSERT INTO BaseballPlayers ( firstname, lastname, position ) values ('Willie','Mays', 'Outfield' );
Encrypt the table.
ALTER TABLE BaseballPlayers ENCRYPTION='Y';
This generates your master encryption key on the CipherTrust Manager and completes your integration. Move to the next section to verify your integration.