Skip to content

feat: encrypted JSON should use the new EQL schema #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1ec9705
chore: generate.rs module for creating EQL test data
tobyhede Apr 24, 2025
a9b6a5c
chore: formatting
freshtonic Apr 30, 2025
0156d2d
feat: encrypted JSON should use the new EQL schema
freshtonic Apr 30, 2025
b243a2b
chore(mapper): get test infra in place for JSONB functions
freshtonic May 1, 2025
c1dd044
fix(mapper): hash function for SqlIdent must take quote style into ac…
freshtonic May 4, 2025
b455c97
docs: rustdoc FunctionSig etc
freshtonic May 5, 2025
198867c
chore: fmt & clippy
freshtonic May 5, 2025
a4a3dfd
chore: fixup cipherstash-client usages
freshtonic May 5, 2025
1bd04d7
chore(mapper): replaced literals are now `ROW(..)` expressions
freshtonic May 6, 2025
34c25de
chore(eql): Update test schema to use EQL 2.0
tobyhede May 5, 2025
0b0d1ea
chore(eql): Update to use EQL 2.0 configuration table
tobyhede May 5, 2025
5466633
fix: Uninstall should use CS_EQL_UNINSTALL_PATH if defined
tobyhede May 6, 2025
135cf09
chore: make postgres:setup depend on postgres:teardown
tobyhede May 6, 2025
82fc5eb
fix: Use updated eql_v1_encrypted column type
tobyhede May 6, 2025
dc094c4
chore: update schema load to check for new type
tobyhede May 6, 2025
862b7b3
refactor(mise): unify EQL download tasks to One True Way™️
freshtonic May 6, 2025
a799f73
fix(proxy): SQL for getting EQL version
freshtonic May 6, 2025
c0a0015
fix: fat finger fallout
freshtonic May 6, 2025
137efd2
fix(mapper): update JSONB test assertions for `ROW(..)`
freshtonic May 6, 2025
0afeeb8
feat(mapper): rewrite std SQL functions for EQL cols
freshtonic May 8, 2025
d963ad1
chore: remove unused attrs
freshtonic May 8, 2025
1cbd8c5
chore: formatting
freshtonic May 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
/cipherstash-proxy.local.toml
mise.local.toml
tests/pg/data**
tests/sql/cipherstash-encrypt.sql
tests/sql/cipherstash-encrypt-uninstall.sql
.vscode

rust-toolchain.toml
.cargo/config.toml

# release artifacts
/cipherstash-proxy
/cipherstash-eql.sql
/packages/cipherstash-proxy/eql-version-at-build-time.txt
/cipherstash-encrypt.sql
/cipherstash-encrypt-uninstall.sql

# credentials for local dev
.env.proxy.docker
Expand Down
188 changes: 186 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ For example:

## Unknown Column <a id='encrypt-unknown-column'></a>

The column has an encrypted type (PostgreSQL `cs_encrypted_v1` type ) with no encryption configuration.
The column has an encrypted type (PostgreSQL `eql_v1_encrypted` type ) with no encryption configuration.

Without the configuration, Cipherstash Proxy does not know how to encrypt the column.
Any data is unprotected and unencrypted.
Expand All @@ -341,7 +341,7 @@ Column 'column_name' in table 'table_name' has no Encrypt configuration

## Unknown Table <a id='encrypt-unknown-table'></a>

The table has one or more encrypted columns (PostgreSQL `cs_encrypted_v1` type ) with no encryption configuration.
The table has one or more encrypted columns (PostgreSQL `eql_v1_encrypted` type ) with no encryption configuration.

Without the configuration, Cipherstash Proxy does not know how to encrypt the column.
Any data is unprotected and unencrypted.
Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started/schema-example.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
TRUNCATE TABLE cs_configuration_v1;
TRUNCATE TABLE public.eql_v1_configuration;

-- Exciting cipherstash table
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
encrypted_email cs_encrypted_v1,
encrypted_dob cs_encrypted_v1,
encrypted_salary cs_encrypted_v1
encrypted_email eql_v1_encrypted,
encrypted_dob eql_v1_encrypted,
encrypted_salary eql_v1_encrypted
);

SELECT cs_add_index_v1(
Expand Down
Loading
Loading