This repository was archived by the owner on Nov 27, 2024. It is now read-only.
DEVOPS-15838: add checksum header for S3 storage - #2
Open
mn-coupa wants to merge 1 commit into
Open
Conversation
|
|
||
| sha256_checksum = Digest::SHA256.hexdigest(File.read(file.path)) | ||
| encoded_sha256_checksum = Base64.encode64([sha256_checksum].pack("H*")).strip | ||
| write_options[:checksum_sha256] = encoded_sha256_checksum # Required for FIPS (SHA256) and object locking (checksum) |
There was a problem hiding this comment.
@charchitarora isn't this already added by the aws-sdk-s3, is that what you meant by this is already being done
There was a problem hiding this comment.
@abdulchaudhrycoupa - I was referring to - https://github.com/coupa-ops/paperclip/blob/CE-14395_v5.2.0/lib/paperclip/attachment.rb#L36 - is already there. We need not add this to paperclip initializer.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
JIRA
Complete the URLs for the main JIRA ticket and propagation subtask.
Code reviewers
@jmathadu @PNarode
Summary of issue
Summary of change
Testing approach
Use Control UI to upload CSV file
The file is saved to
paperclip-us-east-1-coupadev-combucket, which has Object Lock enabledHere is the S3 link
https://us-east-1.console.aws.amazon.com/s3/buckets/paperclip-us-east-1-coupadev-com?region=us-east-1&bucketType=general&prefix=control-ops-qa.coupadev.com/data_sources/files/000/000/112/original/&showversions=false