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

Allow encryption method to be configurable #21

Merged
merged 8 commits into from
Jul 10, 2020

Conversation

Cruikshanks
Copy link
Member

https://eaflood.atlassian.net/browse/RUBY-1156

We recently switched the encryption method we use on the gem from AES256 to AWS:KMS. From our testing there was no issues with this. However, after deploying this change to a live environment it has caused problems for 3rd parties trying to access our exported files.

They use different AWS credentials to access the files, and these credentials we have found need access to the same KMS key against our credentials (and used for encryption) to decrypt the files.

This has further implications that need consideration. So short term we need to revert back to AES256. Longer term we would like to switch back.

So this change is about updating the gem to make the encryption method configurable.

https://eaflood.atlassian.net/browse/RUBY-1156

We recently switched the encryption method we use on the gem from AES256 to AWS:KMS. From our testing there was no issues with this. However, after deploying this change to a live environment it has caused problems for 3rd parties trying to access our exported files.

They use different AWS credentials to access the files, and these credentials we have found need access to the same KMS key against our credentials (and used for encryption) to decrypt the files.

This has further implications that need consideration. So short term we need to revert back to AES256. Longer term we would like to switch back.

So this change is about updating the gem to make the encryption method configurable.
@Cruikshanks Cruikshanks added the enhancement New feature or request label Jul 10, 2020
@Cruikshanks Cruikshanks self-assigned this Jul 10, 2020
Reset back to always using AES256. But update the tests to encompass our new option to use AWS:KMS
Updated the name of the property on the bucket to match the terminology used by AWS (see https://docs.aws.amazon.com/sdk-for-ruby/v2/api/Aws/S3/Types/Encryption.html#encryption_type-instance_method)

Also updated the config property name to be clearer and simpler to use. Finally updated our logic around the arg to handle the value being set as either a string or a boolean. Previous version was just relying on something being there.
Doing this ahead of adding some for the encryption type. Made sense if I felt the need to cover encryption type we should also be covering region.
@Cruikshanks Cruikshanks marked this pull request as ready for review July 10, 2020 12:30
@Cruikshanks Cruikshanks merged commit e97ce02 into main Jul 10, 2020
@Cruikshanks Cruikshanks deleted the make-encryption-method-configurable branch July 10, 2020 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant