forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabling hostname verification by default
Since introduction of the setting 'verifyHost' the hostname verification was disabled by default for the resteasy-reactive-client, as the default value for boolean (primitive) is false. This disabled default makes the reactive client vulnerable to MITM attacks. In the meantime setting the config explicitly is a workaround e.g. with 'quarkus.rest-client.verify-host=true'. This change now adds a proper default both in the configuration and for the field in the reactive client builder implementation. Add test case for enabled host verification default (cherry picked from commit 18f6f4c)
- Loading branch information
Showing
7 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ctive/src/main/java/io/quarkus/it/rest/client/main/wronghost/WrongHostRejectedClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.quarkus.it.rest.client.main.wronghost; | ||
|
||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.core.MediaType; | ||
import jakarta.ws.rs.core.Response; | ||
|
||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; | ||
|
||
@RegisterRestClient(baseUri = "https://wrong.host.badssl.com/", configKey = "wrong-host-rejected") | ||
public interface WrongHostRejectedClient { | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
Response invoke(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters