Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Setting security options when using ldap with sasl
How can I set SASL security options ?  I want to use ldap with SASL/GSSAPI
and control the maxssf security setting.
Is this part of Net::LDAP or Authen::SASL ?

Thank you
Markus



Report this thread to moderator Post Follow-up to this message
Old Post
Markus Moeller
02-29-08 01:53 AM


Re: Setting security options when using ldap with sasl
At the moment I use Authen:SASL as follows

use Net::LDAPS;
use Authen::SASL;
use Authen::Krb5;
....
$ldap = Net::LDAPS->new( $server,
port => 636,
timeout => 2,
verify => 'never',
version => 3) or die "$@";

$sasl = Authen::SASL->new('GSSAPI', 'user' => '');
$mesg = $ldap->bind( '',
sasl => $sasl) ;

$mesg->code && die $mesg->error;
...

and get the error:

00002029: LdapErr: DSID-0C09016D, comment: Cannot start kerberos
signing/sealing when using TLS/SSL, data 0, vece at ./LDAP-AD-query.pl line
82.

I read that there is a property setting possible with Authen::SASL but can't
find an example how to outside of Net::LDAP.

Would it be possible to modify Net::LDAP to set SSF to 0 if LDAPS or
start_tls is used  ?

Thank you
Markus



Report this thread to moderator Post Follow-up to this message
Old Post
Markus Moeller
03-03-08 12:30 AM


Re: Setting security options when using ldap with sasl
Does nobody else experienced my problem ? Any hint how I could debug it ?

Thank you
Markus


"Markus Moeller" <huaraz@moeller.plus.com> wrote in message
news:fqev0p$7sq$1@ger.gmane.org...
> At the moment I use Authen:SASL as follows
>
> use Net::LDAPS;
> use Authen::SASL;
> use Authen::Krb5;
> ....
> $ldap = Net::LDAPS->new( $server,
>                          port => 636,
>                          timeout => 2,
>                          verify => 'never',
>                          version => 3) or die "$@";
>
> $sasl = Authen::SASL->new('GSSAPI', 'user' => '');
> $mesg = $ldap->bind( '',
>                      sasl => $sasl) ;
>
> $mesg->code && die $mesg->error;
> ...
>
> and get the error:
>
> 00002029: LdapErr: DSID-0C09016D, comment: Cannot start kerberos
> signing/sealing when using TLS/SSL, data 0, vece at ./LDAP-AD-query.pl
> line
> 82.
>
> I read that there is a property setting possible with Authen::SASL but
> can't find an example how to outside of Net::LDAP.
>
> Would it be possible to modify Net::LDAP to set SSF to 0 if LDAPS or
> start_tls is used  ?
>
> Thank you
> Markus
>
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Markus Moeller
04-23-08 12:40 AM


Re: Setting security options when using ldap with sasl
I got i bit further with my problem. I firstly modified NET::LDAP.pm (line
392) by adding ssf to the connection property when using SASL.

$sasl_conn->property(
sockname => $ldap->{net_ldap_socket}->sockname,
peername => $ldap->{net_ldap_socket}->peername,
ssf => 0,
);

This fails with an decode error during bind

Decoding error at ./LDAP-AD-query.pl line 87.

But when using SASL::Perl and modifying NET::LDAP.pm by adding maxssf to the
connection property I can connect with SSL and SASL/GSSAPI  to Active
Directory.

$sasl_conn->property(
sockname => $ldap->{net_ldap_socket}->sockname,
peername => $ldap->{net_ldap_socket}->peername,
maxssf => 0,
);

Now my question is what is the best method to get the maxssf setting from my
perl script into the LDAP connection setup ?  I would think the best would
be to add an option to SASL->new e.g. connection_property = { maxssf => 0,
....}  which can the be used in LDAP.pm e.g.

$sasl_conn->property(
sockname => $ldap->{net_ldap_socket}->sockname,
peername => $ldap->{net_ldap_socket}->peername,
);
loop over connection_property {
$sasl_conn->property(
$sasl->connection_property ->name[$i] =>
$sasl->connection_property ->value[$i],
);
}


As you can see I am not a perl programmer. Any suggestion how to best
implement this ?

Thank you
Markus

"Markus Moeller" <huaraz@moeller.plus.com> wrote in message
news:fulmai$7q5$1@ger.gmane.org...
> Does nobody else experienced my problem ? Any hint how I could debug it ?
>
> Thank you
> Markus
>
>
> "Markus Moeller" <huaraz@moeller.plus.com> wrote in message
> news:fqev0p$7sq$1@ger.gmane.org... 
>
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Markus Moeller
04-28-08 01:01 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

LDAP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:18 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.