AbsaOSS / login-service

AbsaOSS Common Login gateway using JWT Public key signatures
Apache License 2.0
2 stars 0 forks source link

Health check: include LDAP connection active check if setup #34

Open dk1844 opened 1 year ago

dk1844 commented 1 year ago

After #30 is merged, we are facing a health check issue for LDAP.

By default, if Spring LDAP implementation is present, healthcheck attempts to include it into the checking (fails is LDAP connection fails). Currently, this default behavior is disabled in config in by management.health.ldap.enabled=false.

When enabled, just as-is, the user is presented with:

org.springframework.ldap.CommunicationException: localhost:389; nested exception is javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused: connect]

Please find a working setup, but consider the ability to set different modes authorization, too (as outlined in #28).

Hints: maybe we are missing config entries in spring.ldap.* (src) or we are missing a dependency org.springframework.ldap:spring-ldap-core (src). Or maybe both.