I was able to make my Springboot API authenticate against 2 different Ldaps (for example with AD and OpenLdap) and that is working fine.

In order for Spring Actuator to be able to report on status of my Ldaps, in my application.properties, I have setup ldap properties for username, password and urls like:

spring.ldap.username1=user1
spring.ldap.password1=pass1
spring.ldap.username2=user2,ou=people,o=internet
spring.ldap.password2=pass2
spring.ldap.urls=ldap-url1 ldap-url2

While this let's me authenticate with both Ldaps successfully, I would also expect my Actuator /health endpoint to report status of both Ldaps, but currently I am getting only one reported like:

"ldap": {
  "details": {
    "version": 3
  },
  "status": "UP"
}

I would expect it to report status on both Ldaps in question, something like:

"ldap": {
  "details": {
    "version": 3
  },
  "status": "UP"
},
"ldap": {
  "details": {
    "version": 2
  },
  "status": "UP"
}

However, that is not being picked up.

Also, how would I expect to be able to see which Ldap is being reported by some tag or name distinguishing between these two.

Comment From: snicoll

@dbnex14 LdapHealthContributorAutoConfiguration takes a map of LdapOperations as the health check run on that. If you expose two beans (one for earch server) then things should be exposed as you expect. If that doesn't work, please share a small sample that we can run ourselves (either a zip or a link to a GitHub repo) and we can reopen to review it.