You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "JKrehling (via GitHub)" <gi...@apache.org> on 2025/09/15 16:36:07 UTC

[I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

JKrehling opened a new issue, #1728:
URL: https://github.com/apache/camel-kafka-connector/issues/1728

   Connector: 
   
   https://camel.apache.org/camel-kafka-connector/4.10.x/reference/connectors/camel-netty-http-kafka-sink-connector.html
   
           "camel.sink.endpoint.keyStoreResource": "file:/tmp/keystore.pkcs12",
           "camel.sink.endpoint.keyStoreFormat": "PKCS12"
           "camel.sink.endpoint.ssl": "true",
   
   
   I can set my connectors keyStore Resource and format with the configs but there doesn't seem to be any client keystore sent to my upstream with this setup.  
   
   Also it appears theres no way to set the password for the keystore either which is odd.  If I pass a jks file (which has to have a password) then the status api throws and error about not being able to read a password.  If I generate a pkcs12 with no password it throws no errors but my upstream (nginx) throws a 400 because there is no client certificate sent in the request. 
   
   `cat <<EOF > connector.json
   {
       "name": "khttpsink",
       "config": {
           "connector.class": "org.apache.camel.kafkaconnector.nettyhttp.CamelNettyhttpSinkConnector",
           "tasks.max": "5",
           "topics": "my-topic",
           "transforms": "headers",
           "camel.sink.path.protocol": "https",
           "camel.sink.path.host": "testit.mydomain.com",
           "camel.sink.path.path": "ktest",
           "camel.sink.path.port": "8443",
           "camel.sink.endpoint.ssl": "true",
           "key.converter.schemas.enable": "false",
           "value.converter.schemas.enable": "false",
           "name": "khttpsink",
           "value.converter": "org.apache.kafka.connect.storage.StringConverter",
           "key.converter": "org.apache.kafka.connect.storage.StringConverter",
           "camel.sink.endpoint.throwExceptionOnFailure": "true",
           "transforms.headers.headers": "CamelHeader.content-type:application/json",
           "camel.sink.endpoint.keyStoreResource": "file:/tmp/keystore.pkcs12",
           "camel.sink.endpoint.keyStoreFormat": "PKCS12"
        }
   }
   EOF
   
   curl -X DELETE localhost:8083/connectors/khttpsink
   curl -XPOST -H "Content-Type: application/json" --data @connector.json http://localhost:8083/connectors -kv
   curl localhost:8083/connectors/khttpsink/status`
   
   My sanity check is just running the above in a kafka-connect container. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

Posted by "JKrehling (via GitHub)" <gi...@apache.org>.
JKrehling commented on issue #1728:
URL: https://github.com/apache/camel-kafka-connector/issues/1728#issuecomment-3319872404

   I didn't see references to this in kamelet but made a PR here. 
   https://github.com/apache/camel/pull/19284
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1728:
URL: https://github.com/apache/camel-kafka-connector/issues/1728#issuecomment-3293526597

   It wasn't clear. We should improve at camel and kamelet level. If you have time it would be great


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1728:
URL: https://github.com/apache/camel-kafka-connector/issues/1728#issuecomment-3293642953

   I'll have a look too if I find time 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

Posted by "JKrehling (via GitHub)" <gi...@apache.org>.
JKrehling commented on issue #1728:
URL: https://github.com/apache/camel-kafka-connector/issues/1728#issuecomment-3308279155

   Stumbled across this as well https://github.com/apache/camel-kafka-connector/issues/1647
   I didn't realize that there were two similar connectors just using different clients.  
   
   Is it possible for this netty client to support oauth as well if the configs were exposed similar to the above ticket? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

Posted by "JKrehling (via GitHub)" <gi...@apache.org>.
JKrehling commented on issue #1728:
URL: https://github.com/apache/camel-kafka-connector/issues/1728#issuecomment-3293521217

   Ah it was more blaming myself for not just trying it and instead skipping over it because it said ssh.  I will update that documentation though.  👍  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

Posted by "JKrehling (via GitHub)" <gi...@apache.org>.
JKrehling closed issue #1728: CamelNettyhttpSinkConnector with client keystore (mtls)
URL: https://github.com/apache/camel-kafka-connector/issues/1728


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

Posted by "JKrehling (via GitHub)" <gi...@apache.org>.
JKrehling commented on issue #1728:
URL: https://github.com/apache/camel-kafka-connector/issues/1728#issuecomment-3293502837

   So it looks like 
   "camel.sink.endpoint.passphrase" is the thing to use but its weird since both stores require the same password 
   
           } else {
               char[] pw = configuration.getPassphrase() != null ? configuration.getPassphrase().toCharArray() : null;
   
               SSLEngineFactory sslEngineFactory;
               if (configuration.getKeyStoreResource() != null || configuration.getTrustStoreResource() != null) {
                   sslEngineFactory = new SSLEngineFactory();
                   answer = sslEngineFactory.createSSLContext(producer.getContext(),
                           configuration.getKeyStoreFormat(),
                           configuration.getSecurityProvider(),
                           configuration.getKeyStoreResource(),
                           configuration.getTrustStoreResource(),
                           pw);
               } else {
                   answer = SSLContext.getDefault();
               }
           }
   
           return answer;
   
   
   And the documentation lists 
   
   Password setting to use in order to encrypt/decrypt payloads sent using SSH but i guess thats a typo meaning ssl 🤦 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

Posted by "JKrehling (via GitHub)" <gi...@apache.org>.
JKrehling commented on issue #1728:
URL: https://github.com/apache/camel-kafka-connector/issues/1728#issuecomment-3293679801

   Password to use for the keyStoreResource, trustStoreResource, and SSL settings.  The same password must be configured for both resources. 
   
   https://camel.apache.org/components/4.14.x/netty-component.html
   
   Also in here it looks like keystoreFile and truststoreFile are deprecated.  Should they be deprecated in the connector as well? 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CamelNettyhttpSinkConnector with client keystore (mtls) [camel-kafka-connector]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #1728:
URL: https://github.com/apache/camel-kafka-connector/issues/1728#issuecomment-3293510352

   Instead of using emojis criticizing documentation, you can have a look at improving the doc and/or check in the main camel repository. It would be a good contribution. Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org