Achim, or anyone, have you been able to get GSSAPI to work using activestate
perl on a windows system?  What requirements are there?

Thanks,
Don

-----Original Message-----
From: Achim Grolms [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 18, 2006 11:52 AM
To: Dennis Putnam; Graham Barr
Cc: perl-ldap@perl.org
Subject: Re: GSSAPI programming help

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 

Reply via email to