[MDEV-11538] xtrabackup_logfile is not encrypted with innodb-encrypt-log=ON Created: 2016-12-10  Updated: 2016-12-19  Resolved: 2016-12-19

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Andrii Nikitin (Inactive) Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None


 Description   

This was mentioned earlier, but I create ticket to make sure it is prioritized properly.

Following test demonstrates the problem:

1. Create table and insert some large strings on server with innodb-encrypt-log=ON1:
CREATE TABLE test (a varchar(255));
INSERT INTO test VALUES (repeat('a',200));
insert into test select * from test;
insert into test select * from test;
insert into test select * from test;

2. Open ib_logfile* in text editor and try to find strings like 'aaaaaaaaaaa' - there is none. This indicates that log is encrypted

3. Create backup

4. Open xtrabackup_logfile in text editor and observe may strings 'aaaaaaaaaaa....'

This indicates that xtrabackup_logfile has data which is not encrypted.



 Comments   
Comment by Andrii Nikitin (Inactive) [ 2016-12-16 ]

I can still still see inserted long string in xtrabackup_logfile on Centos 7 docker image.
Could you manually verify the test case and confirm if it works for you?

Comment by Vladislav Vaintroub [ 2016-12-16 ]

There is a test case that runs in buildbot. It would fail in the past, but not anymore

Comment by Vladislav Vaintroub [ 2016-12-16 ]

https://github.com/mariadb/server/commit/c1d3e7ee1b5d01139e2ee9efb88b566bbe4f71a7

adds SEARCH_FILE and lookup for a string.
I

Comment by Vladislav Vaintroub [ 2016-12-16 ]

I run your test manually. no plaintext.
If this gives you peace of mind, I can change the xb_file_key_management to match your test exactly, or you can do this as well.

Comment by Andrii Nikitin (Inactive) [ 2016-12-16 ]

On my Centos image I commented out the line in test which removes backup.
Then I tried with grep -b:

xtrabackup.xb_file_key_management [ pass ] 20510
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 20.510 of 28 seconds executing testcases

Completed: All 1 tests were successful.

[root@90c6cf1059b3 mysql-test]# grep -b foobar var/tmp/backup/xtrabackup_logfile
Binary file var/tmp/backup/xtrabackup_logfile matches
[root@90c6cf1059b3 mysql-test]# grep -b eeoobar1 var/tmp/backup/xtrabackup_logfile
[root@90c6cf1059b3 mysql-test]# git diff
diff --git a/mysql-test/suite/xtrabackup/xb_file_key_management.test b/mysql-test/suite/xtrabackup/xb_file_key_management.test
index a3bc4b7..f18ec72 100644
— a/mysql-test/suite/xtrabackup/xb_file_key_management.test
+++ b/mysql-test/suite/xtrabackup/xb_file_key_management.test
@@ -29,5 +29,5 @@ exec $XTRABACKUP --defaults-file=$targetdir/backup-my.cnf --stats --datadir=$ta

SELECT * FROM t;
DROP TABLE t;
-rmdir $targetdir;
+# rmdir $targetdir;

[root@90c6cf1059b3 mysql-test]#

Generated at Thu Feb 08 07:50:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.