Skip to content

Commit 5383c19

Browse files
committed
feat: add activation process to getting started guide
1 parent 4c471ee commit 5383c19

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

GETTINGSTARTED.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,41 @@ CREATE TABLE IF NOT EXISTS "users" (
4040

4141
Some language specific ORMs don't support custom types, so EQL also supports `jsonb` rather than the `cs_encrypted_v1` domain type.
4242

43+
### Configuring the column
44+
45+
In order for CipherStash Proxy to encrypt and decrypt the data, you can initialize the column in the database using the `cs_add_column_v1` function.
46+
47+
```sql
48+
SELECT cs_add_column_v1('users', 'email_encrypted');
49+
```
50+
51+
This function will **not** enable searchable encryption, but will allow you to encrypt and decrypt data.
52+
53+
### Activate configuration
54+
55+
By default, the state of the configuration is `pending` after any modifications.
56+
You can activate the configuration by running the `cs_encrypt_v1` and `cs_activate_v1` function.
57+
58+
```sql
59+
SELECT cs_encrypt_v1();
60+
SELECT cs_activate_v1();
61+
```
62+
63+
> **Important:** These functions must be run after any modifications to the configuration.
64+
65+
#### Refresh CipherStash Proxy configuration
66+
67+
CipherStash Proxy pings the database every 60 seconds to refresh the configuration.
68+
You can force CipherStash Proxy to refresh the configuration by running the `cs_refresh_encrypt_config` function.
69+
70+
```sql
71+
SELECT cs_refresh_encrypt_config();
72+
```
73+
74+
### Activate configuration
75+
76+
By default, the state of the configuration is `pending` after any modifications.
77+
4378
### Inserting data
4479

4580
When inserting data into the encrypted column, you must wrap the plaintext in the appropriate EQL payload.

0 commit comments

Comments
 (0)