Handling of database encryption key revocation
Systems and methods include storage of a plurality of encrypted data pages of a row store database table in a persistent storage system, determination of a first encryption key associated with one of the plurality of encrypted data pages based on a header of the one of the plurality of encrypted data pages, determination of whether the first encryption key has been revoked, and, if it is determined that the first encryption key has been revoked, adding of a portion of volatile memory allocated to the one of the plurality of data pages to a free list.
1 . A database system comprising:
a persistent storage system;
a volatile memory; and
a processing unit to execute program code of a database instance to cause the database system to:
store a plurality of encrypted data pages of a row store database table at a database savepoint;
detect a database restart and, in response to detection of the database restart:
determine, based on a header of one of the plurality of encrypted data pages, a first encryption key used to encrypt a body of the one of the plurality of data pages;
determine that the first encryption key has been revoked;
in response to the determination that the first encryption key has been revoked, add a portion of the volatile memory allocated to the one of the plurality of data pages to a free list of the volatile memory;
determine a plurality of encrypted undo data pages of uncommitted transactions of the database savepoint in the persistent storage system;
determine, based on a header of one of the plurality of encrypted undo data pages, a third encryption key used to encrypt a body of the one of the plurality of encrypted undo data pages;
determine that the third encryption key has been revoked; and
in response to the determination that the third encryption key has been revoked, clear a body of the one of the plurality of encrypted undo data pages and provide the one of the plurality of undo data pages with the cleared body to a rollback mechanism of a database instance.
2 . A system according to claim 1 , wherein the processing unit is to execute program code of the database instance to cause the database system to:
determine, based on a second header of a second one of the plurality of encrypted data pages, a second encryption key used to encrypt a second body of the second one of the plurality of data pages;
determine that the second encryption key has not been revoked;
in response to the determination that the second encryption key has not been revoked, decrypt the second body of the second one of the plurality of data pages using the second encryption key; and
load a second data page comprising the second header and the second decrypted body in the volatile memory.
3 . A system according to claim 2 , wherein determination that the first encryption key has been revoked comprises determination that a key encryption key used to encrypt the first encryption key has been revoked.
4 . A system according to claim 3 , wherein determination that the key encryption key used to encrypt the first encryption key has been revoked comprises polling of a key management system storing the key encryption key.
5 . A system according to claim 1 , wherein determination that the first encryption key has been revoked comprises determination that a key encryption key used to encrypt the first encryption key has been revoked.
6 . A system according to claim 5 , wherein determination that the key encryption key used to encrypt the first encryption key has been revoked comprises polling of a key management system storing the key encryption key.
7 . A method comprising:
storing a plurality of encrypted data pages of a row store database table in a persistent storage system at a database savepoint;
detecting a database restart and, in response to detecting the database restart:
determining, based on a header of one of the plurality of encrypted data pages, a first encryption key used to encrypt a body of one of the plurality of encrypted data pages;
determining that the first encryption key has been revoked;
in response to determining that the first encryption key has been revoked, adding a portion of volatile memory allocated to the one of the plurality of data pages to a free list;
determining a plurality of encrypted undo data pages of uncommitted transactions of the database savepoint in the persistent storage system;
determining, based on a header of one of the plurality of encrypted undo data pages, a third encryption key used to encrypt the one of the plurality of encrypted undo data pages;
determining that the third encryption key has been revoked; and
in response to determining that the third encryption key has been revoked, clearing a body of the one of the plurality of encrypted undo data pages and providing the one of the plurality of undo data pages with the cleared body to a rollback mechanism of a database instance.
8 . A method according to claim 7 , further comprising:
determining, based on a second header of a second one of the plurality of encrypted data pages, a second encryption key used to encrypt a second body of the second one of the plurality of data pages;
determining that the second encryption key has not been revoked;
in response to determining that the second encryption key has not been revoked, decrypting the encrypted second body of the second one of the plurality of encrypted data pages using the second encryption key; and
loading a second data page comprising the second header and the decrypted second body into the volatile memory.
9 . A method according to claim 8 , wherein determining that the first encryption key has been revoked comprises determining that a key encryption key used to encrypt the first encryption key has been revoked.
10 . A method according to claim 9 , wherein determining that the key encryption key used to encrypt the first encryption key has been revoked comprises polling a key management system storing the key encryption key.
11 . A method according to claim 7 , wherein determining that the first encryption key has been revoked comprises determining that a key encryption key used to encrypt the first encryption key has been revoked.
12 . A method according to claim 11 , wherein determining that the key encryption key used to encrypt the first encryption key has been revoked comprises polling a key management system storing the key encryption key.
13 . A non-transitory computer-readable medium storing program code executable by one or more processing units to cause a computing system to:
store a plurality of encrypted data pages of a row store database table in a persistent storage system at a database savepoint;
detect a database restart and, in response to detection of the database restart:
determine, based on a header of one of the plurality of encrypted data pages, a first encryption key used to encrypt a body of one of the plurality of encrypted data pages;
determine that the first encryption key has been revoked;
in response to the determination that the first encryption key has been revoked, add a portion of volatile memory allocated to the one of the plurality of data pages to a free list;
determine a plurality of encrypted undo data pages of uncommitted transactions of the database savepoint in the persistent storage system;
determine, based on a header of one of the plurality of encrypted undo data pages, a third encryption key used to encrypt the one of the plurality of encrypted undo data pages;
determine that the third encryption key has been revoked; and
in response to the determination that the third encryption key has been revoked, clear a body of the one of the plurality of encrypted undo data pages and provide the one of the plurality of undo data pages with the cleared body to a rollback mechanism of a database instance.
14 . A medium according to claim 13 , the program code executable by one or more processing units to cause a computing system to:
determine, based on a second header of a second one of the plurality of encrypted data pages, a second encryption key used to encrypt a second body of the second one of the plurality of data pages;
determine that the second encryption key has not been revoked;
in response to the determination that the second encryption key has not been revoked, decrypt a second body of the second one of the plurality of encrypted data pages using the second encryption key; and
load a second data page comprising the second header and the decrypted second body into the volatile memory.
15 . A medium according to claim 14 , wherein determination that the first encryption key has been revoked comprises determination that a key encryption key used to encrypt the first encryption key has been revoked.
16 . A medium according to claim 15 , wherein determination that the key encryption key used to encrypt the first encryption key has been revoked comprises polling of a key management system storing the key encryption key.
17 . A medium according to claim 13 , wherein determination that the first encryption key has been revoked comprises determination of whether a key encryption key used to encrypt the first encryption key has been revoked.