[MDEV-20713] Implement key rotation for file_key_management plugin Created: 2019-10-01 Updated: 2019-11-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Encryption, Plugins |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Some users are requesting that we implement key rotation for file_key_management plugin. I'm not sure that it's practical. How would key rotation work in file_key_management plugin? The plugin has some serious limitations that would likely make it impractical to implement key rotation. Some open questions are listed below. Generation of New Key VersionsHow would new key versions be generated? The file_key_management plugin currently doesn't generate any encryption keys itself, and it doesn't even have a backend KMS to generate encryption keys for it either. With file_key_management plugin, any encryption keys currently need to be generated by the user with external tools, such as openssl. For example:
And then the keys currently need to be manually saved to the key file. See here: https://mariadb.com/kb/en/library/file-key-management-encryption-plugin/#creating-the-key-file Some possibilities:
Format of Key FileHow would the format of the key file change to allow different key versions of the same key ID? The format of file_key_management plugin's key file is pretty simplistic. It simply stores encryption keys in a plain-text file that uses the format.
For example, if we had two keys with key ID 1 and 2, then the key file could look like this:
This format currently has no way to store different versions of the same encryption key. However, this is something that it would need to support in order to support key rotation. It's possible that we could extend the format, but it could get very ugly. For example:
For example, if we had two key versions of two different keys with key ID 1 and 2, then the key file could look like this:
Reloading Key VersionsIf we decide that new key versions need to be manually generated, then how would the file_key_management plugin reload the new key versions? Some possibilities:
Similar functionality in other databases?Is there similar functionality in other databases that we could use as inspiration? Users migrating from Oracle might have used Oracle Wallet: |