1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
include/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
[connection master]
Restart the master enabling the rotate option only
include/rpl_restart_server.inc [server_number=1]
include/assert.inc [binlog_encryption option shall be OFF]
include/assert_grep.inc [Server ignored binlog_rotate_encryption_master_key_at_startup]
include/assert.inc [Binary log rotated]
include/assert.inc [2nd binary log is not encrypted on master]
include/rpl_stop_server.inc [server_number=1]
# Force the server to fail storing master key index
Try to restart the master enabling the options with debug instrumentation
include/assert_grep.inc [Server reported: Failed to store key]
include/assert_grep.inc [Server failed to initialize binlog encryption]
include/assert_grep.inc [Server did not failed to rotate binlog encryption master key at startup]
include/assert_grep.inc [Server aborted to start]
Restart the master enabling the options
include/rpl_start_server.inc [server_number=1]
include/assert.inc [binlog_encryption option shall be ON]
include/assert.inc [Binary log rotated]
include/assert.inc [3rd binary log is encrypted on master]
include/assert.inc [Binary log is encrypted with 2nd key]
include/rpl_stop_server.inc [server_number=1]
# Force the server to fail storing master key index
Try to restart the master enabling the options with debug instrumentation
include/assert_grep.inc [Server reported: Failed to store key]
include/assert_grep.inc [Server failed to initialize binlog encryption]
include/assert_grep.inc [Server did not failed to rotate binlog encryption master key at startup]
include/assert_grep.inc [Server aborted to start]
Restart the master enabling just the binlog_encryption option
include/rpl_start_server.inc [server_number=1]
include/assert.inc [binlog_encryption option shall be ON]
include/assert.inc [Binary log rotated]
include/assert.inc [4th binary log is encrypted on master]
include/assert.inc [Binary log is encrypted with 3th key]
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 TEXT);
INSERT INTO t1 (c2) VALUES ("MySQL");
Restart the master enabling the options to generate key #4
include/rpl_restart_server.inc [server_number=1]
include/assert.inc [binlog_encryption option shall be ON]
include/assert.inc [Binary log rotated as expected]
include/assert.inc [Binary log is encrypted with key #4]
INSERT INTO t1 (c2) VALUES ("MySQL");
Restart the master enabling the options to generate key #5
include/rpl_restart_server.inc [server_number=1]
include/assert.inc [binlog_encryption option shall be ON]
include/assert.inc [Binary log rotated as expected]
include/assert.inc [Binary log is encrypted with key #5]
INSERT INTO t1 (c2) VALUES ("MySQL");
Restart the master enabling the options to generate key #6
include/rpl_restart_server.inc [server_number=1]
include/assert.inc [binlog_encryption option shall be ON]
include/assert.inc [Binary log rotated as expected]
include/assert.inc [Binary log is encrypted with key #6]
INSERT INTO t1 (c2) VALUES ("MySQL");
Restart the master enabling the options to generate key #7
include/rpl_restart_server.inc [server_number=1]
include/assert.inc [binlog_encryption option shall be ON]
include/assert.inc [Binary log rotated as expected]
include/assert.inc [Binary log is encrypted with key #7]
INSERT INTO t1 (c2) VALUES ("MySQL");
Restart the master enabling the options to generate key #8
include/rpl_restart_server.inc [server_number=1]
include/assert.inc [binlog_encryption option shall be ON]
include/assert.inc [Binary log rotated as expected]
include/assert.inc [Binary log is encrypted with key #8]
INSERT INTO t1 (c2) VALUES ("MySQL");
Restart the master enabling the options to generate key #9
include/rpl_restart_server.inc [server_number=1]
include/assert.inc [binlog_encryption option shall be ON]
include/assert.inc [Binary log rotated as expected]
include/assert.inc [Binary log is encrypted with key #9]
INSERT INTO t1 (c2) VALUES ("MySQL");
==== Cleanup ====
* Disable encryption, cleanup database, and consume all encrypted logs.
[connection slave]
include/start_slave.inc
SET GLOBAL binlog_encryption = OFF;
[connection master]
SET GLOBAL binlog_encryption = OFF;
DROP TABLE t1;
include/sync_slave_sql_with_master.inc
* Remove all encrypted logs.
include/rpl_reset.inc
* Uninstall the plugin and delete the keyring.
[connection master]
UNINSTALL PLUGIN keyring_file;
* Restart the servers with the same command lines as before the test.
include/rpl_restart_server.inc [server_number=1]
include/rpl_restart_server.inc [server_number=2]
* Clean up replication test framework
[connection slave]
include/start_slave.inc
include/rpl_end.inc
|