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

Camel sslContextParameter not working #1815

Closed
starafdar-git opened this issue Nov 18, 2020 · 4 comments
Closed

Camel sslContextParameter not working #1815

starafdar-git opened this issue Nov 18, 2020 · 4 comments

Comments

@starafdar-git
Copy link

starafdar-git commented Nov 18, 2020

Hi Team,
I am trying to use ssl certificate to make rest call , but seems its not working as expected however its working on spring boot with camel:

#Code snippet for updating ssl context parameter
CamelContext camelContext = getContext();
KeyStoreParameters ksp = new KeyStoreParameters();
ksp.setResource("/etc/camel/conf.d/_secrets/****/.p12");
ksp.setPassword("
");

KeyManagersParameters kmp = new KeyManagersParameters();
kmp.setKeyStore(ksp);
kmp.setKeyPassword("*****");
SSLContextParameters scp = new SSLContextParameters();
scp.setKeyManagers(kmp);
camelContext.setSSLContextParameters(scp);

#command :
kamel run --secret=*** --dependency=camel-http --dependency=camel-undertow ***Proxy.java --dev

@lburgazzoli
Copy link
Contributor

If you are using the latest version of camel-k (1.2.0), the default runtime has been switched to quarkus so best is to follow this guide: https://quarkus.io/guides/http-reference#ssl

@starafdar-git
Copy link
Author

@lburgazzoli
Thanks for your reply
Created a config map for application.properties and added below content:
quarkus.http.ssl.certificate.key-store-file="/etc/camel/conf.d/_secrets/***/certificate.p12"
quarkus.http.ssl.certificate.key-store-file-type="P12"
quarkus.http.ssl.certificate.key-store-password="
"

then used below command to run but still same
kamel run --configmap=configmap --secret=**-cert --dependency=camel-http --dependency=camel-undertow ***Proxy.java --dev

@squakez
Copy link
Contributor

squakez commented Jun 22, 2021

In latest version 1.5 we're introducing a different way to manage secret and properties. You may have a look at the examples here to see how we're setting SSLContextParameter with the new configuration: https://github.com/apache/camel-k/tree/main/examples/http

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants