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

Apply type awareness actions on failure of hash validation #612

Merged
merged 2 commits into from
Dec 20, 2022

Conversation

Lagovas
Copy link
Collaborator

@Lagovas Lagovas commented Dec 20, 2022

I found that when acra-server validates searchable hash after decryption and it failed then it skips applying response_on_fail option and just returns as is. It's because our searchable encryptor decrypts data as first, marks the current context as successful decryption, and then validates hash which will fail. Due to the context was marked as successful, acra-server do nothing on encoding stage because it expects valid raw value instead of returning error or default value.
In this PR were added marking context as NotDecrypted in case of failed hash validation and tests for that.
Additionally found, that our encryptor_config validations denied searchable fields with type awareness (probably because searchable encryption was added after the first introduction of type awareness) and added missed masks.

Checklist

@Lagovas Lagovas requested a review from Zhaars December 20, 2022 00:11
@Lagovas Lagovas merged commit f8ea8e5 into master Dec 20, 2022
@Lagovas Lagovas deleted the lagovas/fix-type-awareness-for-hashes branch December 20, 2022 12:07
@Lagovas Lagovas mentioned this pull request Dec 20, 2022
7 tasks
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.

None yet

2 participants