I have a system of several spring-boot 2.1.x applications, communicating over https. The hostnames are generated at runtime, according to a naming schema, with variable suffixes - and the IP addresses are also generated at runtime, in an OpenShift environment. The idea is that the certificate CNs don't match the runtime hostnames.
The http client that I am using in these applications is netty.
I want to be able to use my custom implementation of the HostnameVerifier interface - or any other similar method, but I don't know how to get a handle on the netty client configuration from Spring environment:
public class TrustAllHostnames implements HostnameVerifier {
@Override
public boolean verify(String hostname, SSLSession sslSession) {
// incomplete
return true;
}
}