s3-backup
s3-backup copied to clipboard
Encryption
Great action! 🏅
Have you thought about adding encryption support? That way S3/AWS wouldn't be able to read the source code.
Thanks! Hope you find it useful.
I think it might already be possible. This action is just a wrapper around the mirror
command of MinOI Client. Looking at the flags available for the mirror
command it looks possible to send the necessary secret key/value pair for encryption.
--encrypt value encrypt/decrypt objects (using server-side encryption with server managed keys) --encrypt-key value encrypt/decrypt objects (using server-side encryption with customer provided keys)
ref: https://docs.min.io/docs/minio-client-complete-guide.html#mirror
When I have some time I'll try and test it out and update the README with an example. If you get it working, please let me know!
@peter-evans Interesting!
Unfortunately it seems to be only server-side encryption. AWS can still access/decrypt the data, which is what I wanted to avoid if possible.
I don't know how closely this action is tied to minIO, but if we'd be using the any of the AWS SDKs (Go, Python, Ruby, etc) we could use their built-in client-side encryption.
I'll look into this a bit further and see if there is a way I can add this functionality without rewriting the action completely. I'm thinking that I might be able to call a separate tool or script to do the client-side encryption first before calling the mirror
function of MinIO client.
I think that would be useful to a lot of people, since source code is often sensitive and not having to trust the backup location can be quite convenient.
Looked into this a bit more and it seems non-trivial to implement. Even the AWS SDKs do not all support client-side encryption fully. I'm a bit nervous about attempting to write my own implementation and I was hoping to find some existing client or tool to use. I didn't find any stand-alone tool for the encryption part because it seems that the client-side encryption needs to be closely tied to the uploading logic.
The tool that I did find that looks interesting is duplicati. This seems to support client-side encryption and a wide range of options to store the backup, including S3. Would that be of interest to you if I created an action backed by the duplicati client?
I decided to just create the action since someone is bound to find it useful. I'll test it soon and try and get a working example of client-side encryption to S3 working.
https://github.com/peter-evans/duplicati-action
@peter-evans Looks interesting! Will take a look in a while