I have followed this tutorial https://apim.docs.wso2.com/en/latest/administer/key-managers/configure-keycloak-connector/ for integrating Keycloak as Key Manager with WSO2 API Manager 4.0.0 and everything is done as described but when I try to obtain client_credentials access_token an error is rising on WSO2 http client - Keycloak communication, viewing the traces it is related to feign. The error is this:
Caused by: feign.RetryableException: Hostname localhost not verified:
certificate: sha256/7mHCBc7ms9yqA/gz+nIRA9cUTRqrEgK3j9eX9fmpDZ0=
DN: CN=localhost
subjectAltNames: [] executing POST https://localhost:8443/auth/realms/master/clients-registrations/openid-connect
As it is described on error trace, it is a hostname verification as hostname is localhost. To bypass this I set hostname verification to be disabled, but it is still happening. I do not know how to skip this verification. These are my config files snippets:
deployment.toml
[transport.passthru_https]
sender.hostname_verifier = "AllowAll"
[transport.passthru_https.sender.parameters]
HostnameVerifier = "AllowAll"
[transport.passthru_http]
sender.hostname_verifier = "AllowAll"
api-manager.bat
set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dorg.opensaml.httpclient.https.disableHostnameVerification=true -Dhttpclient.hostnameVerifier="AllowAll"
Also this localhost certificate is imported in client-truststore.jks in WSO2 installation.
Any idea about how to skip this hostname verification?