You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docker.md
+18-67Lines changed: 18 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,9 +98,10 @@ Where:
98
98
99
99
## Enable encryption
100
100
101
-
Percona Distribution for PostgreSQL Docker image includes the `pg_tde` extension to provide data encryption. You must explicitly enable it when you start the container. For more information, see the [pg_tde documentation](https://docs.percona.com/pg-tde/index.html).
101
+
Percona Distribution for PostgreSQL Docker image includes the `pg_tde` extension to provide data encryption. You must explicitly enable it when you start the container. For more information, see the [pg_tde documentation :octicons-link-external-16:](https://docs.percona.com/pg-tde/index.html).
102
102
103
103
Follow these steps to enable `pg_tde`:
104
+
{.power-number}
104
105
105
106
1. Start the container with the `ENABLE_PG_TDE=1` environment variable:
106
107
@@ -123,7 +124,7 @@ Follow these steps to enable `pg_tde`:
123
124
??? example "Sample output"
124
125
125
126
```{.text .no-copy}
126
-
psql ({{dockertag}} - Percona Server for PostgreSQL {{dockertag}}.1)
127
+
psql ({{pgsubversion}} - Percona Server for PostgreSQL {{dockertag}})
127
128
Type "help" for help.
128
129
129
130
postgres=#
@@ -135,7 +136,7 @@ Follow these steps to enable `pg_tde`:
135
136
CREATE EXTENSION pg_tde;
136
137
```
137
138
138
-
4. Configure a key provider with a keyring file. This setup is intended for development and stores the keys unencrypted in the specified data file. The below sample configuration is intended for testing and development purposes.
139
+
4. Add the key provider by using a keyring file. This setup is intended for development and stores the keys unencrypted in the specified data file. The below sample configuration is intended for testing and development purposes only.
139
140
140
141
!!! note
141
142
For production use, we **strongly recommend** setting up an external key management store and configure an external key provider. Refer to the [Setup :octicons-link-external-16:](https://docs.percona.com/pg-tde/setup.html#key-provider-configuration) topic in the `pg_tde` documentation.
@@ -146,85 +147,35 @@ Follow these steps to enable `pg_tde`:
The key is auto-generated. You are ready to use data encryption.
156
-
157
162
6. Create a table with encryption enabled. Pass the `USING tde_heap` clause to the `CREATE TABLE` command:
158
163
159
164
```sql
160
165
CREATE TABLE <table_name> (<field> <datatype>) USING tde_heap;
161
166
```
162
167
163
-
## Enable encryption
164
-
165
-
Percona Distribution for PostgreSQL Docker image includes the `pg_tde` extension to provide data encryption. You must explicitly enable it when you start the container.
166
-
167
-
Here's how to do this:
168
-
{.power-number}
169
-
170
-
1. Start the container with the `ENABLE_PG_TDE=1` environment variable:
*`container-name` is the name you assign to your container
179
-
*`ENABLE_PG_TDE=1` adds the `pg_tde` to the `shared_preload_libraries` and enables the custom storage manager
180
-
*`POSTGRES_PASSWORD` is the superuser password
181
-
182
-
183
-
2. Connect to the container and start the interactive `psql` session:
184
-
185
-
```{.bash data-prompt="$"}
186
-
$ docker exec -it container-name psql
187
-
```
188
-
189
-
??? example "Sample output"
190
-
191
-
```{.text .no-copy}
192
-
psql ({{dockertag}} - Percona Server for PostgreSQL {{dockertag}}.1)
193
-
Type "help"for help.
168
+
??? example "CREATE TABLE example"
194
169
195
-
postgres=#
170
+
```{.sql .no-copy}
171
+
CREATE TABLE test_users (
172
+
user_id INT,
173
+
username VARCHAR(50),
174
+
email VARCHAR(100),
175
+
signup_date DATE
176
+
) USING tde_heap;
196
177
```
197
178
198
-
3. Create the extension in the database where you want to encrypt data. This requires superuser privileges.
199
-
200
-
```sql
201
-
CREATE EXTENSION pg_tde;
202
-
```
203
-
204
-
4. Configure a key provider. In this sample configuration intended for testing and development purpose, we use a local keyring provider.
205
-
206
-
For production use, set up an external key management store and configure an external key provider. Refer to the [Setup :octicons-link-external-16:](https://percona.github.io/pg_tde/main/setup.html#key-provider-configuration) chapter in the `pg_tde` documentation.
207
-
208
-
<i warning>:material-information: Warning:</i> This example is for testing purposes only:
0 commit comments