{"record":{"id":"5285e21838cfeb3a","repo":"CanineHQ/canine","slug":"ldap-no-reader-credentials-and-anonymous-reads-di","errorCode":null,"errorMessage":"LDAP: no reader credentials and anonymous reads disabled","messagePattern":"LDAP: no reader credentials and anonymous reads disabled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/services/ldap/authenticator.rb","lineNumber":131,"sourceCode":"      options = {\n        host: config.host,\n        port: config.port\n      }\n\n      encryption = net_ldap_encryption\n      options[:encryption] = encryption if encryption\n\n      if config.bind_dn.present? && config.bind_password.present?\n        options[:auth] = {\n          method: :simple,\n          username: config.bind_dn,\n          password: config.bind_password\n        }\n      elsif !config.allow_anonymous_reads?\n        # No way to bind safely\n        # Let caller see failure via bind result\n        logger.info \"LDAP: no reader credentials and anonymous reads disabled\"\n        raise \"LDAP: no reader credentials and anonymous reads disabled\"\n      end\n\n      Net::LDAP.new(options)\n    end\n\n    def build_user_auth_connection(user_dn, password)\n      options = {\n        host: config.host,\n        port: config.port\n      }\n\n      encryption = net_ldap_encryption\n      options[:encryption] = encryption if encryption\n\n      ldap = Net::LDAP.new(options)\n      ldap.auth(user_dn, password)\n      ldap\n    end","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/CanineHQ/canine/blob/ba4ee3968d8513ee27d8583fbd3e854a8dd053f3/app/services/ldap/authenticator.rb#L113-L149","documentation":"Error \"LDAP: no reader credentials and anonymous reads disabled\" thrown in CanineHQ/canine.","triggerScenarios":"Thrown at app/services/ldap/authenticator.rb:131 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ba4ee3968d8513ee27d8583fbd3e854a8dd053f3","analyzedAt":"2026-08-23T17:49:27.834Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}