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
Update query docs to use the new "for query" field
This change updates the EQL query docs to use the new field `"q"` (for query).
This field tells proxy to perform encryption for a specific query operation (instead
of performing source encryption and encryption for all indexes).
This change also updates the JSON schema:
- add new "for query" field
- add missing STE vec index field
- remove ".1" suffix from m, u, and o fields
| `table_name` | Name of target table | Required |
382
+
| `column_name` | Name of target column | Required |
383
+
| `index_name` | The index kind | Required. |
384
+
| `cast_as` | The PostgreSQL type decrypted data will be cast to | Optional. Defaults to `text` |
385
+
| `opts` | Index options | Optional for `match` indexes, required for `ste_vec` indexes (see below) |
356
386
357
387
#### cast_as
358
388
359
389
Supported types:
360
-
- `text`
361
-
- `int`
362
-
- `small_int`
363
-
- `big_int`
364
-
- `boolean`
365
-
- `date`
366
-
- `jsonb`
390
+
391
+
- `text`
392
+
- `int`
393
+
- `small_int`
394
+
- `big_int`
395
+
- `boolean`
396
+
- `date`
397
+
- `jsonb`
367
398
368
399
#### match opts
369
400
@@ -428,13 +459,13 @@ An ste_vec index requires one piece of configuration: the `context` (a string) w
428
459
This ensures that all of the encrypted values are unique to that context.
429
460
It is generally recommended to use the table and column name as a the context (e.g. `users/name`).
430
461
431
-
Within a dataset, encrypted columns indexed using an `ste_vec` that use different contexts cannot be compared.
432
-
Containment queries that manage to mix index terms from multiple columns will never return a positive result.
462
+
Within a dataset, encrypted columns indexed using an `ste_vec` that use different contexts cannot be compared.
463
+
Containment queries that manage to mix index terms from multiple columns will never return a positive result.
433
464
This is by design.
434
465
435
466
The index is generated from a JSONB document by first flattening the structure of the document such that a hash can be generated for each unique path prefix to a node.
436
467
437
-
The complete set of JSON types is supported by the indexer.
468
+
The complete set of JSON types is supported by the indexer.
The expression `cs_ste_vec_v1(encrypted_account) @> cs_ste_vec_v1($query)` would match all records where the `encrypted_account` column contains a JSONB object with an "account" key containing an object with an "email" key where the value is the string "[email protected]".
@@ -510,11 +554,12 @@ When reduced to a prefix list, it would look like this:
| s | Schema version | JSON Schema version of this json document. |
624
+
| v | Version | The configuration version that generated this stored value. |
625
+
| k | Kind | The kind of the data (plaintext/pt, ciphertext/ct, encrypting/et). |
626
+
| i.t | Table identifier | Name of the table containing encrypted column. |
627
+
| i.c | Column identifier | Name of the encrypted column. |
628
+
| p | Plaintext | Plaintext value sent by database client. Required if kind is plaintext/pt or encrypting/et. |
629
+
| q | For query | Specifies that the plaintext should be encrypted for a specific query operation. If `null`, source encryption and encryption for all indexes will be performed. Valid values are `"match"`, `"ore"`, `"unique"`, `"ste_vec"`, `"ejson_path"`, and `"websearch_to_match"`. |
630
+
| c | Ciphertext | Ciphertext value. Encrypted by proxy. Required if kind is plaintext/pt or encrypting/et. |
631
+
| m | Match index | Ciphertext index value. Encrypted by proxy. |
632
+
| o | ORE index | Ciphertext index value. Encrypted by proxy. |
633
+
| u | Unique index | Ciphertext index value. Encrypted by proxy. |
634
+
| sv | STE vector index | Ciphertext index value. Encrypted by proxy. |
0 commit comments