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-17881 TLS for MLLP Component #16662

Merged
merged 13 commits into from
Jan 1, 2025
Merged

Conversation

ivn89
Copy link
Contributor

@ivn89 ivn89 commented Dec 28, 2024

Description

This commit makes the mllp component able to specify sslcontextperameters to use tls. This works both when using the mllp component to receive and to send messages. I have had to make some changes in some allready existing classes to make them use SSLServerSocketFactory in case of sslcontextparemeters being present. If sslcontextparemeters are not present it works as before. I had to add changes to the mllptcpserverconsumer and tcpserverbindthread on the server side and mllptcpclientproducer on the client side. I also had to add to the mllpconfiguration class and the mllpendpoint class so the endpoint can be created with sslcontextparameters in the uri. For testing I added an endpoint test to the mllpenpointtest class and I created a new class mllpsslcontextparameterstest for the connection test.

It's my first contribution so feel free to tell me if I should change something or if there are things I have missed completely.

Target

  • [ X] I checked that the commit is targeting the correct branch (note that Camel 3 uses camel-3.x, whereas 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 filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • [X ] I checked that each commit in the pull request has a meaningful subject line and body.
  • [X ] I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟

🤖 CI automation will test this PR automatically.

🐫 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 have access to the summary.

  • ⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@davsclaus
Copy link
Contributor

Thanks, the other components that has SSL also have an option named useGlobalSslContextParameters - can you take a look and see if you can add this as well.

Copy link
Contributor

@oscerd oscerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one line not clear

components/camel-mllp/pom.xml Outdated Show resolved Hide resolved
@ivn89
Copy link
Contributor Author

ivn89 commented Dec 29, 2024

Thanks, the other components that has SSL also have an option named useGlobalSslContextParameters - can you take a look and see if you can add this as well.

I will look in to it

@ivn89 ivn89 force-pushed the feature/add-ssl-to-mllp branch from 12812a5 to 4b7d341 Compare December 30, 2024 11:19
@ivn89
Copy link
Contributor Author

ivn89 commented Dec 30, 2024

I added option useGlobalSslContextParameters, added a test for it and removed the old outcommented version in pom

@davsclaus
Copy link
Contributor

Thanks @ivn89 there was some files that are generated during build that was not up to date and causing this PR to not automatic be testable.

I took your PR and created a new with your work
#16675

You are welcome to try to cleanup this PR or we can merge my PR.
More contributions is very welcome.

@ivn89 ivn89 force-pushed the feature/add-ssl-to-mllp branch from 4b7d341 to d463dae Compare December 31, 2024 16:20
@ivn89
Copy link
Contributor Author

ivn89 commented Dec 31, 2024

Thanks! I tried rebasing and rebuilding again with mvn clean install. Let's see if that works.

@davsclaus
Copy link
Contributor

modified:   bom/camel-bom/pom.xml
modified:   catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
modified:   components/camel-debezium/camel-debezium-oracle/src/generated/java/org/apache/camel/component/debezium/oracle/configuration/OracleConnectorEmbeddedDebeziumConfiguration.java
modified:   components/camel-sql/src/generated/java/org/apache/camel/component/sql/stored/template/generated/SSPTParserConstants.java
modified:   components/camel-sql/src/generated/java/org/apache/camel/component/sql/stored/template/generated/SSPTParserTokenManager.java
modified:   dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
modified:   dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
modified:   dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json

@ivn89
Copy link
Contributor Author

ivn89 commented Jan 1, 2025

modified:   bom/camel-bom/pom.xml
modified:   catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
modified:   components/camel-debezium/camel-debezium-oracle/src/generated/java/org/apache/camel/component/debezium/oracle/configuration/OracleConnectorEmbeddedDebeziumConfiguration.java
modified:   components/camel-sql/src/generated/java/org/apache/camel/component/sql/stored/template/generated/SSPTParserConstants.java
modified:   components/camel-sql/src/generated/java/org/apache/camel/component/sql/stored/template/generated/SSPTParserTokenManager.java
modified:   dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
modified:   dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
modified:   dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json

Hmm I cant figure out where they are comming from. I have no uncommitted files after I run build. You can try your PR if you want.

@davsclaus davsclaus merged commit 2fa1652 into apache:main Jan 1, 2025
2 of 4 checks passed
@davsclaus
Copy link
Contributor

I will rebuild after this PR

@ivn89
Copy link
Contributor Author

ivn89 commented Jan 1, 2025

I will rebuild after this PR

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants