2020IP / TwentyTwenty.Storage

A cross-cloud storage abstraction
Other
100 stars 26 forks source link

Amazon S3 Encryption #23

Closed imperugo closed 5 years ago

imperugo commented 5 years ago

Looking the code here https://github.com/2020IP/TwentyTwenty.Storage/blob/74960b8bcbcc49f8ba46b6da7b3e31235f4c25bb/src/TwentyTwenty.Storage.Amazon/AmazonStorageProvider.cs#L244-L281 it seems the SAS url generate for S3 is ignoring the ServerSideEncryptionMethod.

Probably should be something like:

var request = new GetPreSignedUrlRequest
            {
                ServerSideEncryptionMethod = new ServerSideEncryptionMethod(_serverSideEncryptionMethod),
            };

Doesn't it?

ericgreenmix commented 5 years ago

@imperugo Yeah, I believe you are right. Want to put in a PR for that?

imperugo commented 5 years ago

Of course. I'll do that

imperugo commented 5 years ago

Done https://github.com/2020IP/TwentyTwenty.Storage/pull/24