Skip to content

Commit

Permalink
Adapt to Quarkus 3.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Jan 22, 2025
1 parent 06815ee commit f869f0b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ asciidoc:
attributes:

# Versions
quarkus-version: 3.17.7 # replace ${quarkus.version}
quarkus-version: 3.18.0.CR1 # replace ${quarkus.version}
quarkus-cxf-version: 3.17.3 # replace ${release.current-version}

# Toggle whether some page elements are rendered
Expand Down
7 changes: 7 additions & 0 deletions docs/modules/ROOT/pages/reference/extensions/quarkus-cxf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2169,6 +2169,13 @@ with
set to `NONE`. Otherwise, there is no way to implement custom hostname verification for Vert.x HTTP client.
====

[IMPORTANT]
====
Since {quarkus-cxf-project-name} 3.18.0, setting this option when the conduit factory of this client is set to
`HttpClientHTTPConduitFactory` is not supported and leads to an exception at runtime.
See https://github.com/quarkiverse/quarkus-cxf/issues/1687[#1687].
====

*Environment variable*: `+++QUARKUS_CXF_CLIENT__CLIENT_NAME__HOSTNAME_VERIFIER+++` +
*Since Quarkus CXF*: 2.5.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class BadHostnameTest {
/* Named TLS configuration for the clients */
.overrideConfigKey("quarkus.tls.client-pkcs12.trust-store.p12.path", "fake-host-truststore.p12")
.overrideConfigKey("quarkus.tls.client-pkcs12.trust-store.p12.password", "secret")
.overrideConfigKey("quarkus.tls.client-pkcs12.trust-store.certificate-expiration-policy", "IGNORE")

/* Client with VertxHttpClientHTTPConduitFactory */
.overrideConfigKey("quarkus.cxf.client.helloVertx.client-endpoint-url", "https://localhost:8444/services/hello")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,8 @@ void customHostnameVerifierHttpClient() {
Assertions.assertThat(customHostnameVerifier.getCheckedHostNames()).isEmpty();
customHostnameVerifier.setReturnVal(false);
Assertions.assertThatThrownBy(() -> helloHttpClient.hello("Doe")).hasRootCauseMessage(
"No name matching localhost found");
Assertions.assertThat(customHostnameVerifier.getCheckedHostNames()).containsExactly("localhost", "localhost");
customHostnameVerifier.setReturnVal(true);
Assertions.assertThat(helloHttpClient.hello("Joe")).isEqualTo("Hello Joe");
Assertions.assertThat(customHostnameVerifier.getCheckedHostNames()).containsExactly("localhost", "localhost",
"localhost");
"http-conduit-factory = HttpClientHTTPConduitFactory does not support quarkus.cxf.client.helloHttpClient.hostname-verifier - see https://github.com/quarkiverse/quarkus-cxf/issues/1687");
Assertions.assertThat(customHostnameVerifier.getCheckedHostNames()).containsExactly();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,13 @@ public interface CxfClientConfig {
* set to `NONE`. Otherwise, there is no way to implement custom hostname verification for Vert.x HTTP client.
* ====
*
* [IMPORTANT]
* ====
* Since {quarkus-cxf-project-name} 3.18.0, setting this option when the conduit factory of this client is set to
* `HttpClientHTTPConduitFactory` is not supported and leads to an exception at runtime.
* See https://github.com/quarkiverse/quarkus-cxf/issues/1687[#1687].
* ====
*
* @asciidoclet
* @since 2.5.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ public HTTPConduit createConduit(CXFClientInfo cxfClientInfo, HttpClientPool htt
EndpointReferenceType target) throws IOException {
return new HttpClientHTTPConduit(b, localInfo, target);
}

@Override
public TLSClientParameters createTLSClientParameters(CXFClientInfo cxfClientInfo) {
if (cxfClientInfo.getHostnameVerifier() != null) {
throw new IllegalStateException(
getConduitDescription() + " does not support quarkus.cxf.client."
+ cxfClientInfo.getConfigKey()
+ ".hostname-verifier - see https://github.com/quarkiverse/quarkus-cxf/issues/1687");
}
return new QuarkusTLSClientParameters(cxfClientInfo.getTlsConfigurationName(), cxfClientInfo.getTlsConfiguration());
}
},
@ConfigDocEnumValue("URLConnectionHTTPConduitFactory")
URLConnectionHTTPConduitFactory {
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</developers>
<properties>
<!-- Primary dependencies -->
<quarkus.version>3.17.7</quarkus.version>
<quarkus.version>3.18.0.CR1</quarkus.version>
<cxf.version>4.1.0</cxf.version>
<quarkus-enforcer-rules.version>${quarkus.version}</quarkus-enforcer-rules.version>
<quarkus-antora.version>1.0.2</quarkus-antora.version>
Expand All @@ -68,7 +68,7 @@
<santuario-xmlsec.version>3.0.5</santuario-xmlsec.version>

<slf4j.version>2.0.6</slf4j.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:org.slf4j:slf4j-api -->
<smallrye-certificate-generator.version>0.8.1</smallrye-certificate-generator.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:io.smallrye.certs:smallrye-certificate-generator -->
<smallrye-certificate-generator.version>0.9.2</smallrye-certificate-generator.version><!-- @sync io.quarkus:quarkus-bom:${quarkus.version} dep:io.smallrye.certs:smallrye-certificate-generator -->
<stax2.version>4.2.2</stax2.version><!-- @sync com.fasterxml.woodstox:woodstox-core:${woodstox-core.version} dep:org.codehaus.woodstox:stax2-api -->
<woodstox-core.version>7.1.0</woodstox-core.version>
<wsdl4j.version>1.6.3</wsdl4j.version><!-- Manage WSDL4J to make sure that quarkus-cxf-xjc-plugins pulls the right version via cxf-xjc-wsdlextension -->
Expand Down

0 comments on commit f869f0b

Please sign in to comment.