[MDEV-7993] file_key_management_filekey doesn't work as expected with FILE: Created: 2015-04-14 Updated: 2015-05-13 Due: 2015-05-15 Resolved: 2015-05-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Encryption |
| Affects Version/s: | 10.1.4 |
| Fix Version/s: | 10.1.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Rhys Campbell | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7 64 Bit |
||
| Description |
|
The file_key_management_filekey variable doesn't seem to be parsed correctly when used with the FILE: option. The log file responds with the following message...
I've checked my key.enc file decrypts successfully with the following command...
and when I set...
and restart mariadb there are no complaints in the error log. Running SHOW VARIABLES LIKE 'file%'; Show the file_key_management_% variables have been set by the server. I've checked my pwd file a number of times, tried it with a newline after the password, all with the same result. Cheers, Rhys |
| Comments |
| Comment by Sergei Golubchik [ 2015-04-15 ] | |
|
Did you try the password file without a newline? Because the plugin uses the whole file content as a password, including the last newline character. Try
| |
| Comment by Rhys Campbell [ 2015-04-15 ] | |
|
OK, that was it. I wasn't aware of the difference of... linux> echo secret > 1.txt I +1 for a chomp to be done on the password in the file. Thanks. | |
| Comment by Elena Stepanova [ 2015-04-15 ] | |
|
Hi, Sorry I don't quite understand the description. Could you please provide the exact combination of file_key_management* variables which does not work, and explain whether you set them at runtime, or add them to the cnf file, or put them on the command line; and the combination of the variables which works. Thanks. | |
| Comment by Rhys Campbell [ 2015-04-15 ] | |
|
It's resolved. See above comments. Cheers, R | |
| Comment by Rhys Campbell [ 2015-04-15 ] | |
|
I still think this needs a chomp performed on the password obtained from the file. | |
| Comment by Elena Stepanova [ 2015-04-15 ] | |
|
Re-opening for the chomp consideration. | |
| Comment by Sergei Golubchik [ 2015-04-15 ] | |
|
Yes, I agree that the current behavior is sometimes unexpected. On the other hand, one may want to include a newline character in the key. I see these options:
| |
| Comment by Rhys Campbell [ 2015-04-15 ] | |
|
I would just chomp it. I think that's the expected behaviour for almost everybody. I've never come across anyone using, or advocating using, a newline in a password/passphrase. As a general rule I think we expect passwords to not have any leading or trailing whitespace characters. |