Keycloak Truststore for ldaps with hostname-verification-policy = ANY still fails "No subject...

Discussão em 'StackOverflow' iniciado por Stack, Janeiro 20, 2021.

  1. Stack

    Stack Membro Participativo

    I have create a truststore.jks containing my CA certificate and added the SPI to standalone-ha.xml as follows:

    [​IMG]

    The keystore is loaded correctly and I can check it is working if I try to use one single LDAP server pointing by its DNS name. But if I try to use the IP on the connection url instead of DNS, the test authentication will always fails. ( Although test connection works )

    Connection URL: ldaps://dc01.mydomain.com - WORKS

    Connection URL: ldaps://172.20.0.1 - It fails

    In the logs I can see:

    [​IMG]

    I was expecting that the property hostname-verification-policy = ANY would make this work.

    I can not use the DNS because I intend to have a load balancer that will ssl passthrough to the several domain controllers.

    btw, I tried to use connection URL with multiple domain controllers like "ldaps://dc01.mydomain.com ldaps://dc02.mydomain.com ldaps://dc03.mydomain.com, but although this appears to work, the moment the dc01.mydomain.com ( first one in the list ) is offline, keycloak stops answering, that's why I will use haproxy to loadbalancer those connection and remove dead servers from the backend automatically.

    Any help with this ?

    Continue reading...

Compartilhe esta Página