forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a new GUC variable, `pg_tde.inherit_global_providers` (ON by default) and changes several related API functions. With these changes, it is now possible to use global key providers as key providers for database principal keys, when the variable is ON. When the variable is OFF existing global keyring uses will continue to work, but no new database configuration is allowed based on a global provider. To allow a cleaner API with these changes, the following user interface changes are also included: * the rotate_principal_key functions are now gone. Principal keys now can be rotated with the set_principal_key function instead. * The set_principal_key function has a global and a "normal" overload. * The server (WAL) principal key is now rotated with a separate function. * Automatic key versioning is removed: keys are saved on the keyrings exactly with the name as it was specified by the user. On disk storage is unchanged, existing keys will continue to work, but will display the numeric version tag in postgres after this commit. There's also an internal change about keyring numbering: after this commit, global providers are generated with negative numbers, and local providers are generated with positive numbers (as before). This allows the keyring code to differentiate between them without changint he disk format, as it can only refer one database Oid - a negative number identified a global key. There's no update logic for this, when upgrading from the Beta, old global keys will continue to exist with positive IDs, but new global keys will receive negative IDs. This means that old global keys won't be usable for local use, set_principal_key displays an appropriate error message for this situation. The commit also renames a few internal variables/functions which were related to the changes and used misleading naming.
- Loading branch information
Showing
16 changed files
with
388 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"files.associations": { | ||
"tde_principal_key.h": "c" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.