Skip to content

Commit 780bff6

Browse files
Rearranged key stores per provider, finished Thales integration docs
1 parent 79befd0 commit 780bff6

21 files changed

+353
-183
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Using AWS KMS
3+
description: Learn how to secure your encryption key with an AWS KMS key.
4+
deepToC: true
5+
---
6+
7+
## AWS configuration example
8+
9+
Create a key with [AWS Key Management Service](https://docs.aws.amazon.com/kms/):
10+
11+
```shell
12+
aws kms create-key
13+
aws kms create-alias --alias-name alias/pg-tde-master-1 --target-key-id "..."
14+
```
15+
16+
Use the `aws kms` command with the `alias/pg-tde-master-1` key to wrap and unwrap the data encryption key:
17+
18+
```shell
19+
PGDATAKEYWRAPCMD='aws kms encrypt --key-id alias/pg-tde-master-1 --plaintext fileb:///dev/stdin --output text --query CiphertextBlob | base64 -d > "%p"'
20+
PGDATAKEYUNWRAPCMD='aws kms decrypt --key-id alias/pg-tde-master-1 --ciphertext-blob fileb://"%p" --output text --query Plaintext | base64 -d'
21+
```
22+
!!! Note
23+
Shell commands with pipes, as in this example, are problematic because the exit status of the pipe is that of the last command. A failure of the first, more interesting command isn't reported properly. Postgres handles this somewhat by recognizing whether the wrap or unwrap command wrote nothing. However, it's better to make this command more robust. For example, use the `pipefail` option available in some shells or the `mispipe` command available on some operating systems. Put more complicated commands into an external shell script or other program instead of defining them inline.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Using Azure KMS
3+
description: Learn how to secure your encryption key with an Azure Key Vault key.
4+
deepToC: true
5+
---
6+
7+
## Configuration example
8+
9+
Create a key with [Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/):
10+
11+
```shell
12+
az keyvault key create --vault-name pg-tde --name pg-tde-master-1
13+
```
14+
15+
Use the `az keyvault key` command with the `pg-tde-master-1` key to wrap and unwrap the data encryption key:
16+
17+
```shell
18+
PGDATAKEYWRAPCMD='az keyvault key encrypt --name pg-tde-master-1 --vault-name pg-tde --algorithm A256GCM --value @- --data-type plaintext --only-show-errors --output json | jq -r .result > "%p"'
19+
PGDATAKEYUNWRAPCMD='az keyvault key decrypt --name pg-tde-master-1 --vault-name pg-tde --algorithm A256GCM --value @"%p" --data-type plaintext --only-show-errors --output json | jq -r .result'
20+
```
21+
!!! Note
22+
Shell commands with pipes, as in this example, are problematic because the exit status of the pipe is that of the last command. A failure of the first, more interesting command isn't reported properly. Postgres handles this somewhat by recognizing whether the wrap or unwrap command wrote nothing. However, it's better to make this command more robust. For example, use the `pipefail` option available in some shells or the `mispipe` command available on some operating systems. Put more complicated commands into an external shell script or other program instead of defining them inline.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Using Entrust KMS
3+
description: Learn how to secure your encryption key with a Entrust KeyControl key.
4+
deepToC: true
5+
---
6+
7+
## Configuration guide
8+
9+
See the [EDB Postgres and Entrust KeyControl](https://www.entrust.com/sites/default/files/2024-03/edb-postgres-and-entrust-keycontrol-ig.pdf) integration guide for installation, configuration and usage instructions (including key rotation).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Using Fortanix KMS
3+
description: Learn how to secure your encryption key with a Fortanix Data Security Manager key.
4+
deepToC: true
5+
---
6+
7+
## Configuration example
8+
9+
See [Using Fortanix Data Security Manager with EDB Postgres for TDE](https://support.fortanix.com/docs/using-fortanix-data-security-manager-with-edb-postgres-for-tde) for a step-by-step configuration tutorial.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Using Google Cloud KMS
3+
description: Learn how to secure your encryption key with an Cloud Key Management Service key.
4+
deepToC: true
5+
---
6+
7+
## Configuration example
8+
9+
Create a key with [Google Cloud KMS](https://cloud.google.com/kms/docs):
10+
11+
```shell
12+
gcloud kms keys create pg-tde-master-1 --location=global --keyring=pg-tde --purpose=encryption
13+
```
14+
15+
Use the `gcloud kms` command with the `pg-tde-master-1` key to wrap and unwrap the data encryption key:
16+
17+
```shell
18+
PGDATAKEYWRAPCMD='gcloud kms encrypt --plaintext-file=- --ciphertext-file=%p --location=global --keyring=pg-tde --key=pg-tde-master-1'
19+
PGDATAKEYUNWRAPCMD='gcloud kms decrypt --plaintext-file=- --ciphertext-file=%p --location=global --keyring=pg-tde --key=pg-tde-master-1'
20+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Using HashiCorp KMS
3+
description: Learn how to secure your encryption key with a HashiCorp Vault key.
4+
deepToC: true
5+
---
6+
7+
## Configuration example
8+
9+
Enable transit with [HashiCorp Vault Transit Secrets Engine](https://developer.hashicorp.com/vault/docs):
10+
11+
```shell
12+
vault secrets enable transit
13+
```
14+
15+
Create a key and give it a name:
16+
17+
```shell
18+
vault write -f transit/keys/pg-tde-master-1
19+
```
20+
21+
Use the `vault write` command with the `pg-tde-master-1` key to wrap and unwrap the data encryption key:
22+
23+
```
24+
PGDATAKEYWRAPCMD='base64 | vault write -field=ciphertext transit/encrypt/pg-tde-master-1 plaintext=- > "%p"'
25+
PGDATAKEYUNWRAPCMD='vault write -field=plaintext transit/decrypt/pg-tde-master-1 ciphertext=- < "%p" | base64 -d'
26+
```

Diff for: product_docs/docs/tde/15/secure_key/key_store/index.mdx

+7-94
Original file line numberDiff line numberDiff line change
@@ -6,99 +6,12 @@ deepToC: true
66

77
You can use the key store in an external key management system to manage the data encryption key. The tested and supported key stores are:
88

9-
- Amazon AWS Key Management Service (KMS)
10-
- Microsoft Azure Key Vault
11-
- Google Cloud - Cloud Key Management Service
12-
- HashiCorp Vault (KMIP Secrets Engine and Transit Secrets Engine)
13-
- Thales CipherTrust Manager
14-
- Fortanix Data Security Manager
15-
- Entrust KeyControl
9+
- [Amazon AWS Key Management Service (KMS)](aws)
10+
- [Microsoft Azure Key Vault](azure)
11+
- [Entrust KeyControl](entrust)
12+
- [Fortanix Data Security Manager](fortanix)
13+
- [Google Cloud - Cloud Key Management Service](google_cloud)
14+
- [HashiCorp Vault (KMIP Secrets Engine and Transit Secrets Engine)](hashicorp)
15+
- [Thales CipherTrust Manager](thales)
1616

17-
To use one of the available key stores, see the configuration examples.
1817

19-
## AWS Key Management Service example
20-
21-
Create a key with [AWS Key Management Service](https://docs.aws.amazon.com/kms/):
22-
23-
```shell
24-
aws kms create-key
25-
aws kms create-alias --alias-name alias/pg-tde-master-1 --target-key-id "..."
26-
```
27-
28-
Use the `aws kms` command with the `alias/pg-tde-master-1` key to wrap and unwrap the data encryption key:
29-
30-
```shell
31-
PGDATAKEYWRAPCMD='aws kms encrypt --key-id alias/pg-tde-master-1 --plaintext fileb:///dev/stdin --output text --query CiphertextBlob | base64 -d > "%p"'
32-
PGDATAKEYUNWRAPCMD='aws kms decrypt --key-id alias/pg-tde-master-1 --ciphertext-blob fileb://"%p" --output text --query Plaintext | base64 -d'
33-
```
34-
!!! Note
35-
Shell commands with pipes, as in this example, are problematic because the exit status of the pipe is that of the last command. A failure of the first, more interesting command isn't reported properly. Postgres handles this somewhat by recognizing whether the wrap or unwrap command wrote nothing. However, it's better to make this command more robust. For example, use the `pipefail` option available in some shells or the `mispipe` command available on some operating systems. Put more complicated commands into an external shell script or other program instead of defining them inline.
36-
37-
## Azure Key Vault example
38-
39-
Create a key with [Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/):
40-
41-
```shell
42-
az keyvault key create --vault-name pg-tde --name pg-tde-master-1
43-
```
44-
45-
Use the `az keyvault key` command with the `pg-tde-master-1` key to wrap and unwrap the data encryption key:
46-
47-
```shell
48-
PGDATAKEYWRAPCMD='az keyvault key encrypt --name pg-tde-master-1 --vault-name pg-tde --algorithm A256GCM --value @- --data-type plaintext --only-show-errors --output json | jq -r .result > "%p"'
49-
PGDATAKEYUNWRAPCMD='az keyvault key decrypt --name pg-tde-master-1 --vault-name pg-tde --algorithm A256GCM --value @"%p" --data-type plaintext --only-show-errors --output json | jq -r .result'
50-
```
51-
!!! Note
52-
Shell commands with pipes, as in this example, are problematic because the exit status of the pipe is that of the last command. A failure of the first, more interesting command isn't reported properly. Postgres handles this somewhat by recognizing whether the wrap or unwrap command wrote nothing. However, it's better to make this command more robust. For example, use the `pipefail` option available in some shells or the `mispipe` command available on some operating systems. Put more complicated commands into an external shell script or other program instead of defining them inline.
53-
54-
## Google Cloud KMS example
55-
56-
Create a key with [Google Cloud KMS](https://cloud.google.com/kms/docs):
57-
58-
```shell
59-
gcloud kms keys create pg-tde-master-1 --location=global --keyring=pg-tde --purpose=encryption
60-
```
61-
62-
Use the `gcloud kms` command with the `pg-tde-master-1` key to wrap and unwrap the data encryption key:
63-
64-
```shell
65-
PGDATAKEYWRAPCMD='gcloud kms encrypt --plaintext-file=- --ciphertext-file=%p --location=global --keyring=pg-tde --key=pg-tde-master-1'
66-
PGDATAKEYUNWRAPCMD='gcloud kms decrypt --plaintext-file=- --ciphertext-file=%p --location=global --keyring=pg-tde --key=pg-tde-master-1'
67-
```
68-
69-
## HashiCorp Vault Transit Secrets Engine example
70-
71-
Enable transit with [HashiCorp Vault Transit Secrets Engine](https://developer.hashicorp.com/vault/docs):
72-
73-
```shell
74-
vault secrets enable transit
75-
```
76-
77-
Create a key and give it a name:
78-
79-
```shell
80-
vault write -f transit/keys/pg-tde-master-1
81-
```
82-
83-
Use the `vault write` command with the `pg-tde-master-1` key to wrap and unwrap the data encryption key:
84-
85-
```
86-
PGDATAKEYWRAPCMD='base64 | vault write -field=ciphertext transit/encrypt/pg-tde-master-1 plaintext=- > "%p"'
87-
PGDATAKEYUNWRAPCMD='vault write -field=plaintext transit/decrypt/pg-tde-master-1 ciphertext=- < "%p" | base64 -d'
88-
```
89-
90-
## Thales CipherTrust Manager example
91-
92-
You can configure TDE to use an external key from Thales CipherTrust Manager to wrap the data encryption key with a key from the Thales key store. You can either use `pykmip`, or the Thales REST API to perform the cryptographic operations of the integration.
93-
94-
- To use the Python library `pykmip` for cryptographic operations with Thales CipherTrust Manager, see [Using pykmip](/partner_docs/ThalesCipherTrustManager/05-UsingThalesCipherTrustManager/) in the [Implementing Thales CipherTrust Manager](/partner_docs/ThalesCipherTrustManager/) documentation for instructions. `pykmip` is a Python library that implements the KMIP industry standard for key management operations.
95-
96-
- To use Thales REST API for cryptographic operations with Thales CipherTrust Manager, see [Using Thales REST API](/tde/latest/secure_key/key_store/thales_restapi). The REST API allows operations to directly connect to Thales CipherTrust, bypassing other intermediate protocols.
97-
98-
## Fortanix Data Security Manager example
99-
100-
See [Using Fortanix Data Security Manager with EDB Postgres for TDE](https://support.fortanix.com/docs/using-fortanix-data-security-manager-with-edb-postgres-for-tde) for a step-by-step configuration tutorial.
101-
102-
## Entrust KeyControl integration guide
103-
104-
See the [EDB Postgres and Entrust KeyControl](https://www.entrust.com/sites/default/files/2024-03/edb-postgres-and-entrust-keycontrol-ig.pdf) integration guide for installation, configuration and usage instructions (including key rotation).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Using Thales KMS
3+
description: Learn how to secure your encryption key with a Thales CipherTrust Manager key.
4+
deepToC: true
5+
---
6+
7+
You can configure TDE to use an external key from Thales CipherTrust Manager to wrap the data encryption key with a key from the Thales key store. You can either use `pykmip`, or the Thales REST API to perform the cryptographic operations of the integration.
8+
9+
- To use the Python library `pykmip` for cryptographic operations with Thales CipherTrust Manager, see [Using pykmip](/partner_docs/ThalesCipherTrustManager/05-UsingThalesCipherTrustManager/) in the [Implementing Thales CipherTrust Manager](/partner_docs/ThalesCipherTrustManager/) documentation for instructions. `pykmip` is a Python library that implements the KMIP industry standard for key management operations.
10+
11+
- To use Thales REST API for cryptographic operations with Thales CipherTrust Manager, [install the EDB TDE Thales REST API client](installing_thales_client) and then [configure it for usage with TDE](/tde/latest/secure_key/key_store/thales/thales_restapi). The REST API allows operations to directly connect to Thales CipherTrust, bypassing other intermediate protocols.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
navTitle: Installing
3+
title: Installing EDB TDE Thales REST API client on Linux
4+
indexCards: none
5+
6+
navigation:
7+
- linux_x86_64
8+
---
9+
10+
Select a link to access the applicable installation instructions:
11+
12+
## Linux [x86-64 (amd64)](linux_x86_64)
13+
14+
### Red Hat Enterprise Linux (RHEL) and derivatives
15+
16+
- [RHEL 8](linux_x86_64/edb-tde-rest-client_rhel_8)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
navTitle: RHEL 8 or OL 8
3+
title: Installing EDB TDE Thales REST API on RHEL 8 or OL 8 x86_64
4+
---
5+
6+
## Prerequisites
7+
8+
Before you begin the installation process:
9+
10+
- Set up the EDB repository.
11+
12+
Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step.
13+
14+
To determine if your repository exists, enter this command:
15+
16+
`dnf repolist | grep enterprisedb`
17+
18+
If no output is generated, the repository isn't installed.
19+
20+
To set up the EDB repository:
21+
22+
1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads).
23+
24+
1. Select the button that provides access to the EDB repository.
25+
26+
1. Select the platform and software that you want to download.
27+
28+
1. Follow the instructions for setting up the EDB repository.
29+
30+
## Install the package
31+
32+
Install the EDB TDE REST API client (packaged as `edb-tde-rest-client`):
33+
34+
```shell
35+
sudo dnf install edb-tde-rest-client
36+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: "Installing EDB TDE Thales REST API client on Linux x86 (amd64)"
3+
navTitle: "On Linux x86"
4+
indexCards: none
5+
6+
navigation:
7+
- edb-tde-rest-client_rhel_8
8+
---
9+
10+
Operating system-specific install instructions are described in the corresponding documentation:
11+
12+
### Red Hat Enterprise Linux (RHEL) and derivatives
13+
14+
15+
- [RHEL 8](edb-tde-rest-client_rhel_8)
16+
17+
- [Oracle Linux (OL) 8](edb-tde-rest-client_rhel_8)

0 commit comments

Comments
 (0)