-
Notifications
You must be signed in to change notification settings - Fork 1
feat: ✨ add JSON and INT data types and update FFI to v0.18.0 #190
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
base: main
Are you sure you want to change the base?
Conversation
- Add searchableJson() method to schema for JSON field indexing - Update @cipherstash/protect-ffi from 0.16.0 to 0.17.0 - Refactor type system: EncryptedPayload → Encrypted, add JsPlaintext - Add comprehensive test suites for JSON, integer, and basic encryption - Update encryption format to use 'k' property for searchable JSON - Remove deprecated search terms tests for JSON fields - Simplify schema data types to text, int, jsonb only - Update model helpers to handle new encryption format - Fix type safety issues in bulk operations and model encryption
… EncryptedPayload - Replace EncryptedPayload imports with Encrypted type across all DynamoDB operations - Update EQL payload structure in toItemWithEqlPayloads helper function - Simplify payload structure by removing unused fields (bf, hm, ob) - Update type annotations in decrypt operations and bulk operations - Add TODO comment for future ste_vec EQL type support
- Remove empty test suite that was causing 'No test found' error - Remove unused test variable - Add comment placeholder for future tests - Keep boilerplate setup for when tests are needed
- Add searchable JSON column support with ste_vec indexes - Update toItemWithEqlPayloads to construct proper EQL payloads for JSON types - Handle both standard ciphertext (ct) and searchable vector (sv) payloads - Pass ProtectTable schema to helpers for column metadata access - Add comprehensive test coverage for JSON and nested JSON encryption - Support nested protectNestedJson values in test data
- Add comment noting need to implement new Encrypt payload type - Reminder to update when FFI interface is updated for sv payloads
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid work! Great tests. I'd like to get clarity on some of the comments before approving.
metadata: { | ||
count: csValue('metadata.count').dataType('int'), | ||
level: csValue('metadata.level').dataType('int'), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan to store this as a JSON instead of nested scalars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's up to the customer - one of our customers (which I will not name here) helped define this interface from a direct use case.
value: '42', | ||
column: users.age, | ||
table: users, | ||
returnType: 'composite-literal' as const, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the composite literal for here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to above: searches
value: '99', | ||
column: users.score, | ||
table: users, | ||
returnType: 'escaped-composite-literal' as const, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the escaped composite literal type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to above: searches
createdAt?: Date | ||
updatedAt?: Date | ||
address?: string | null | ||
json?: Record<string, unknown> | null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the | null
is redundant because you have made the field itself optional.
feat(protect): init ffi 18 pre release
Revert "feat(protect): init ffi 18 pre release"
Uh oh!
There was an error while loading. Please reload this page.