Description
In situation when OpenLDAP is configured with "disallow bind_anon" in slapd.conf, the bind operation will return "LDAP_INAPPROPRIATE_AUTH - anonymous bind disallowed".
According to https://www.openldap.org/doc/admin23/security.html#Authentication%20Methods a anonymous bind is not fatal for an LDAP server and server will still respond to search or other operations, according to ACLs.
Quoting: "Note that disabling the anonymous bind mechanism does not prevent anonymous access to the directory."
Can you remove the line return result unless result.result_code == Net::LDAP::ResultCodeSuccess
from use_connection
method?
https://github.com/ruby-ldap/ruby-net-ldap/blob/master/lib/net/ldap.rb#L1310
To be able to perform search and other operation even after bind has failed?