-
Notifications
You must be signed in to change notification settings - Fork 180
Client side encryption #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
When I'll have time, I'll re-implement it using the Client-Side Data Encryption of the AWS SDK. |
|
Is there any chance for this feature to be merged soon? We would really like to enable client side encryption. :) |
|
Thanks for your interest. I normally should be resuming my work on this next week. Like I said above, I'll use the client-side encryption offered by the AWS SDK for Java. There will be less code to maintain in this repository and it will be possible to easily rotate the keys. Client-Side Data Encryption of the AWS SDK
|
|
Thanks for the update. Looking forward to this feature! |
|
The encryption is now done by the AWS SDK for Java. Public/private keys are not supported at the moment (only symmetric keys). |
|
Great, thanks for the speedy work! |
|
I switched to base 64 encoding of the key as it will be more compact. @saahn If you want to test, use |
You can test with this archive. I think the pull request can be merged. I just need my employer to sign the CLA so I can sign it too. This should be done soon. |
|
CLA signed. |
README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should be private here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
I did a first review pass but I'd love that @imotov looks at it as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use assertThat(e, instanceOf(MalformedJsonException.class)); here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
Left a small comment. The change looks good to me though I did not test it. |
|
I tested the commits on top of the |
|
@NicolasTr Could you please rebase your changes on master and squash all your commits? Recent patch added by @tlrx fixes compilation issues with elasticsearch 1.4 and above. If you can't do it quickly, could you give an estimate for this? So we can decide in which version we can support this feature. Thanks! |
|
Done. I saw that @tlrx added the support of multipart uploads in 4bc4ea6. It should work with client-side encryption (see the client-side encryption feature matrix). However:
|
|
@NicolasTr Thanks for this PR and yes, parts are uploaded in order. However when need to test this. Again - and sorry - can you rebase your PR please? |
|
@tlrx Thanks for your response. I fixed the conflicts. |
|
I just rebased against master again. |
|
@NicolasTr Did you sign the CLA? |
|
Yes, I did :) |
|
@NicolasTr, @dadoonet -- very excited to see this. any idea when it will be merged? |
|
@NicolasTr , @dadoonet , also very excited to see this and would very much like to see it merged... |
The Java Cryptography Extension (JCE) has to be installed to use this feature.
|
@dadoonet I rebased on top of master. I haven't rerun the tests. What's the issue with the CLA? |
|
Probably something went wrong on our side. |
|
Any update on this? Really excited to start taking encrypted snapshots to S3. |
|
+1 on using this. Any eta? Thanks! |
|
Hi @NicolasTr I'm super sorry that your PR never got merged in. I'm not sure how it went out of our radar. Well, you might know that we moved this project to elasticsearch repo. Do you think it could be possible for you to create a new PR in elasticsearch repo? We will make sure it gets attention it deserves. Again, sorry for this loooooong delay! Best |
|
@NicolasTr Do you think you could come up with a new PR on elasticsearch repository? |
|
@dadoonet I'm sorry I missed your previous comment. Yes, I'll do it. Let's move the discussion to the elasticsearch repo. |
Here's some code to encrypt client-side the snapshots stored in S3 .
It uses the envelope encryption of the AWS ADK for Java (AES 256 in CBC mode). You case use keys of 128, 192 or 256 bits but you _have to_ install the JCE because the envelope encryption _will_ use 256bits keys.
The key can be specified when configuring the repository.
Example with a 128 bits AES symmetric key:
Example with a 512 bits RSA key pair:
I added a test case to make sure that the files are encrypted and I modified
testSimpleWorkflow()to make sure that by default the files are not encrypted.I haven't updated the documentation yet, I would like to get some reviews first.