Skip to content
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

Binary resources such as keystores are being corrupted #1750

Closed
nicolaferraro opened this issue Oct 7, 2020 · 2 comments · Fixed by #1751
Closed

Binary resources such as keystores are being corrupted #1750

nicolaferraro opened this issue Oct 7, 2020 · 2 comments · Fixed by #1751
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@nicolaferraro
Copy link
Member

Doing:

kamel run TLS.java --resource trust.jks

The sha256sum of the trust.jsk file in the container is different from the original one, which means something has corrupted it.

Workaround is:

kubectl create secret generic trust --from-file trust.jks
kamel run TLS.java --secret trust

Which is also a best practice for such data, but this problem may cause other issues.

Tested on: https://self-signed.badssl.com/

@rampraveen83
Copy link

rampraveen83 commented Oct 16, 2020

Tried with v 1.2, and jks files are still getting corrupted. Compared the file size and its different when bundled with camel. Woks fine for txt file.

e.g kamel run kafka.java --resource keystore.jks --resource truststore.jks

Caused by: java.io.IOException: Invalid keystore format

The workaround is what i am still using and it seems to work.

@nicolaferraro
Copy link
Member Author

This is strange, as binary resources are base64 encoded.

@rampraveen83 can you try with:

kamel run kafka.java --resource keystore.jks --resource truststore.jks --compression=true

Compression is the mechanism that we tried to auto-enable on 1.2 to avoid corruption.
Also, can you double check the version with kamel version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants