Apache-AuthNetLDAP
view release on metacpan or search on metacpan
AuthNetLDAP.pm view on Meta::CPAN
=item PerlSetVar UseStartTLS
Optional; can be yes or no. If yes, will fail unless can start a TLS
encrypted connection to the LDAP server before sending passwords over
the network. Note that this requires that the optional module
IO::Socket::SSL is installed; this depends on Net::SSLeay, which
depends on openssl. Of course, the LDAP server must support Start TLS
also.
=back
=head2 Uses for UIDAttr
For example if you set the UIDAttr to uid, and a user enters the UID
nicku, then the LDAP search filter will lookup a user using the search
filter:
(uid=nicku)
Normally you will use the uid attribute, but you may want (need) to use a different attribute depending on your LDAP server or to synchronize with different applications. For example some versions of Novell's LDAP servers that I've encountered stored...
=head1 INSTALLATION
It's a pretty straightforward install if you already have mod_perl and Net::LDAP already installed.
After you have unpacked the distribution type:
perl Makefile.PL
make
make test
make install
Then in your httpd.conf file or .htaccess file, in either a <Directory> or <Location> section put:
AuthName "LDAP Test Auth"
AuthType Basic
#only set the next two if you need to bind as a user for searching
#PerlSetVar BindDN "uid=user1,ou=people,o=acme.com" #optional
#PerlSetVar BindPWD "password" #optional
PerlSetVar BaseDN "ou=people,o=acme.com"
PerlSetVar LDAPServer ldap.acme.com
PerlSetVar LDAPPort 389
PerlSetVar UIDAttr uid
PerlSetVar UseStartTLS yes # Assuming you installed IO::Socket::SSL, etc.
# Set if you want base or one level scope for search:
PerlSetVar SearchScope one # default is sub
# Set if you want to limit access to a subset of users:
#PerlSetVar LDAPFilter "(&(course=CSA)(class=A))" #optional
# Set if you want to allow an alternate method of authentication
PerlSetVar AllowAlternateAuth yes | no
require valid-user
PerlAuthenHandler Apache::AuthNetLDAP
If you don't have mod_perl or Net::LDAP installed on your system, then the Makefile will prompt you to
install each of these modules. At this time, March 8, 2004, you may say yes to Net::LDAP, and yes for
mod_perl, if you are installing this module on apache 1.3. (The reason being, that mod_perl 2 is under
development, and is not ready for download from CPAN at this time. Therefore, your install of mod_perl,
as initiated with the Makefile.PL, will fail. If you are going to install mod_perl 2, which is needed
to work with Apache2, you will need to download it from: http://perl.apache.org/download/index.html.
(Installation is beyond the scope of this document, but you can find documentation at:
http://perl.apache.org/docs/2.0/user/install/install.html#Installing_mod_perl_from_Source.)
Otherwise installation is the same.
You may also notice that the Makefile.PL will ask you to install ExtUtils::AutoInstall. This is
necessary for the installation process to automatically install any of the dependencies that you
are prompted for. You may choose to install the module, or not.
=head1 HOMEPAGE
Module Home: http://search.cpan.org/author/SPEEVES/
=head1 AUTHOR
Mark Wilcox mewilcox@unt.edu and
Shannon Eric Peevey speeves@unt.edu
=head1 SEE ALSO
L<Net::LDAP>
=head1 ACKNOWLEDGMENTS
Graham Barr for writing Net::LDAP module.
Henrik Strom for writing the Apache::AuthPerLDAP module which I derived this from.
The O'Reilly "Programming Modules for Apache with Perl and C" (http://www.modperl.com).
Mark Wilcox for being the "Godfather" of Central Web Support... ;)
Stas Beckman for having the patience to answer my many questions.
Everyone else on the modperl mailing list... You know who you are :)
=head1 WARRANTY AND LICENSE
You can distribute and modify in accordance to the same license as Perl. Though I would like to know how you are using the module or if you are using the module at all.
Like most of the stuff on the 'net, I got this copy to work for me without destroying mankind, you're mileage may vary.
=cut
1;
__END__
( run in 0.781 second using v1.01-cache-2.11-cpan-483215c6ad5 )