You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "anders-p-andersson-vgregion-se (via GitHub)" <gi...@apache.org> on 2025/12/23 11:51:22 UTC
[PR] [CAMEL-22000] Expose mTLS headers for camel-mllp [camel]
anders-p-andersson-vgregion-se opened a new pull request, #20587:
URL: https://github.com/apache/camel/pull/20587
# Description
Add TLS headers to Camel-MLLP consumers when using mTLS, just like camel-netty does for incoming traffic. These headers exposes Subject, certificate validity dates, serial number and issuer name.
# Target
- [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch)
# Tracking
- [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).
My Jira issue: https://issues.apache.org/jira/browse/CAMEL-22000
<!--
# *Note*: trivial changes like, typos, minor documentation fixes and other small items do not require a JIRA issue. In this case your pull request should address just this issue, without pulling in other changes.
-->
# Apache Camel coding standards and style
- [x] I checked that each commit in the pull request has a meaningful subject line and body.
<!--
If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
-->
- [x] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes.
<!--
You can run the aforementioned command in your module so that the build auto-formats your code. This will also be verified as part of the checks and your PR may be rejected if if there are uncommited changes after running `mvn clean install -DskipTests`.
You can learn more about the contribution guidelines at https://github.com/apache/camel/blob/main/CONTRIBUTING.md
-->
--
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: [PR] [CAMEL-22000] Expose mTLS headers for camel-mllp [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20587:
URL: https://github.com/apache/camel/pull/20587#issuecomment-3686371508
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: Apache Camel Committers, please review the following items:
* First-time contributors **require MANUAL approval** for the GitHub Actions to run
* You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot.
* You can label PRs using `build-all`, `build-dependents`, `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
* Build and test logs are available in the Summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
* :warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
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: [PR] [CAMEL-22000] Expose mTLS headers for camel-mllp [camel]
Posted by "anders-p-andersson-vgregion-se (via GitHub)" <gi...@apache.org>.
anders-p-andersson-vgregion-se commented on PR #20587:
URL: https://github.com/apache/camel/pull/20587#issuecomment-3696407117
@Croway you are correct, String is a misstake here MllpConstants.java for MLLP_SSL_CLIENT_CERT_NOT_BEFORE and AFTER. Now fixed to be java.util.Date. org.apache.camel.component.netty.NettyConstants.java which I am copying has Date so it is extra important that camel-mllp uses the same for consistency.
I also fixed the unit test by changing which exception I check for, unittests should be all green now.
Thanks a lot for the feedback!
--
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: [PR] [CAMEL-22000] Expose mTLS headers for camel-mllp [camel]
Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway commented on code in PR #20587:
URL: https://github.com/apache/camel/pull/20587#discussion_r2643063777
##########
components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpConstants.java:
##########
@@ -26,6 +26,17 @@ public final class MllpConstants {
public static final String MLLP_LOCAL_ADDRESS = "CamelMllpLocalAddress";
@Metadata(description = "The remote TCP Address of the Socket", javaType = "String")
public static final String MLLP_REMOTE_ADDRESS = "CamelMllpRemoteAddress";
+ @Metadata(description = "The SSL client certificate subject name", label = "consumer", javaType = "String")
+ public static final String MLLP_SSL_CLIENT_CERT_SUBJECT_NAME = "CamelMllpSslClientCertSubjectName";
+ @Metadata(description = "The SSL client certificate issuer name", label = "consumer", javaType = "String")
+ public static final String MLLP_SSL_CLIENT_CERT_ISSUER_NAME = "CamelMllpSslClientCertIssuerName";
+ @Metadata(description = "The SSL client certificate serial number", label = "consumer", javaType = "String")
+ public static final String MLLP_SSL_CLIENT_CERT_SERIAL_NO = "CamelMllpSslClientCertSerialNo";
+ @Metadata(description = "The SSL client certificate not before.", label = "consumer", javaType = "String")
Review Comment:
Is the javaType String, or a Date? same for MLLP_SSL_CLIENT_CERT_NOT_AFTER
--
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: [PR] [CAMEL-22000] Expose mTLS headers for camel-mllp [camel]
Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway commented on PR #20587:
URL: https://github.com/apache/camel/pull/20587#issuecomment-3686594723
@anders-p-andersson-vgregion-se a test is failing on the CI
```
[camel-mllp] [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.142 s <<< FAILURE! -- in org.apache.camel.component.mllp.MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest
[camel-mllp] [ERROR] org.apache.camel.component.mllp.MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.testSendingTlsWithNoClientCertificateToMllpConsumerWhichRequiresClientAuthentication -- Time elapsed: 0.138 s <<< FAILURE!
org.opentest4j.AssertionFailedError: Unexpected type, expected: <java.net.SocketException> but was: <javax.net.ssl.SSLHandshakeException>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertInstanceOf.assertInstanceOf(AssertInstanceOf.java:49)
at org.junit.jupiter.api.AssertInstanceOf.assertInstanceOf(AssertInstanceOf.java:31)
at org.junit.jupiter.api.Assertions.assertInstanceOf(Assertions.java:3614)
at org.apache.camel.component.mllp.MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.testSendingTlsWithNoClientCertificateToMllpConsumerWhichRequiresClientAuthentication(MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.java:44)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
[camel-mllp] [INFO] Running org.apache.camel.component.mllp.MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest
[camel-mllp] [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.148 s <<< FAILURE! -- in org.apache.camel.component.mllp.MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest
[camel-mllp] [ERROR] org.apache.camel.component.mllp.MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.testSendingTlsWithNoClientCertificateToMllpConsumerWhichRequiresClientAuthentication -- Time elapsed: 0.146 s <<< FAILURE!
org.opentest4j.AssertionFailedError: Unexpected type, expected: <java.net.SocketException> but was: <javax.net.ssl.SSLHandshakeException>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertInstanceOf.assertInstanceOf(AssertInstanceOf.java:49)
at org.junit.jupiter.api.AssertInstanceOf.assertInstanceOf(AssertInstanceOf.java:31)
at org.junit.jupiter.api.Assertions.assertInstanceOf(Assertions.java:3614)
at org.apache.camel.component.mllp.MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.testSendingTlsWithNoClientCertificateToMllpConsumerWhichRequiresClientAuthentication(MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.java:44)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
[camel-mllp] [INFO]
[camel-mllp] [INFO] Results:
[camel-mllp] [INFO]
[camel-mllp] [ERROR] Failures:
[camel-mllp] [ERROR] org.apache.camel.component.mllp.MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.testSendingTlsWithNoClientCertificateToMllpConsumerWhichRequiresClientAuthentication
[camel-mllp] [ERROR] Run 1: MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.testSendingTlsWithNoClientCertificateToMllpConsumerWhichRequiresClientAuthentication:44 Unexpected type, expected: <java.net.SocketException> but was: <javax.net.ssl.SSLHandshakeException>
[camel-mllp] [ERROR] Run 2: MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.testSendingTlsWithNoClientCertificateToMllpConsumerWhichRequiresClientAuthentication:44 Unexpected type, expected: <java.net.SocketException> but was: <javax.net.ssl.SSLHandshakeException>
[camel-mllp] [ERROR] Run 3: MllpMutualTlsConnectionAndHeaderRequiresClientAuthenticationTest.testSendingTlsWithNoClientCertificateToMllpConsumerWhichRequiresClientAuthentication:44 Unexpected type, expected: <java.net.SocketException> but was: <javax.net.ssl.SSLHandshakeException>
[camel-mllp] [INFO]
[camel-mllp] [INFO]
[camel-mllp] [ERROR] Tests run: 334, Failures: 1, Errors: 0, Skipped: 9
```
--
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: [PR] [CAMEL-22000] Expose mTLS headers for camel-mllp [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #20587:
URL: https://github.com/apache/camel/pull/20587
--
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