You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An option is needed to disable hostname verification for HTTPS requests when using HttpClient with a .p12 self-signed certificate.
In some scenarios, such as internal testing across multiple environments where the hostname may vary or IP addresses are used instead of hostnames, hostname verification creates a limitation. While Micronaut provides an option to disable certificate validation (insecure-trust-all-certificates), hostname verification still occurs, leading to SSLHandshakeException.
Steps to Reproduce
Configure HTTPS in the Micronaut server using the following settings:
Connect Error: No name matching mysql-cluster-db-monitor-svc.samar1 found21:11:04.845 [multithreadEventLoopGroup-3-6] ERROR i.m.h.client.netty.DefaultHttpClient - Failed to connect to remotejavax.net.ssl.SSLHandshakeException: No name matching mysql-cluster-db-monitor-svc.samar1 foundat java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
Expected Behavior
To disable hostname verification for HTTPS requests (similar to NoopHostnameVerifier in Spring Boot). The option micronaut.http.client.ssl.insecure-trust-all-certificates=true or clientSslConfiguration.setInsecureTrustAllCertificates(true) does not bypass hostname verification.
Current Workaround
Generating a .p12 certificate with the required hostname resolves the issue. However, in environments where the hostname or IP address can vary, we would like an option to disable hostname verification for internal testing with self-signed certificates.
Feature Request
Provide an option to disable hostname verification for HttpClient when using self-signed certificates, similar to Spring Boot's NoopHostnameVerifier.
The text was updated successfully, but these errors were encountered:
Description
An option is needed to disable hostname verification for HTTPS requests when using HttpClient with a .p12 self-signed certificate.
In some scenarios, such as internal testing across multiple environments where the hostname may vary or IP addresses are used instead of hostnames, hostname verification creates a limitation. While Micronaut provides an option to disable certificate validation (insecure-trust-all-certificates), hostname verification still occurs, leading to SSLHandshakeException.
Steps to Reproduce
Actual Behavior
The following error is received
Expected Behavior
To disable hostname verification for HTTPS requests (similar to NoopHostnameVerifier in Spring Boot). The option
micronaut.http.client.ssl.insecure-trust-all-certificates=true
orclientSslConfiguration.setInsecureTrustAllCertificates(true)
does not bypass hostname verification.Current Workaround
Generating a .p12 certificate with the required hostname resolves the issue. However, in environments where the hostname or IP address can vary, we would like an option to disable hostname verification for internal testing with self-signed certificates.
Feature Request
Provide an option to disable hostname verification for HttpClient when using self-signed certificates, similar to Spring Boot's NoopHostnameVerifier.
The text was updated successfully, but these errors were encountered: