Ensure correct encryption key is used for new session format#6385
Merged
mitchellhenke merged 1 commit intomainfrom May 20, 2022
Merged
Ensure correct encryption key is used for new session format#6385mitchellhenke merged 1 commit intomainfrom
mitchellhenke merged 1 commit intomainfrom
Conversation
zachmargolis
approved these changes
May 19, 2022
lib/session_encryptor.rb
Outdated
Comment on lines
191
to
193
Contributor
There was a problem hiding this comment.
this feel familiar, I know we left a comment about a ruby openssl version that explained why previously... what if we moved this inside AesEncryptor class? (and/or also added a comment?)
Contributor
Author
There was a problem hiding this comment.
Oh right, I had forgotten we already have both here, so I'm guessing this is not strictly necessary (I copied it from SessionEncryptor)
Contributor
There was a problem hiding this comment.
yayyyy good job past us!
Contributor
Author
There was a problem hiding this comment.
Thanks for pointing it out, I've removed the truncation from this. The default test session_encryption_key is also longer than 32, so it works as intended.
d94e6a1 to
3252585
Compare
changelog: Internal, Security, Only decrypt PII bundle when needed and limit usage of KMS encryption to needed use cases
3252585 to
58ba86b
Compare
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.
Previously, we were referencing the attribute encryptor, which uses the
attribute_encryption_key, but we should not use that for session encryption!This does not affect production as this encryption format is not enabled yet