forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PG-1310: Allow users to enforce encyptioon
This commmit mainly adds a new GUC variable,`pg_tde.enforce_encryption = ON/OFF`. This can only be changed by superusers, and if it is ON, `CREATE TABLE` and similar statements only allow users to use the `tde_heap` access method. Similarly, `ALTER TABLE... SET ACCESS METHOD` only allows the use of `tde_heap`, but other ALTER statements are allowed on existing non encrypted tables. The commit also refactores the GUC variables into a single file, and extends the event trigger to handle the "alternative" `CREATE TABLE` statements: * `CREATE TABLE AS` * `SELECT INTO` * `CREATE MATERIALIZED VIEW` Previously, these resulted in the creation of non encrypted files even with the `tde_heap` access method.
- Loading branch information
Showing
11 changed files
with
227 additions
and
83 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
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
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,26 @@ | ||
/*------------------------------------------------------------------------- | ||
* | ||
* pg_tde_guc.h | ||
* GUC variables for pg_tde | ||
* | ||
* src/include/pg_tde_guc.h | ||
* | ||
*------------------------------------------------------------------------- | ||
*/ | ||
|
||
#ifndef TDE_GUC_H | ||
#define TDE_GUC_H | ||
|
||
|
||
#include "postgres.h" | ||
|
||
#ifndef FRONTEND | ||
|
||
extern bool AllowInheritGlobalProviders; | ||
extern bool EncryptXLog; | ||
extern bool EnforceEncryption; | ||
|
||
void TdeGucInit(void); | ||
|
||
#endif | ||
#endif /* TDE_GUC_H */ |
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.