Did Graham or anyone ever post an answer to this question? I am still
stuck trying to figure out how to get the SASL object to the POP
authentication.
On May 18, 2006, at 2:51 PM, Achim Grolms wrote:
On Thursday 18 May 2006 13:27, Dennis Putnam wrote:
I was told some of you folks are working with Kerberos auth using
GSSAPI. I am trying to do the same thing with POP rather then LDAP
Using Authen::SASL as a programmer means
1. create a Authen::SASL object
my $sasl = Authen::SASL->new( mechanism => 'GSSAPI' );
2. Pass this SASL object to the constructor/authentication method
of Protocol object you want to use.
From my point of view the POD of Net::POP3 (2.28) has
no method to pass an Authen::SASL object to Net::POP3
That means that at the Moment the Net::POP3 module can't use
ojects Authen::SASL interface like Authen::SASL::Perl::GSSAPI.
Somthing like
$pop3object->bind( sasl => $sasl );
is missing.
@Graham:
-is that correct?
-can you add that to Net::POP3?
My working example (with Net::LDAP, now part
of the Authen::SASL::Perl::GSSAPI POD) is this:
#! /usr/bin/perl -w
use strict;
use Net::LDAP 0.33;
use Authen::SASL 2.10;
# -------- Adjust to your environment --------
my $adhost = 'theserver.bla.net';
my $ldap_base = 'dc=bla,dc=net';
my $ldap_filter = '(&(sAMAccountName=BLAAGROL))';
my $sasl = Authen::SASL->new( mechanism => 'GSSAPI' );
my $ldap;
eval {
$ldap = Net::LDAP->new( $adhost,
onerror => 'die',
) or die "Cannot connect to LDAP host
'$adhost':
'$@'";
$ldap->bind( sasl => $sasl );
};
if ($@) {
chomp $@;
die "\nBind error : $@",
"\nDetailed SASL error: ", $sasl->error,
"\nTerminated";
}
print "\nLDAP bind() succeeded, working in authenticated state";
my $mesg = $ldap->search( base => $ldap_base,
filter => $ldap_filter );
# -------- evaluate $mesg
Dennis Putnam
Sr. IT Systems Administrator
AIM Systems, Inc.
11675 Rainwater Dr., Suite 200
Alpharetta, GA 30004
Phone: 678-240-4112
Main Phone: 678-297-0700
FAX: 678-297-2666 or 770-576-1000
The information contained in this e-mail and any attachments is
strictly confidential. If you are not the intended recipient, any
use, dissemination, distribution, or duplication of any part of this
e-mail or any attachment is prohibited. If you are not the intended
recipient, please notify the sender by return e-mail and delete all
copies, including the attachments.