Skip to content

Conversation

@tobyhede
Copy link
Contributor

Goal: Add encryption verification tests to ensure data is actually encrypted, preventing silent mapping failures from going undetected.

Architecture: Create a reusable assert_encrypted helper in common.rs that queries the database directly (bypassing proxy) and asserts stored value differs from plaintext. Add one sanity check test per data type.

@tobyhede tobyhede force-pushed the encryption-sanity-checks branch from a6f7c84 to 6a27d0c Compare December 15, 2025 04:08
Copy link
Contributor

@auxesis auxesis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The encryption tests are good, but I don't think we should be introducing complexity into which builds run in what context.

Let's strip this PR down to just the encryption tests, and we can address the build changes in a separate PR.

@tobyhede tobyhede force-pushed the encryption-sanity-checks branch from c629f8f to 6a27d0c Compare December 16, 2025 01:10
@tobyhede tobyhede force-pushed the encryption-sanity-checks branch from 6a27d0c to 47592d1 Compare December 16, 2025 01:17
Add support for unquoted PostgreSQL identifiers when setting keyset name
via SET CIPHERSTASH.KEYSET_NAME. Previously only quoted strings and
numbers were accepted; now valid PG identifiers work without quotes.

Update tests to validate the new behavior and adjust invalid test cases.
@tobyhede tobyhede requested a review from auxesis December 16, 2025 05:34
Copy link
Contributor

@auxesis auxesis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @tobyhede.

Great to have this extra layer of tests to verify the encryption works as expected.

@tobyhede tobyhede merged commit f843f1f into main Dec 16, 2025
5 checks passed
@tobyhede tobyhede deleted the encryption-sanity-checks branch December 16, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants