Injected Quarkus rest client does not use default TLS registry config by default #45149
Labels
area/config
area/rest-client
kind/bug
Something isn't working
triage/wontfix
This will not be worked on
Describe the bug
Injected Quarkus rest client does not trust a HTTP server with TLS with a custom ca although I configured
quarkus.tls.trust-store.pem.certs
with the custom CA.Expected behavior
Rest client trust remote server with custom ca.
Actual behavior
Rest client does not trust remote server with custom ca.
How to Reproduce?
I use the following code to reproduce the behaviour. The base URI of
MyRemoteService
points at some server with a custom CA.Here are the outputs for the respective application.properties:
(Don't mind the 403. It just important that the remote server is being trusted by Quarkus rest client)
Injected client does not trust remote server with default TLS config
application.properties
output
Injected client trusts remote server when explicitly setting TLS config to
<default>
application.properties
output
Output of
uname -a
orver
Linux PC 6.11.10-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Nov 23 00:53:13 UTC 2024 x86_64 GNU/Linux
Output of
java -version
openjdk version "21.0.5" 2024-10-15
Quarkus version or git rev
3.17.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.9
Additional information
I was able to track down the line where the problem originates:
quarkus/extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/RestClientCDIDelegateBuilder.java
Lines 219 to 220 in 4b51b9e
Either fix it there or default here to
<default>
:quarkus/extensions/tls-registry/runtime/src/main/java/io/quarkus/tls/TlsConfiguration.java
Lines 18 to 27 in 4b51b9e
Workaround
Setting
quarkus.rest-client.tls-configuration-name
to<default>
The text was updated successfully, but these errors were encountered: