[MDEV-31094] innodb_encryption_rotate_key_age behaviour is misleading Created: 2023-04-20 Updated: 2023-04-20 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Encryption |
| Affects Version/s: | 10.10.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Sebastian | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | encryption, innodb | ||
| Environment: |
Any |
||
| Description |
|
The documentation states:
This would normally mean that reencryption would occur for any table for which
Since innodb_encryption_rotate_key_age cannot be 0 when rotation is enabled, "<=" (less equal) is safe. Unfortunately, that's not how it works. The check in the code is using "<" (less):
The outcome is that when , the tables won't be reencrypted when I update my encryption key once. I must update it twice, which introduces various difficulties to our external key rotation mechanism. In the following scenario, It's not possible to have my tables encrypted with key version 2:
|
| Comments |
| Comment by Marko Mäkelä [ 2023-04-20 ] |
|
If I remember correctly, the default encryption plugin file_key_management does not support key versions, which could be why this bug has not been noticed earlier. Can you contribute a fix? I think that it should target the 10.4 release. |