[MDEV-8888] Redo log encrypion does not seam to work when enabling after installing Created: 2015-10-02 Updated: 2015-10-30 Resolved: 2015-10-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Documentation, Encryption |
| Affects Version/s: | 10.1.7 |
| Fix Version/s: | 10.1.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Michaël de groot | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | need_feedback | ||
| Issue Links: |
|
||||||||
| Description |
|
Redo log encryption does not seem to work. We enabled it after the installation. Inserting a string into an encrypted table showed up in the redo log using 'strings' command. |
| Comments |
| Comment by Elena Stepanova [ 2015-10-03 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please provide your configuration (cnf files), data structure, INSERT that you are running and the string that you find in the InnoDB logs. Here is an example of my results (could not reproduce the problem so far):
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Petri Rautiainen [ 2015-10-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I was able to reproduce this on 10.1.8 and 10.1.7 with quite random results. I made small php script that ran in iterations of 50 inserted rows after changing innodb_encrypt_log on/off, also restarted the server always with the new setting and had 5 second sleep after restart and also had 1 second sleep after each insert, just in case. Test run starts with encryption on.
Insert statement:
As I was using pdo for prepared statements I set i from loop which is same value with auto_increment. This is how I wanted to distinguish if there will be log entries that were not encrypted when @@innodb_encrypt_log was on. Here are rows that did not get encrypted:
The results actually vary a lot, here is same script run second time on 10.1.8, oddly enough it shares the same rows but not all of them. And did clear out the ib_logfiles before doing second run:
my.cnf (my.sandbox.cnf)
No errors in the error log, all was fine for that. Same run without restarts goes without problems. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-10-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Do you mean that you inserted some data when innodb-encrypt-log=OFF ? If that is true, then they remain naturally unencrypted, there is no background encryption for redo-logs. Log is encrypted if and only if innodb-encrypt-log=ON, changing the value does not effect old data only new data after the setting is enabled. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Petri Rautiainen [ 2015-10-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I did do the run in iterations and like you see from the results when innodb-encrypt-log was on some of the inserts were not encrypted. Most of it was encrypted but not all, but that was the extreme test and most likely does not reflect real world at all. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Michaël de groot [ 2015-10-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This issue is a duplicate to For both JIRA issues I used your blog post as tutorial: https://blog.mariadb.org/table-and-tablespace-encryption-on-mariadb-10-1-3/ so the encryption is the same in #9011. Slightly off topic: The blog post has old configuration parameters. I think easiest is to change the configuration parameters in the blog post or create a note about it? | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-10-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Up to datte documentation is on https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/ |