Skip to content

Commit 4f78800

Browse files
Implemented fixes and improvements
1 parent d0d6ac9 commit 4f78800

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed

product_docs/docs/tde/15/enabling/enabling_tde.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ This example uses EDB Postgres Advanced Server 16 running on a Linux platform. I
1717
1. Set the data encryption key (wrap) and decryption (unwrap) environment variables:
1818

1919
```shell
20-
export PGDATAKEYWRAPCMD='openssl enc -e -aes-128-cbc -pass pass:<password> -out "%p"'
21-
export PGDATAKEYUNWRAPCMD='openssl enc -d -aes-128-cbc -pass pass:<password> -in "%p"'
20+
export PGDATAKEYWRAPCMD='openssl enc -e -aes-128-cbc -pbkdf2 -pass pass:<password> -out "%p"'
21+
export PGDATAKEYUNWRAPCMD='openssl enc -d -aes-128-cbc -pbkdf2 -pass pass:<password> -in "%p"'
2222
```
2323

2424
!!!note

product_docs/docs/tde/15/enabling/enabling_tde_epas.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ Use [pg_dumpall](https://www.postgresql.org/docs/current/app-pg-dumpall.html), [
5454
1. Set environment variables to export the `wrap` and `unwrap` commands:
5555

5656
```
57-
export PGDATAKEYWRAPCMD='openssl enc -e -aes-128-cbc -pass pass:ok -out "%p"'
58-
export PGDATAKEYUNWRAPCMD='openssl enc -d -aes-128-cbc -pass pass:ok -in "%p"'
57+
export PGDATAKEYWRAPCMD='openssl enc -e -aes-128-cbc -pbkdf2 -pass pass:ok -out "%p"'
58+
export PGDATAKEYUNWRAPCMD='openssl enc -d -aes-128-cbc -pbkdf2 -pass pass:ok -in "%p"'
5959
```
6060

6161
!!!note

product_docs/docs/tde/15/enabling/postgres_to_extended.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ This example upgrades a PostgreSQL 16 instance to EDB Postgres Extended Server 1
5454
1. Set environment variables to export the `wrap` and `unwrap` commands:
5555

5656
```
57-
export PGDATAKEYWRAPCMD='openssl enc -e -aes-128-cbc -pass pass:ok -out "%p"'
58-
export PGDATAKEYUNWRAPCMD='openssl enc -d -aes-128-cbc -pass pass:ok -in "%p"'
57+
export PGDATAKEYWRAPCMD='openssl enc -e -aes-128-cbc -pbkdf2 -pass pass:ok -out "%p"'
58+
export PGDATAKEYUNWRAPCMD='openssl enc -d -aes-128-cbc -pbkdf2 -pass pass:ok -in "%p"'
5959
```
6060

6161
!!!note

product_docs/docs/tde/15/encrypted_files/wal_files.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Alternatively, you can set the `PGDATAKEYUNWRAPCMD` environment variable before
4141
This example uses `pg_waldump` to display the WAL log of an encrypted cluster that uses `openssl` to wrap the data encryption key:
4242

4343
```
44-
pg_waldump --data-encryption --key-file-name=pg_encryption/key.bin --key-unwrap-command='openssl enc -d -aes-128-cbc -pass pass:<passphrase> -in "%p"'
44+
pg_waldump --data-encryption --key-file-name=pg_encryption/key.bin --key-unwrap-command='openssl enc -d -aes-128-cbc -pbkdf2 -pass pass:<passphrase> -in "%p"'
4545
```
4646

4747
## Resetting a corrupt TDE-encrypted WAL file
@@ -59,5 +59,5 @@ Alternatively, you can set the `PGDATAKEYUNWRAPCMD` environment variable before
5959
This example uses `pg_resetwal` to reset a corrupt encrypted WAL log of an encrypted cluster that uses `openssl` to wrap the data encryption key:
6060

6161
```
62-
pg_resetwal --key-unwrap-command='openssl enc -d -aes-128-cbc -pass pass:<passphrase> -in" "%p"'
62+
pg_resetwal --key-unwrap-command='openssl enc -d -aes-128-cbc -pbkdf2 -pass pass:<passphrase> -in" "%p"'
6363
```

product_docs/docs/tde/15/initdb_tde_options.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Adds transparent data encryption when initializing a database server.
1111

1212
### Supported values
1313

14-
You can optionally specify an AES key length. Valid values are 128 and 256. The default is 128.
14+
You can optionally specify an AES key length in the form of `--data-encryption[=KEYLEN]`.
15+
16+
Valid values are 128 and 256. The default is 128.
1517

1618
## Option: `--key-wrap-command=<command>`
1719

product_docs/docs/tde/15/secure_key/disabling_key.mdx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ description: Learn how to omit using a wrapping key.
44
deepToc: true
55
---
66

7-
If you don't want key wrapping, for example for testing, then you must set the wrap and unwrap commands to the special value `-`.
7+
If you don't want key wrapping, for example for testing purposes, you have two options:
88

9-
This setting specifies to use the key from the file without further processing. This approach differs from not setting a wrap or unwrap command at all and from setting either or both to an empty string. Having no wrap or unwrap command set when TDE is used leaves your data encryption key unsecured and results in a fatal error when running an affected utility program.
9+
- You can set the wrap and unwrap commands to the special value `-` when initializing the cluster with `initdb`. For example, with the flags `--key-wrap-command=-` and `--key-unwrap-command=-`.
10+
11+
With this configuration TDE generates encryption key files, but leaves them unprotected.
12+
13+
- You can disable key wrapping when initializing the cluster with `initdb` by adding the flag `--no-key-wrap`.
14+
15+
With this configuration TDE generates encryption key files, but leaves them unprotected.
16+
17+
For `intidb --data-encryption` to run successfully, you have to either, specify a wrapping/unwrapping command, set a fallback environment variable with wrapping/unwrapping commands, or disable key wrapping with the one of the previous mechanisms. Otherwise, the database cluster will fail.

0 commit comments

Comments
 (0)