{"record":{"id":"f37b6795e384956c","repo":"quarkusio/quarkus","slug":"specifying-hostnameverifier-is-not-supported-at-th","errorCode":null,"errorMessage":"Specifying HostnameVerifier is not supported at the moment","messagePattern":"Specifying HostnameVerifier is not supported at the moment","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientBuilderImpl.java","lineNumber":145,"sourceCode":"        this.keystorePassword = password;\n        return this;\n    }\n\n    @Override\n    public ClientBuilder trustStore(KeyStore trustStore) {\n        return trustStore(trustStore, null);\n    }\n\n    public ClientBuilder trustStore(KeyStore trustStore, char[] password) {\n        this.trustStore = trustStore;\n        this.trustStorePassword = password;\n        return this;\n    }\n\n    @Override\n    public ClientBuilder hostnameVerifier(HostnameVerifier verifier) {\n        // TODO\n        throw new UnsupportedOperationException(\"Specifying HostnameVerifier is not supported at the moment\");\n    }\n\n    @Override\n    public ClientBuilder executorService(ExecutorService executorService) {\n        return this;\n    }\n\n    @Override\n    public ClientBuilder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService) {\n        return this;\n    }\n\n    @Override\n    public ClientBuilder connectTimeout(long timeout, TimeUnit unit) {\n        configuration.property(CONNECT_TIMEOUT, (int) unit.toMillis(timeout));\n        return this;\n    }\n","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientBuilderImpl.java#L127-L163","documentation":"The RESTEasy Reactive client does not implement the JAX-RS ClientBuilder.hostnameVerifier() hook and throws UnsupportedOperationException. Hostname verification policy must be configured through Quarkus configuration (e.g. hostname verification algorithm properties) rather than a custom HostnameVerifier.","triggerScenarios":"Calling ClientBuilder.newBuilder().hostnameVerifier(verifier) or QuarkusRestClientBuilder.hostnameVerifier(...) when programmatically building a client.","commonSituations":"Porting clients from classic RESTEasy/Jersey that disable or customize hostname verification (e.g. NoopHostnameVerifier for self-signed certs in dev); security scanners suggesting custom verifiers; test code relaxing hostname checks.","solutions":["Configure hostname verification via Quarkus config (quarkus.tls.hostname-verification-algorithm or quarkus.rest-client.<name>.verify-host) instead of the builder","For self-signed dev certificates, import the cert into a trust store via keyStore/trustStore configuration rather than disabling hostname verification","Remove the hostnameVerifier call; the reactive client's default verification cannot be overridden per-builder","If a permissive verifier is truly required, use a different client implementation (classic RESTEasy) for that call"],"exampleFix":"// before\nClient client = ClientBuilder.newBuilder().hostnameVerifier((h, s) -> true).build();\n\n// after (application.properties)\n// quarkus.rest-client.my-client.verify-host=true\nClient client = ClientBuilder.newBuilder().build();","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    builder = builder.hostnameVerifier(verifier);\n} catch (UnsupportedOperationException e) {\n    // fall back to config-based hostname verification\n}","preventionTips":["Do not call hostnameVerifier() on the reactive client builder; use quarkus TLS hostname-verification config","Handle self-signed certs with a trust store, not by disabling hostname verification","Centralize client builder code so unsupported methods are removed in one place","Add an integration test that builds the client so this fails at startup, not in production"],"tags":["ssl","tls","hostname-verification","rest-client","unsupported-operation"],"backgroundTag":"unsupported-ssl-configuration","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}