The CipherStash Proxy is a lightweight proxy that can be used to encrypt and decrypt data in your database.
- Getting Started
- Create a dataset and client
- Configuring CipherStash Proxy
- Running the Proxy
- Using the Proxy
- How EQL works with CipherStash Proxy
To get started, you'll need to sign up for a free account at https://dashboard.cipherstash.com.
Once you've signed up, you can create an access key from your default workspace.
Before you can start using the proxy, you'll need to create a dataset and client.
You can do this using the CipherStash CLI
You can then create a cipherstash-proxy.toml
file in the root of this directory. You can use the cipherstash-proxy.toml.example
file as a starting point.
Populate the following fields with your values:
workspace_id
: The ID of your workspace.client_access_key
: The access key for your client.client_id
: The ID of your client.`client_key
: The key of your client.database.name
: The name of your database.database.username
: The username for your database.database.password
: The password for your database.database.host
: The host for your database.database.port
: The port for your database.
To run the proxy, you can use docker compose
to start the proxy using the configuration in the cipherstash-proxy.toml
file.
Run the following command from the cipherstash-proxy
directory:
docker compose up
Once the proxy is running, you can use the different language examples to test the proxy and EQL.
EQL uses CipherStash Proxy to mediate access to your PostgreSQL database and provide low-latency encryption & decryption.
At a high level:
- encrypted data is stored as
jsonb
- references to the column in sql statements are wrapped in a helper function
- Cipherstash Proxy transparently encrypts and indexes data
- Database client sends
plaintext
data encoded asjsonb
- CipherStash Proxy encrypts the
plaintext
and encodes theciphertext
value and associated indexes into thejsonb
payload - The data is written to the encrypted column
- Wrap references to the encrypted column in the appropriate EQL function
- CipherStash Proxy encrypts the
plaintext
- PostgreSQL executes the SQL statement
- CipherStash Proxy decrypts any returned
ciphertext
data and returns to client