feat: track validation status of decrypted submissions - #3223
Open
kelvin-muchiri wants to merge 2 commits into
Open
feat: track validation status of decrypted submissions#3223kelvin-muchiri wants to merge 2 commits into
kelvin-muchiri wants to merge 2 commits into
Conversation
Bump valigetta to v0.3.0, which returns a submission's validation status alongside the decrypted files instead of rejecting a submission whose content does not match its signature. Record that outcome on the Instance. A submission that does not match its signature, or that carries no signature at all, is now decrypted and kept rather than discarded, and the outcome is logged when content does not match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes / Features implemented
Encrypted submissions are checked against the signature they were submitted with. Until now, a submission that did not pass that check was rejected outright and its contents were discarded, and a submission that carried no signature at all was treated the same way — even though sending one is optional.
Both are now decrypted and kept, and the result of the check is recorded against each submission: the content matched its signature, it did not match, or there was no signature to check it against. Submissions decrypted before this change are recorded as having matched, since that was the only way they could have been accepted.
Nothing is exposed through the API yet. When content does not match its signature, a warning is written to the logs so it can be noticed without anyone having to go looking for it.
Steps taken to verify this change does what is intended
Migrations were applied, reversed and re-applied against a database to confirm they are safe to roll back. The new index is built without blocking submissions from coming in.
Side effects of implementing this change
A submission whose content does not match its signature now counts as successfully decrypted, where previously it counted as a failure. Anything that reports on decryption failures will see fewer of them.
Submissions that failed this check in the past are recoverable but are not touched by this change.
Before submitting this PR for review, please make sure you have:
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Closes #3224