Skip to content
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

[IMP] Gene_EncryptionKeyManager: Add support for JSON fields (#27 plus test) #32

Merged
merged 4 commits into from
Jul 24, 2024

Conversation

convenient
Copy link
Contributor

@convenient convenient commented Jul 24, 2024

This PR is #27 with a test case added

Test case data

Generating a fake json column
id      text_column
1       {"user": "foobar", "password": "0:3:s5zntv9Zdeq0Iyn6mVv2IOWU9GutCIvbz/LpHPTWc/p2g25BpVDwaThRd344xg==", "request_url": ""}

Test case output

Running reencrypt-column on JSON column
The latest encryption key is number 1, looking for old entries
Looking for JSON field 'password.text_column' in 'fake_json_table', identified by 'id'
########################################################################################################################
id: 1
ciphertext_old: 0:3:s5zntv9Zdeq0Iyn6mVv2IOWU9GutCIvbz/LpHPTWc/p2g25BpVDwaThRd344xg==
plaintext: jsonpasswordabc123
ciphertext_new: 1:3:nMrDMSft3v9+o21NQcwbGgWryaPjkrwN4HRurQvy15I88tR90Wzhev3TxOQyGw==
########################################################################################################################
Done
PASS


Running reencrypt-column on JSON column - again to verify it was all processed
The latest encryption key is number 1, looking for old entries
Looking for JSON field 'password.text_column' in 'fake_json_table', identified by 'id'
No old entries found
PASS

@convenient convenient force-pushed the feature/add-json-field-support branch from aa0b87c to 31c3eb4 Compare July 24, 2024 04:39
@convenient convenient merged commit e09b664 into master Jul 24, 2024
1 check passed
@convenient convenient deleted the feature/add-json-field-support branch July 24, 2024 13:16
@jorgehs91
Copy link
Contributor

Hi @convenient, any idea when the release with these changes will be available on packagist? I mean, v0.0.10-alpha.

@convenient
Copy link
Contributor Author

@jorgehs91 I fixed the packagist webhook sync this morning so its there now, and will continue to be up to date going forward. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants