forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 11
Tde documentation updates for ga #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Andriciuc
merged 31 commits into
TDE_REL_17_STABLE
from
TDE-documentation-updates-for-GA
May 8, 2025
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
fdd464b
Added and reorg files
Andriciuc f3d8379
Split Home and created TDE Overview
Andriciuc e2d4be2
Further refined and split into topics
Andriciuc f5db064
Renamed files and folders for better SEO
Andriciuc 4869f64
Merge remote-tracking branch 'origin/pg_tde_docs_updates_for_GA' into…
Andriciuc ed361e7
updated with Anders branch
Andriciuc b5c9e89
Small updates to yml and apt
Andriciuc d5a0629
updated index folder to reflect chapter name, overview
Andriciuc ef82b1f
updated overview doc to index again
Andriciuc cbd4017
updated links to reflect proper structure
Andriciuc 778851b
Setup.md and structure changes
Andriciuc 1e3c160
A handful of fixes
Andriciuc 043b44e
removed PG Community mentions
Andriciuc 0876d20
updated cli and kmip server code
Andriciuc 106856d
small fixes
Andriciuc 6dc7d79
Update functions.md
Andriciuc 9b8d6c2
updated toc
Andriciuc 9302f0f
small fixes to buttons added
Andriciuc 7d4b514
smaller updates
Andriciuc 6f1c3b8
smaller updates
Andriciuc 12230fe
Update requirements.txt
Andriciuc 31c0975
fixes part 1/2 from feedback review
Andriciuc dce23bd
updated features.md
Andriciuc 1e61a45
removed compliance/regulations
Andriciuc f636e82
fix for PG-1587
Andriciuc 45b470e
fixes for nastia 1/2 and for jz 2/2
Andriciuc 104710e
all fixes accounted for
Andriciuc a39e568
Resolve merge conflicts
Andriciuc 31bea87
fixes to titles
Andriciuc be6e6ef
fixed notes in features
Andriciuc 7b76758
updated function parameters
Andriciuc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
updated toc
also, improved CLI flow, split into 3 subchapters
- Loading branch information
commit 9b8d6c2c95f28dd1e685d10e6d32721ac213ae37
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
contrib/pg_tde/documentation/docs/command-line-tools/index.md
This file contains hidden or 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,7 @@ | ||
# Additional CLI Commands and Tools | ||
|
||
The `pg_tde` extension introduces new command-line utilities and extends some existing PostgreSQL tools to support encrypted WAL and tables. These include: | ||
|
||
* [pg_tde_change_key_provider](../command-line-tools/pg-tde-change-key-provider.md): change encryption key provider for a database | ||
* [pg_waldump](../command-line-tools/pg-waldump.md): inspect and decrypt WAL files | ||
* [pg_checksums](../command-line-tools/pg-checksums.md): verify data checksums (non-encrypted files only) |
37 changes: 37 additions & 0 deletions
37
contrib/pg_tde/documentation/docs/command-line-tools/pg-tde-change-key-provider.md
This file contains hidden or 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,37 @@ | ||
# pg_tde_change_key_provider | ||
|
||
A tool for modifying the configuration of a key provider, possibly also changing its type. | ||
|
||
This tool edits the configuration files directly, ignoring permissions or running `postgres` processes. | ||
|
||
Its only intended use is to fix servers that can't start up because of inaccessible key providers. | ||
|
||
For example, you restore from an old backup and the address of the key provider changed in the meantime. You can use this tool to correct the configuration, allowing the server to start up. | ||
|
||
!!! warning | ||
Use this tool **only when the server is offline.** To modify the key provider configuration when the server is up and running, use the [`pg_tde_change_(global/database)_key_provider_<type>`](../functions.md#change-an-existing-provider) SQL functions. | ||
|
||
## Example usage | ||
|
||
To modify the key provider configuration, specify all parameters depending on the provider type in the same way as you do when using the [`pg_tde_change_(global/database)_key_provider_<type>`](../functions.md#change-an-existing-provider) SQL functions. | ||
|
||
The general syntax is as follows: | ||
|
||
```bash | ||
pg_tde_change_key_provider [-D <datadir>] <dbOid> <provider_name> <new_provider_type> <provider_parameters...> | ||
``` | ||
|
||
## Parameter description | ||
|
||
* [optional] `<datadir>` is the data directory.`pg_tde` uses the `$PGDATA` environment variable if this is not specified | ||
* `<provider_name>` is the name you assigned to the key provider | ||
* `<new_provider_type>` can be a `file`, `vault` or `kmip` | ||
* `<dbOid>` | ||
|
||
Depending on the provider type, the additional parameters are: | ||
|
||
```bash | ||
pg_tde_change_key_provider [-D <datadir>] <dbOid> <provider_name> file <filename> | ||
pg_tde_change_key_provider [-D <datadir>] <dbOid> <provider_name> vault <token> <url> <mount_path> [<ca_path>] | ||
pg_tde_change_key_provider [-D <datadir>] <dbOid> <provider_name> kmip <host> <port> <cert_path> <key_path> [<ca_path>] | ||
``` |
5 changes: 5 additions & 0 deletions
5
contrib/pg_tde/documentation/docs/command-line-tools/pg-tde-checksums.md
This file contains hidden or 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 @@ | ||
# pg_checksums | ||
|
||
[`pg_checksums` :octicons-link-external-16:](https://www.postgresql.org/docs/current/app-pgchecksums.html) is a PostgreSQL command-line utility used to enable, disable, or verify data checksums on a PostgreSQL data directory. However, it cannot calculate checksums for encrypted files. | ||
|
||
Encrypted files are skipped, and this is reported in the output. |
14 changes: 14 additions & 0 deletions
14
contrib/pg_tde/documentation/docs/command-line-tools/pg-waldump.md
This file contains hidden or 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,14 @@ | ||
# pg_waldump | ||
|
||
[`pg_waldump` :octicons-link-external-16:](https://www.postgresql.org/docs/current/pgwaldump.html) is a tool to display a human-readable rendering of the Write-Ahead Log (WAL) of a PostgreSQL database cluster. | ||
|
||
To read encrypted WAL records, `pg_waldump` supports the following additional arguments: | ||
|
||
* `keyring_path`: the directory where keyring configuration files for WAL are stored. These files include: | ||
|
||
* `pg_tde.map` | ||
* `pg_tde.dat` | ||
* `pg_tde_keyrings` | ||
|
||
!!! note | ||
`pg_waldump` will not decrypt WAL unless the `keyring_path` is set. |
This file contains hidden or 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
36 changes: 23 additions & 13 deletions
36
...g_tde/documentation/docs/global-key-provider-configuration/set-principal-key.md
This file contains hidden or 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 |
---|---|---|
@@ -1,23 +1,33 @@ | ||
# Set the Global Principal Key | ||
# Global Principal Key Configuration | ||
|
||
Add a default principal key: | ||
|
||
```sql | ||
SELECT pg_tde_set_default_key_using_global_key_provider('name-of-the-key','provider-name','ensure_new_key'); | ||
``` | ||
```sql | ||
SELECT pg_tde_set_default_key_using_global_key_provider( | ||
'name-of-the-key', | ||
'provider-name', | ||
'ensure_new_key' | ||
); | ||
``` | ||
|
||
## Parameter description | ||
|
||
* `name-of-the-key` is the name of the principal key. You will use this name to identify the key. | ||
* `provider-name` is the name of the key provider you added before. The principal key will be associated with this provider. | ||
* `ensure_new_key` defines if a principal key must be unique. The default value `true` means that you must speficy a unique key during key rotation. The `false` value allows reusing an existing principal key. | ||
* `name-of-the-key` is the name of the principal key. You will use this name to identify the key. | ||
* `provider-name` is the name of the key provider you added before. The principal key will be associated with this provider. | ||
* `ensure_new_key` defines if a principal key must be unique. The default value `true` means that you must speficy a unique key during key rotation. The `false` value allows reusing an existing principal key. | ||
|
||
<i warning>:material-information: Warning:</i> This example is for testing purposes only. Replace the key name and provider name with your values: | ||
<i warning>:material-information: Warning:</i> This example is for testing purposes only. Replace the key name and provider name with your values: | ||
|
||
```sql | ||
SELECT pg_tde_set_key_using_global_key_provider('test-db-master-key','file-vault','ensure_new_key'); | ||
``` | ||
```sql | ||
SELECT pg_tde_set_key_using_global_key_provider( | ||
'test-db-master-key', | ||
'file-vault', | ||
'ensure_new_key' | ||
); | ||
``` | ||
|
||
The key is auto-generated. | ||
The key is auto-generated. | ||
|
||
After this, all databases that do not have something else configured will use this newly generated principal key. | ||
After this, all databases that do not have something else configured will use this newly generated principal key. | ||
|
||
[Validate Encryption with pg_tde :material-arrow-right:](../test.md){.md-button} |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.