-
Notifications
You must be signed in to change notification settings - Fork 191
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
kafka-ssl in fips #6091
kafka-ssl in fips #6091
Conversation
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
@TestCertificates(certificates = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ppalaga This annotation instructs certificate-generator project to generate certificates.
(it should be possible to test more certificate types, by providing some parameters for the test methods. I haven't tried that yet)
8a7ad46
to
7eebe04
Compare
...ion-tests-support/test-support/src/main/java/org/apache/camel/quarkus/test/FipsModeUtil.java
Show resolved
Hide resolved
...va/org/apache/camel/quarkus/test/support/certificate/TestCertificateGenerationExtension.java
Outdated
Show resolved
Hide resolved
...pport/kafka/src/main/java/org/apache/camel/quarkus/test/support/kafka/KafkaTestResource.java
Show resolved
Hide resolved
If possible, it might be a good idea to test that this works ok in the Quarkus Platform before we merge this work. |
I suppose that running platform with CQ locally should be enough, right? |
I also noticed, that I have to do small fix in the |
Yeah, you can just tweak the CQ version in the platform to 3.11.0-SNAPSHOT, build the project and run a few of the CQ tests. |
7eebe04
to
0115d1b
Compare
I built quarkus-platform with CQ 3.11.0-SNAPSHOT and successfully run all 4 kafka test modules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with merging this and using it as a base to build on & improve to use the cert generator in other places in the project.
0115d1b
to
cc74f01
Compare
@jamesnetherton The support module was renamed to |
fixes #6090
contains part of #5967
Workaround because of strimzi kafka container.
Password-based encryption support in FIPs mode was implemented in the Red Hat build of OpenJDK 17 update 4.
OpenJdk17 should be present in the image according to this blog post. Unfortunately, even the newest image (3.7.0) uses java 11.
I had to add a step in the
camel-quarkus-integration-tests-support-kafka
module when I was creating a custom image with OpenJDK 17. This workaround happens only in FIPS mode and only once. (The custom image with Java 17 is cached and the next runs should use it)Adaptation of certificate-generator project
Certificate-generator project brings support for the generation of certificates easily and clearly. The project can be used as a common approach to certificate generation for the CQ (see discussion in this ticket)
CQ requires the certificates to be customized in case the external docker host is used (see the code for kafka).
To achieve the same functionality when using certificate-generator project I had to create a special annotation
TestCertificates
with the extension implementation (TestCertificateGenerationExtension
). The extension is based on the original extension brought by certificate-generator project and customizes cn and SubjectAlternativeName in case the docker host is not localhost.The new annotation (
TestCertificates
) is placed into a new module camel-quarkus-integration-tests-support-certificate