Support ServerSideEncryption
See original GitHub issueAt the moment it looks like the upload
function is used but does’t accept an option to pass in the ServerSideEncryption
header. The upload
function takes the same params as the the putObject
function:
s3.putObject({
Bucket: bucketName,
Key: key,
Body: fileStream,
ServerSideEncryption: 'AES256',
Metadata: { 'docId': 'DOCID', 'docKey': 'XYZZY', 'index': 'pdf' }
})
Reference for the above
It would be great if the disk.write
updated usage could look like this:
await this.disk.write(path, file.buffer, {
name,
ServerSideEncryption: 'AES256'
});
FoalTS is fantastic btw, awesome work!
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Protecting data using server-side encryption
Server-side encryption is the encryption of data at its destination by the application or service that receives it. Amazon S3 encrypts your data...
Read more >ServerSideEncryption (AWS SDK for Java - 2.18.35)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum...
Read more >AWS S3 Encryption - Jayendra's Cloud Certification Blog
AWS S3 Encryption supports but encryption in transit using TLS and encryption at rest support both client and server side encryption.
Read more >Object Storage Service:Server-side encryption - Alibaba Cloud
Object Storage Service (OSS) encrypts objects uploaded to a bucket that has server-side encryption enabled and stores the encrypted objects.
Read more >Does s3cmd support Amazon S3 server-side encryption?
Does s3cmd support Amazon S3 server-side encryption? Yes, file encryption can optionally be used to make a backup/upload to S3 more secure. Files...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok thanks. 👍
Yes, so I think the best place to specify the option will be in the configuration then. It will allow us to keep using the generic
Disk
and@ValidateMultipartBody
hook in this case. In this way, we will still be able to write a unique code that uses the local file system in development (for testing) and the S3 bucket in production.Thank you!
I’m thinking of adding a fourth parameter (not the third) to the
write
function to pass custom options to theputObject
method. This would be specific to theS3Disk
service (and notDisk)
.I still need to think about this to check that it won’t introduce backward incompatibility, especially on the typing.