Skip to content

Commit 4207727

Browse files
committed
Sync documentation of main branch
1 parent f987413 commit 4207727

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

_versions/main/guides/rest-client.adoc

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -492,18 +492,33 @@ quarkus.rest-client.extensions-api.scope=jakarta.inject.Singleton
492492
Setting the base URL of the client is **mandatory**, however the REST Client supports per-invocation overrides of the base URL using the `@io.quarkus.rest.client.reactive.Url` annotation.
493493
====
494494

495-
=== Disabling Hostname Verification
495+
=== Trusting all certificates and Disabling SSL hostname verification
496496

497-
To disable the SSL hostname verification for a specific REST client, add the following property to your configuration:
497+
[WARNING]
498+
====
499+
This properties set should not be used in production.
500+
====
501+
502+
You can configure TLS connection of specific REST client to trust all certificates and disable the hostname verification using tls extension.
503+
First of all, you should configure tls configuration bucket.
498504

505+
To trust all certificates:
499506
[source,properties]
500507
----
501-
quarkus.rest-client.extensions-api.verify-host=false
508+
quarkus.tls.tls-disabled.trust-all=true
509+
----
510+
511+
To disable SSL hostname verification:
512+
[source,properties]
513+
----
514+
quarkus.tls.tls-disabled.hostname-verification-algorithm=NONE
515+
----
516+
517+
Finally, lets configure our REST client with apropriate tls configuration name:
518+
[source,properties]
519+
----
520+
quarkus.rest-client.extensions-api.tls-configuration-name=tls-disabled
502521
----
503-
[WARNING]
504-
====
505-
This setting should not be used in production as it will disable the SSL hostname verification.
506-
====
507522

508523
=== HTTP/2 Support
509524

@@ -2086,7 +2101,7 @@ and limitations:
20862101

20872102
- the default scope of the client for the new extension is `@ApplicationScoped` while the `quarkus-resteasy-client` defaults to `@Dependent`
20882103
To change this behavior, set the `quarkus.rest-client.scope` property to the fully qualified scope name.
2089-
- it is not possible to set `HostnameVerifier` or `SSLContext`
2104+
- it is not possible to set `SSLContext`
20902105
- a few things that don't make sense for a non-blocking implementations, such as setting the `ExecutorService`, don't work
20912106

20922107
== Further reading

0 commit comments

Comments
 (0)