Skip to content

Commit be89b3a

Browse files
committed
docs: revamp docs
1 parent 1bb6ecd commit be89b3a

File tree

14 files changed

+419
-1130
lines changed

14 files changed

+419
-1130
lines changed

README.md

Lines changed: 23 additions & 336 deletions
Large diffs are not rendered by default.

dbdev/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# dbdev
2+
3+
We publish a Trusted Language Extension for PostgreSQL for use on [dbdev](https://database.dev/).
4+
You can find the extension on [dbdev's extension catalog](https://database.dev/cipherstash/eql).
5+
6+
## Publishing
7+
8+
**DISCLAIMER:** At the moment, we are manually publishing the extension to dbdev and the versions might not be in sync with the releases on GitHub until we automate this process.
9+
10+
### Steps to publish
11+
12+
> [!NOTE]
13+
> Make sure you have the [dbdev CLI](https://supabase.github.io/dbdev/cli/) installed and logged in using the `dbdev shared token` in 1Password.
14+
15+
1. Run `mise run build` to build the extension which will create the following file in the `dbdev` directory. (Note: this release artifact is built from the Supabase release artifact).
16+
2. After the build is complete, you will have a file in the `dbdev` directory called `eql--0.0.0.sql`.
17+
3. Update the file name from `eql--0.0.0.sql` replacing `0.0.0` with the version number of the release.
18+
4. Also update the `eql.control` file with the new version number.
19+
5. Run `dbdev publish` to publish the extension to dbdev.
20+
21+
Reach out to @calvinbrewer if you need help.

dbdev/eql.control

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
default_version = 2.0.2
2+
comment = 'Index and search encrypted data in PostgreSQL with SQL'
3+
relocatable = true

docs/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ This directory contains the documentation for the Encrypt Query Language (EQL).
66

77
- [Postgres data security with CipherStash](concepts/WHY.md)
88

9-
## How-to guides
9+
## Reference
1010

11-
- [Getting started](tutorials/GETTINGSTARTED.md)
12-
- [Using CipherStash Proxy](tutorials/PROXY.md)
11+
- [EQL index configuration for CipherStash Proxy](reference/index-configuration.md)
12+
- [EQL with JSON and JSONB](reference/json-support.md)
13+
- [EQL payload data format](reference/eql-payload.md)
1314

14-
## Reference
15+
## Tutorials
1516

16-
- [EQL index configuration](reference/INDEX.md)
17-
- [EQL with JSON and JSONB](reference/JSON.md)
18-
- [CipherStash Migrator](reference/MIGRATOR.md)
19-
- [EQL payload data format](reference/PAYLOAD.md)
17+
- [CipherStash Proxy Configuration with EQL functions](tutorials/proxy-configuration.md)

docs/concepts/WHY.md

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ This page gives a high-level overview of CipherStash's encryption in use solutio
99
- [Why use encryption in use?](#why-use-encryption-in-use)
1010
2. [CipherStash Proxy](#cipherstash-proxy)
1111
- [How it works](#how-it-works)
12-
3. [Encrypt Query Language (EQL)](#encrypt-query-language-eql)
13-
4. [Best practices](#best-practices)
14-
5. [Advanced topics](#advanced-topics)
15-
- [Integrating without proxy](#integrating-without-proxy)
16-
6. [Conclusion](#conclusion)
12+
3. [Protect.js](#protectjs)
13+
- [How it works](#how-it-works-1)
14+
4. [Encrypt Query Language (EQL)](#encrypt-query-language-eql)
15+
5. [Best practices](#best-practices)
16+
6. [Getting started](#getting-started)
1717

1818
## Encryption in use
1919

@@ -52,41 +52,37 @@ This enables encryption in use without significant changes to your application c
5252
- **Encrypts data**: For write operations, it encrypts the plaintext data before sending it to the database.
5353
- **Decrypts data**: For read operations, it decrypts the encrypted data retrieved from the database before returning it to the client.
5454
- **Maintains searchability**: Ensures that the encrypted data is searchable and retrievable without sacrificing performance or application functionality.
55-
- **Manages encryption keys**: Securely handles encryption keys required for encrypting and decrypting data.
55+
56+
## Protect.js
57+
58+
Protect.js is an NPM package that provides a set of functions to encrypt and decrypt data.
59+
It is a client-side library that can be used to encrypt and decrypt data in your JS/TS application.
60+
61+
### How it works
62+
63+
- **Encrypts data**: Protect.js encrypts the plaintext data before sending it to the database.
64+
- **Decrypts data**: Protect.js decrypts the encrypted data retrieved from the database before returning it to the client.
65+
- **Maintains searchability**: Ensures that the encrypted data is searchable and retrievable without sacrificing performance or application functionality.
5666

5767
## Encrypt Query Language (EQL)
5868

5969
Encrypt Query Language (EQL) is a set of PostgreSQL functions and data types provided by CipherStash to work with encrypted data and indexes.
6070
EQL allows you to perform queries on encrypted data without decrypting it, supporting operations like equality checks, range queries, and unique constraints.
6171

62-
To get started, read the [Getting started](https://github.com/cipherstash/encrypt-query-language/blob/main/GETTINGSTARTED.md) guide.
63-
6472
## Best practices
6573

66-
- **Use CipherStash Proxy** to handle encryption/decryption transparently.
6774
- **Use EQL functions** when interacting with encrypted data.
6875
- **Define database constraints**to maintain data integrity.
6976
- **Secure key management** of encryption keys.
7077
- **Monitor query performance** and optimize as needed.
7178

72-
## Advanced topics
73-
74-
### Integrating without CipherStash Proxy
75-
76-
> The SDK approach is currently in development, but if you're interested in contributing, please start a discussion [here](https://github.com/cipherstash/encrypt-query-language/discussions).
77-
78-
For advanced users who prefer to handle encryption within their application:
79-
80-
- **SDKs available**: Use CipherStash SDKs (at the moment, Rust and TypeScript) to manage encryption/decryption.
81-
- **Manual encryption**: Implement encryption logic in your application code.
82-
- **Data conformity**: Ensure encrypted data matches the expected `jsonb` schema.
83-
- **Key management**: Handle encryption keys securely within your application.
84-
85-
**Note**: This approach increases complexity and is recommended only if CipherStash Proxy does not meet specific requirements.
86-
8779
## Getting started
8880

89-
To get started using CipherStash's encryption is use solution, see the [Getting Started](https://github.com/cipherstash/encrypt-query-language/blob/main/GETTINGSTARTED.md) guide.
81+
Use one of the CipherStash integrations using EQL to get started.
82+
83+
- [Protect.js](https://github.com/cipherstash/protectjs)
84+
- [CipherStash Proxy](https://github.com/cipherstash/proxy)
85+
- [Protect.php](https://github.com/cipherstash/protectphp)
9086

9187
For further help, raise an issue [here](https://github.com/cipherstash/encrypt-query-language/issues).
9288

docs/reference/MIGRATOR.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

docs/reference/PAYLOAD.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ CipherStash Proxy will handle the plaintext payload and create the encrypted pay
3737

3838
## Data format
3939

40-
The format is defined as a [JSON Schema](../../sql/schemas/cs_encrypted_v2.schema.json).
41-
4240
It should never be necessary to directly interact with the stored `jsonb`.
4341
CipherStash Proxy handles the encoding, and EQL provides the functions.
4442

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# EQL index configuration
1+
# EQL index configuration for CipherStash Proxy
2+
3+
> [!NOTE]
4+
> This guide is for CipherStash Proxy.
5+
> If you are using Protect.js, see the [Protect.js schema](https://github.com/cipherstash/protectjs/blob/main/docs/reference/schema.md).
26
37
The following functions allow you to configure indexes for encrypted columns.
48
All these functions modify the `eql_v2_configuration` table in your database, and are added during the EQL installation.
File renamed without changes.

0 commit comments

Comments
 (0)