in reply to Dancer2::Plugin::Auth::Extensible::Provider::LDAP says "a successful bind must be completed"...

I guess something goes wrong when authenticating against LDAP, but the plugin you're using does not log the LDAP error message when binding.

As the plugin falls back on Net::LDAP anyway, maybe you can try this bare-bones version first, to find whether the password is wrong or anything like that:

#!perl use strict; use warnings; use Net::LDAP; my $host = 'xxx.xxx.xxx.xxx'; my %options = ( # fill these in ); my $ldap = Net::LDAP->new( $, %options } ) or die "LDAP connect failed for: " . $host; my $mesg = $ldap->bind( "cn=Test User,ou=user,ou=accounts,ou=our,dc=our,dc=domain,dc=com" +, password => 'secret admin password', ); warn "LDAP response when binding: " . $mesg->error; my $srch = $ldap->search( base => "c=US", # perform a search filter => "(&(sn=Barr)(o=Texas Instruments))" );
  • Comment on Re: Dancer2::Plugin::Auth::Extensible::Provider::LDAP says "a successful bind must be completed"...
  • Download Code

Replies are listed 'Best First'.
Re^2: Dancer2::Plugin::Auth::Extensible::Provider::LDAP says "a successful bind must be completed"...
by TieUpYourCamel (Scribe) on May 05, 2020 at 14:52 UTC
    Thanks for your suggestion Corion -- here are the results:
    camel@camelbox:~$ cat ldaptest.pl use strict; use warnings; use Net::LDAP; my $host = 'xxx.xxx.xxx.xxx'; my $ldap = Net::LDAP->new( $host ) or die "LDAP connect failed for: " . $host; my $mesg = $ldap->bind( "cn=Test User,ou=user,ou=accounts,ou=our,dc=our,dc=domain,dc=com" +, password => 'password', ); warn "LDAP response when binding: " . $mesg->error; my $srch = $ldap->search( base => "c=US", # perform a search filter => "(&(sn=Barr)(o=Texas Instruments))" ); camel@camelbox:~$ perl ldaptest.pl LDAP response when binding: Success at ldaptest.pl line 13, <DATA> lin +e 755. camel@camelbox:~$
    So it does perform a successful bind.