question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for encryption on objects uploaded to S3

See original GitHub issue

Our S3 bucket has a policy that forces AES (or KMS) encryption on all uploaded objects. This means that the current version of sleet doesn’t work as it doesn’t specify encryption.

As for the solution, I’ve got it working for our AES encryption case by adding ServerSideEncryptionMethod = ServerSideEncryptionMethod.AES256 to:

https://github.com/emgarten/Sleet/blob/d19f2eaf4ae02e6ab1262462312342d490afaa62/src/SleetLib/FileSystem/AmazonS3FileSystemAbstraction.cs#L26-L31

and

https://github.com/emgarten/Sleet/blob/d19f2eaf4ae02e6ab1262462312342d490afaa62/src/SleetLib/FileSystem/AmazonS3FileSystemAbstraction.cs#L131-L139

but of course it needs to be configurable.

However, there are a lot of possible options that as you can see in the AWS docs.

I can submit a PR tomorrow probably, are you happy if it just supports AES for now and throws for any of the other options? So the user could only specify AES256 or None (current behaviour which would stay the default).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mungojamcommented, May 10, 2020

I don’t forsee needing other request options for myself in future as I now have it working with just that one, so up to you if you want to leave it open for other options in a nested structure.

I probably won’t get back to this till next weekend by the way. It’s a bit of a side project. I’m trying to do the same for python at the same time but that has other complications 🙂

0reactions
emgartencommented, May 12, 2020

I don’t forsee needing other request options for myself in future as I now have it working with just that one, so up to you if you want to leave it open for other options in a nested structure.

Top level would be fine then. I appreciate the PRs 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Protecting data with encryption
Server-side encryption – Amazon S3 encrypts your objects before saving them on disks in AWS data centers and then decrypts the objects when...
Read more >
How to Encrypt Existing Amazon S3 Objects with ...
Step 2: Add encryption to existing S3 objects · Sign into the AWS Management Console. · Navigate to the S3 console and find...
Read more >
Amazon S3 Bucket Encryption: Overview & Setup
Let's explore how to encrypt custom objects that have already been uploaded to a bucket and for which encryption settings are set to...
Read more >
AWS S3 Encryption
AWS S3 Encryption supports but encryption in transit using TLS and encryption at rest support both client and server side encryption.
Read more >
Encrypt your S3 Object
Encrypt your S3 Object · The first one is called SSE S3. This is to encrypt S3 objects, using keys handled and managed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found