Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL)
Description
The fix for MDEV-10368 and MDEV-11587 introduced innodb_encryption_rotate_key_age=0 as a special value that disables key rotation entirely. This can help performance, since the key rotation checks seem to require a lot of CPU resources.
Unfortunately, when innodb_encryption_rotate_key_age=0 is set, it also seems to prevent the server from encrypting unencrypted tablespaces in the background.
To reproduce, do the following:
1.) Initialize a datadir without encryption enabled. You can ensure that the tablespaces are not encrypted by querying INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION and confirming that there are 0 rows.
MariaDB [(none)]> SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION\G
|
Empty set (0.01 sec)
|
2.) Then change the configuration to enable encryption. Be sure to set innodb_encryption_rotate_key_age=0. I used the following configuration:
plugin-load-add=file_key_management
|
file-key-management
|
file_key_management_encryption_algorithm=aes_cbc
|
file_key_management_filename = /etc/my.cnf.d//keys.enc
|
file_key_management_filekey = secret
|
innodb-encrypt-tables
|
innodb-encrypt-log
|
innodb-encryption-threads=4
|
encrypt-tmp-disk-tables=1
|
encrypt-tmp-files=1
|
encrypt-binlog=1
|
innodb_encryption_rotate_key_age = 0
|
3.) Restart the server.
4.) Check whether the tablespaces are encrypted. They still are not:
MariaDB [(none)]> SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION\G
|
Empty set (0.00 sec)
|
5.) Change the configuration so that innodb_encryption_rotate_key_age=0 is commented out.
6.) Restart the server.
7.) Check whether the tablespaces are encrypted. They are:
MariaDB [(none)]> SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION\G
|
*************************** 1. row ***************************
|
SPACE: 1
|
NAME: mysql/innodb_table_stats
|
ENCRYPTION_SCHEME: 1
|
KEYSERVER_REQUESTS: 1
|
MIN_KEY_VERSION: 1
|
CURRENT_KEY_VERSION: 1
|
KEY_ROTATION_PAGE_NUMBER: NULL
|
KEY_ROTATION_MAX_PAGE_NUMBER: NULL
|
CURRENT_KEY_ID: 1
|
ROTATING_OR_FLUSHING: 0
|
*************************** 2. row ***************************
|
SPACE: 2
|
NAME: mysql/innodb_index_stats
|
ENCRYPTION_SCHEME: 1
|
KEYSERVER_REQUESTS: 1
|
MIN_KEY_VERSION: 1
|
CURRENT_KEY_VERSION: 1
|
KEY_ROTATION_PAGE_NUMBER: NULL
|
KEY_ROTATION_MAX_PAGE_NUMBER: NULL
|
CURRENT_KEY_ID: 1
|
ROTATING_OR_FLUSHING: 0
|
*************************** 3. row ***************************
|
SPACE: 3
|
NAME: mysql/gtid_slave_pos
|
ENCRYPTION_SCHEME: 1
|
KEYSERVER_REQUESTS: 1
|
MIN_KEY_VERSION: 1
|
CURRENT_KEY_VERSION: 1
|
KEY_ROTATION_PAGE_NUMBER: NULL
|
KEY_ROTATION_MAX_PAGE_NUMBER: NULL
|
CURRENT_KEY_ID: 1
|
ROTATING_OR_FLUSHING: 0
|
*************************** 4. row ***************************
|
SPACE: 0
|
NAME: innodb_system
|
ENCRYPTION_SCHEME: 1
|
KEYSERVER_REQUESTS: 1
|
MIN_KEY_VERSION: 1
|
CURRENT_KEY_VERSION: 1
|
KEY_ROTATION_PAGE_NUMBER: NULL
|
KEY_ROTATION_MAX_PAGE_NUMBER: NULL
|
CURRENT_KEY_ID: 1
|
ROTATING_OR_FLUSHING: 0
|
4 rows in set (0.00 sec)
|
Attachments
Issue Links
- causes
-
MDEV-25998 InnoDB removes the tablespace from default encrypt list early
-
- Closed
-
- relates to
-
MDEV-11657 Cross-engine transaction metadata
-
- Open
-
-
MDEV-14157 Improve documentation of data at rest encryption
-
- Closed
-
-
MDEV-14571 mysql_install_db does not encrypt system tablespace when innodb_encrypt_tables is set
-
- Closed
-
-
MDEV-18128 Simplify .ibd file creation
-
- Closed
-
-
MDEV-18518 Implement atomic multi-table (or multi-partition) CREATE TABLE for InnoDB
-
- Closed
-
-
MDEV-19910 Background encryption of InnoDB system tablespace is broken
-
- Closed
-
-
MDEV-10368 get_latest_version() called too often
-
- Closed
-
-
MDEV-11581 Mariadb starts innodb encryption threads when key has not changed or data scrubbing turned off
-
- Closed
-
-
MDEV-11587 Add new configuration variable to disable encryption key rotation
-
- Closed
-
-
MDEV-14180 Automatically disable key rotation checks for file_key_management plugin
-
- Closed
-
-
MDEV-14610 Add syntax to manually encrypt/decrypt InnoDB's system tablespace
-
- Closed
-
-
MDEV-19509 InnoDB skips the tablespace in rotation list
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue relates to |
Fix Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.2 [ 14601 ] | |
Assignee | Jan Lindström [ jplindst ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Link |
This issue relates to |
Link |
This issue relates to |
Rank | Ranked higher |
Rank | Ranked higher |
Rank | Ranked higher |
Rank | Ranked higher |
Rank | Ranked higher |
Link |
This issue relates to |
Priority | Critical [ 2 ] | Major [ 3 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Rank | Ranked higher |
Labels | encryption innodb | encryption innodb need_feedback |
Assignee | Jan Lindström [ jplindst ] | Thirunarayanan B [ thiru ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Labels | encryption innodb need_feedback | encryption innodb |
Priority | Critical [ 2 ] | Major [ 3 ] |
Assignee | Thirunarayanan B [ thiru ] | Jan Lindström [ jplindst ] |
Affects Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.2.9 [ 22611 ] | |
Issue Type | Bug [ 1 ] | Task [ 3 ] |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Not a Bug [ 6 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Assignee | Jan Lindström [ jplindst ] | Thirunarayanan B [ thiru ] |
Resolution | Not a Bug [ 6 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Fix Version/s | 10.1 [ 16100 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | N/A [ 14700 ] |
Issue Type | Task [ 3 ] | Bug [ 1 ] |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.3 [ 22126 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Assignee | Thirunarayanan B [ thiru ] | Jan Lindström [ jplindst ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Jan Lindström [ jplindst ] | Thirunarayanan B [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Thirunarayanan B [ thiru ] | Marko Mäkelä [ marko ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan B [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Marko Mäkelä [ marko ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Marko Mäkelä [ marko ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Link |
This issue relates to |
Link | This issue relates to MDEV-11657 [ MDEV-11657 ] |
Link |
This issue relates to |
Fix Version/s | 10.4 [ 22408 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Jan Lindström [ jplindst ] |
Assignee | Jan Lindström [ jplindst ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
issue.field.resolutiondate | 2019-05-02 13:06:59.0 | 2019-05-02 13:06:59.477 |
Fix Version/s | 10.2.24 [ 23308 ] | |
Fix Version/s | 10.3.15 [ 23309 ] | |
Fix Version/s | 10.4.5 [ 23311 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue causes |
Workflow | MariaDB v3 [ 83812 ] | MariaDB v4 [ 153189 ] |
Zendesk Related Tickets | 186800 |
Reproducible as described