Merged
Conversation
**Why**: Currently we use the session encryptor to encrypt args for async proofing activities and sessions. This adds a complication to modifying the way sessions are encrypted because it is coupled to the way background job arguments are encrypted. Adding this new encryptor (which is a clone of the session encryptor) decouples them and enables us to make changes to the session encryptor.
…ng encrypted background job arguments
| # encrypt the session. When this code is changed to integrate a new mail | ||
| # vendor we should create a purpose built encryptor for that vendor | ||
| Encryption::Encryptors::SessionEncryptor.new | ||
| Encryption::Encryptors::BackgroundProofingArgEncryptor.new |
Contributor
There was a problem hiding this comment.
maybe add a 3rd encryptor here? since this is for proofing but isn't backgrounded yet
Contributor
Author
There was a problem hiding this comment.
I thought about it and didn't feel great about the copy/paste part here. Especially since this does run in a background job when the GPO upload occurs. Maybe a subclass or something like that could work?
Contributor
There was a problem hiding this comment.
oh right this is in a daily background job ... nvm let's leave it
jmhooper
added a commit
that referenced
this pull request
Dec 14, 2023
In the past the IDP used the `Encryption::Encryptors::SessionEncryptor` to encrypt sessions as a whole. This tool was used by the unfortunately named `SessionEncryptor` which acts as a serializer for the session store. The `Encryption::Encryptors::SessionEncryptor` was also used for encrypting PII temporarily while it was queued for letter sending. Two changes led to `Encryption::Encryptors::SessionEncryptor` being unused: - #6315 enabled partial session encryption which made the session encryptor sophisticated enough that it justified its own logic for encrypting elements instead of depending on `Encryption::Encryptors::SessionEncryptor` - #6211 replaced the `Encryption::Encryptors::SessionEncryptor` that was used for encrypting letter PII with a new encryptor built specifically for encrypting background arguments With these changes the `Encryption::Encryptors::SessionEncryptor` no longer has a caller. This commit removes it. [skip changelog]
jmhooper
added a commit
that referenced
this pull request
Dec 14, 2023
In the past the IDP used the `Encryption::Encryptors::SessionEncryptor` to encrypt sessions as a whole. This tool was used by the unfortunately named `SessionEncryptor` which acts as a serializer for the session store. The `Encryption::Encryptors::SessionEncryptor` was also used for encrypting PII temporarily while it was queued for letter sending. Two changes led to `Encryption::Encryptors::SessionEncryptor` being unused: - #6315 enabled partial session encryption which made the session encryptor sophisticated enough that it justified its own logic for encrypting elements instead of depending on `Encryption::Encryptors::SessionEncryptor` - #6211 replaced the `Encryption::Encryptors::SessionEncryptor` that was used for encrypting letter PII with a new encryptor built specifically for encrypting background arguments With these changes the `Encryption::Encryptors::SessionEncryptor` no longer has a caller. This commit removes it. [skip changelog]
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.
Why: Currently we use the session encryptor to encrypt args for async proofing activities and sessions. This adds a complication to modifying the way sessions are encrypted because it is coupled to the way background job arguments are encrypted. Adding this new encryptor (which is a clone of the session encryptor) decouples them and enables us to make changes to the session encryptor.