LEMONLDAP::NG : new Debian structure and LDAPS documentation

This commit is contained in:
Xavier Guimard 2007-04-29 12:07:20 +00:00
parent 3971e6b740
commit ef4b7876b6
27 changed files with 168 additions and 39 deletions

View File

@ -78,7 +78,7 @@ Modify your /etc/hosts file to include:
Edit /path/to/lemonldap-ng/source/example/conf/lmConfig-1 and specify your LDAP Edit /path/to/lemonldap-ng/source/example/conf/lmConfig-1 and specify your LDAP
settings. If you don't set managerDn and managerPassword, Lemonldap::NG will settings. If you don't set managerDn and managerPassword, Lemonldap::NG will
use an anonymous bind to find user dn. use an anonymous bind to find user dn.
(Debian users: /usr/share/doc/lemonldap-ng/example/conf/lmConfig-1) (Debian users: /var/lib/lemonldap-ng/conf/lmConfig-1)
WARNINGS: WARNINGS:
* only few parameters can be set by hand in the configuration file. You have * only few parameters can be set by hand in the configuration file. You have
to use the manager to change configuration, but since the example is yet to use the manager to change configuration, but since the example is yet

View File

@ -6,6 +6,7 @@ PORTALDIR=lemonldap-ng-portal
MANAGERDIR=lemonldap-ng-manager MANAGERDIR=lemonldap-ng-manager
EXAMPLEDIRBUILD=`pwd`/example/ EXAMPLEDIRBUILD=`pwd`/example/
EXAMPLEDIR=$(EXAMPLEDIRBUILD) EXAMPLEDIR=$(EXAMPLEDIRBUILD)
EXAMPLECONFDIR=$(EXAMPLEDIR)conf/
EXAMPLELANG=en EXAMPLELANG=en
all: handler manager portal all: handler manager portal
@ -82,11 +83,11 @@ manager_clean:
example: all example: all
mkdir -p example/portal example/manager example/handler example/conf mkdir -p example/portal example/manager example/handler example/conf
chmod 1777 example/conf chmod 1777 example/conf
cp -a ${HANDLERDIR}/example/* example/handler cp -a ${HANDLERDIR}/example/* ${EXAMPLEDIRBUILD}/handler
cp -a ${PORTALDIR}/example/* example/portal cp -a ${PORTALDIR}/example/* ${EXAMPLEDIRBUILD}/portal
cp -a ${MANAGERDIR}/example/* example/manager cp -a ${MANAGERDIR}/example/* ${EXAMPLEDIRBUILD}/manager
cp -a _example/* example cp -a _example/* ${EXAMPLEDIRBUILD}
find ${EXAMPLEDIRBUILD} -type f -exec perl -i -pe 's#__DIR__/?#'${EXAMPLEDIR}'#g' {} \; find ${EXAMPLEDIRBUILD} -type f -exec perl -i -pe 's#__DIR__/?#'${EXAMPLEDIR}'#g;s#__CONFDIR__/?#'${EXAMPLECONFDIR}'#g;' {} \;
@echo @echo
@echo "Example is ready." @echo "Example is ready."
@echo @echo
@ -101,7 +102,7 @@ example: all
@echo @echo
@echo "2 - Add test.example.com and auth.example.com in yout /etc/hosts :" @echo "2 - Add test.example.com and auth.example.com in yout /etc/hosts :"
@echo @echo
@echo " cat example/for_etc_hosts >> /etc/hosts" @echo " cat ${EXAMPLEDIRBUILD}/for_etc_hosts >> /etc/hosts"
@echo @echo
@echo "3 - edit ${EXAMPLEDIR}/conf/lmConf-1 and set ldapServer and ldapBase." @echo "3 - edit ${EXAMPLEDIR}/conf/lmConf-1 and set ldapServer and ldapBase."
@echo " or use the manager at http://manager.example.com/ (after apache restart)" @echo " or use the manager at http://manager.example.com/ (after apache restart)"
@ -147,7 +148,7 @@ manager_cpan: manager_conf
mv ${MANAGERDIR}/Lemonldap*.gz . mv ${MANAGERDIR}/Lemonldap*.gz .
static_example: example static_example: example
mkdir -p example/static mkdir -p ${EXAMPLEDIRBUILD}/static
cd example/static/;ln -s ../manager/imgs;cd - cd ${EXAMPLEDIRBUILD}/static/;ln -s ../manager/imgs;cd -
scripts/make_static_example.pl example/manager/index.pl example/static/index.html $(EXAMPLELANG) scripts/make_static_example.pl ${EXAMPLEDIRBUILD}/manager/index.pl ${EXAMPLEDIRBUILD}/static/index.html $(EXAMPLELANG)

View File

@ -6,7 +6,9 @@ TODO list for Lemonldap::NG development
Buttons to manage configurations (delete, next, previous, last,...) Buttons to manage configurations (delete, next, previous, last,...)
- Priority: Normal Status: In progress Created: 2007\04\21 13-05-54 - Priority: Normal Status: In progress Created: 2007\04\21 13-05-54
Help in english Help in english
- Priority: Low Status: N/A Created: 2007\04\21 13-14-55 - Priority: Low Status: Planning Created: 2007\04\21 13-14-55
Simplified manager interface fo rules: Simplified manager interface fo rules:
* simplified regexp (* instead of .*,...) * simplified regexp (* instead of .*,...)
* simple combobox to choose groups * simple combobox to choose groups
- Priority: Low Status: Planning Created: 2007\04\23 21-26-18
TLS in LDAP connection. SSL works, but start_tls cannot yet be called.

View File

@ -3,8 +3,12 @@ lemonldap-ng (0.8.1.2) unstable; urgency=low
* Little bug fix if whatToTrace parameter is not defined and display it in * Little bug fix if whatToTrace parameter is not defined and display it in
Manager interface Manager interface
* New: port is now checked in portal redirection * New: port is now checked in portal redirection
* Different configurations can now be used on the same server at the same
time
* New debian structure: lemonldap-ng is splitted in 5 packages and default
configuration file has moved to /var/lib/lemonldap-ng/conf/
-- Xavier Guimard <x.guimard@free.fr> Mon, 23 Apr 2007 21:20:24 +0200 -- Xavier Guimard <x.guimard@free.fr> Sun, 29 Apr 2007 14:00:39 +0200
lemonldap-ng (0.8.1.1) unstable; urgency=low lemonldap-ng (0.8.1.1) unstable; urgency=low

View File

@ -7,11 +7,39 @@ Standards-Version: 3.7.2
Package: lemonldap-ng Package: lemonldap-ng
Architecture: all Architecture: all
Depends: libapache-session-perl, libnet-ldap-perl, libdbi-perl, libwww-perl, libcache-cache-perl, libxml-simple-perl Depends: liblemonldap-ng-handler-perl, liblemonldap-ng-manager-perl, liblemonldap-ng-portal-perl
Provides: liblemonldap-ng-manager-perl, liblemonldap-ng-portal-perl, liblemonldap-ng-manager-perl
Conflicts: liblemonldap-ng-manager-perl, liblemonldap-ng-portal-perl, liblemonldap-ng-manager-perl
Recommends: libsoap-lite-perl, liblasso-perl
Description: Lemonldap::NG Web-SSO system Description: Lemonldap::NG Web-SSO system
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers. or directly on application apache servers.
Package: liblemonldap-ng-handler-perl
Architecture: all
Depends: libapache-session-perl, libwww-perl, libcache-cache-perl, liblemonldap-ng-manager-conf-perl
Description: Lemonldap::NG apache module part
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.
Package: liblemonldap-ng-manager-conf-perl
Architecture: all
Depends: libdbi-perl
Recommends: libsoap-lite-perl
Description: Lemonldap::NG apache manager part
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.
Package: liblemonldap-ng-manager-perl
Architecture: all
Depends: libxml-simple-perl, liblemonldap-ng-manager-conf-perl
Recommends: libcache-cache-perl, libapache-session-perl, libsoap-lite-perl
Description: Lemonldap::NG apache manager part
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.
Package: liblemonldap-ng-portal-perl
Architecture: all
Depends: libapache-session-perl, libnet-ldap-perl, liblemonldap-ng-manager-conf-perl
Recommends: liblasso-perl
Description: Lemonldap::NG apache authentication portal part
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.

View File

@ -0,0 +1 @@
example/*

View File

@ -0,0 +1 @@
example/handler/

View File

@ -0,0 +1,2 @@
debian/tmp/usr/share/perl5/Lemonldap/NG/Handler*
debian/tmp/usr/share/man/man3/Lemonldap::NG::Handler*

View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_input high liblemonldap-ng-manager-conf-perl/newDirInfo || true
db_go || true

View File

@ -0,0 +1,2 @@
/var/lib/lemonldap-ng

View File

@ -0,0 +1,3 @@
example/conf/
example/apache-session-mysql.sql
example/lmConfig.mysql

View File

@ -0,0 +1,5 @@
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/Conf*
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Conf*
debian/tmp/usr/share/man/man1/lmConfig_File2MySQL.1p
debian/tmp/usr/bin/lmConfig_File2MySQL
example/conf /var/lib/lemonldap-ng/

View File

@ -1,7 +1,10 @@
#!/bin/bash #!/bin/bash
# Maintainer: #DEBHELPER# # Maintainer: #DEBHELPER#
. /usr/share/debconf/confmodule
if [ "$1" = "configure" ] if [ "$1" = "configure" ]
then then
chown -R www-data /usr/share/doc/lemonldap-ng/examples/conf chown -R www-data /usr/share/doc/lemonldap-ng/examples/conf
fi fi

View File

@ -0,0 +1,5 @@
Template: liblemonldap-ng-manager-conf-perl/newDirInfo
Type: note
Description: Lemonldap::NG default configuration directory has moved to /var/lib/lemondap-ng/conf/
Description-fr: Le répertoire de configuration par défaut est maintenant /var/lib/lemondap-ng/conf/

View File

@ -0,0 +1 @@
example/manager

View File

@ -0,0 +1,13 @@
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager.pm
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/_i18n.pm
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/Help.pm
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/Base.pm
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/_HTML.pm
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/SOAPServer.pm
debian/tmp/usr/share/perl5/Lemonldap/NG/Manager/Restricted.pm
debian/tmp/usr/share/perl5/auto/Lemonldap/NG/Manager
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Base.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::SOAPServer.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Apache::Session::SOAP.3pm
debian/tmp/usr/share/man/man3/Lemonldap::NG::Manager::Restricted.3pm

View File

@ -0,0 +1 @@
example/portal

View File

@ -0,0 +1,3 @@
debian/tmp/usr/share/perl5/Lemonldap/NG/Portal*
debian/tmp/usr/share/perl5/auto/Lemonldap/NG/Portal
debian/tmp/usr/share/man/man3/Lemonldap::NG::Portal*

View File

@ -27,7 +27,6 @@ build-stamp: configure-stamp
# Add here commands to compile the package. # Add here commands to compile the package.
$(MAKE) INSTALLDIRS=vendor $(MAKE) INSTALLDIRS=vendor
#docbook-to-man debian/lemonldap-ng.sgml > lemonldap-ng.1
touch $@ touch $@
@ -49,8 +48,8 @@ install: build
# Add here commands to install the package into debian/lemonldap-ng. # Add here commands to install the package into debian/lemonldap-ng.
$(MAKE) test $(MAKE) test
$(MAKE) install DESTDIR=$(CURDIR)/debian/lemonldap-ng PREFIX=/usr $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr
$(MAKE) example EXAMPLEDIR=/usr/share/doc/lemonldap-ng/examples/ $(MAKE) example EXAMPLEDIR=/usr/share/doc/lemonldap-ng/examples/ EXAMPLECONFDIR=/var/lib/lemonldap-ng/conf
# Build architecture-independent files here. # Build architecture-independent files here.
@ -63,10 +62,10 @@ binary-arch: build install
dh_testroot dh_testroot
dh_installchangelogs dh_installchangelogs
dh_installdocs dh_installdocs
dh_installexamples example/* dh_installexamples
# dh_install dh_install
# dh_installmenu # dh_installmenu
# dh_installdebconf dh_installdebconf
# dh_installlogrotate # dh_installlogrotate
# dh_installemacsen # dh_installemacsen
# dh_installpam # dh_installpam

View File

@ -100,7 +100,7 @@ package for Debian works fine).</p>
$ tar xzf lemonldap-ng-*.tar.gz $ tar xzf lemonldap-ng-*.tar.gz
$ cd lemonldap-ng-* $ cd lemonldap-ng-*
$ debuild # or fakeroot dpkg-buildpackage $ debuild # or fakeroot dpkg-buildpackage
$ sudo dpkg -i ../lemonldap-ng*.deb $ sudo dpkg -i ../*lemonldap-ng*.deb
</pre> </pre>
</ol> </ol>

View File

@ -11,7 +11,7 @@ __PACKAGE__->init ( {
configStorage => { configStorage => {
type => 'File', type => 'File',
dirName => '__DIR__/conf', dirName => '__CONFDIR__',
}, },
https => 0, https => 0,

View File

@ -8,7 +8,7 @@ my $cgi = new Lemonldap::NG::Handler::CGI ( {
}, },
configStorage => { configStorage => {
type => 'File', type => 'File',
dirName => '__DIR__/conf', dirName => '__CONFDIR__',
}, },
https => 0, https => 0,
} }

View File

@ -6,7 +6,7 @@ my $h = new Lemonldap::NG::Manager(
{ {
configStorage => { configStorage => {
type => 'File', type => 'File',
dirName => "__DIR__/conf/", dirName => "__CONFDIR__",
}, },
dhtmlXTreeImageLocation => "/imgs/", dhtmlXTreeImageLocation => "/imgs/",
applyConfFile => '__DIR__/manager/apply.conf', applyConfFile => '__DIR__/manager/apply.conf',

View File

@ -5,7 +5,7 @@ use Lemonldap::NG::Manager::SOAPServer;
Lemonldap::NG::Manager::SOAPServer->start( Lemonldap::NG::Manager::SOAPServer->start(
configStorage => { configStorage => {
type => "File", type => "File",
dirName => "/usr/share/doc/lemonldap-ng/examples/conf/" dirName => "__CONFDIR__"
} }
); );

View File

@ -1,6 +1,7 @@
package Lemonldap::NG::Manager::Conf; package Lemonldap::NG::Manager::Conf;
use strict; use strict;
no strict 'refs';
use Storable qw(thaw freeze); use Storable qw(thaw freeze);
use MIME::Base64; use MIME::Base64;
use Lemonldap::NG::Manager::Conf::Constants; use Lemonldap::NG::Manager::Conf::Constants;
@ -28,7 +29,6 @@ sub new {
unless $self->{type} =~ /^Lemonldap/; unless $self->{type} =~ /^Lemonldap/;
eval "require $self->{type}"; eval "require $self->{type}";
die($@) if ($@); die($@) if ($@);
unshift @ISA, $self->{type};
return 0 unless $self->prereq; return 0 unless $self->prereq;
$self->{mdone}++; $self->{mdone}++;
} }
@ -79,6 +79,38 @@ sub getConf {
return $conf; return $conf;
} }
sub prereq {
return &{$_[0]->{type}.'::prereq'}(@_);
}
sub available {
return &{$_[0]->{type}.'::available'}(@_);
}
sub lastCfg {
return &{$_[0]->{type}.'::lastCfg'}(@_);
}
sub lock {
return &{$_[0]->{type}.'::lock'}(@_);
}
sub isLocked {
return &{$_[0]->{type}.'::isLocked'}(@_);
}
sub unlock {
return &{$_[0]->{type}.'::unlock'}(@_);
}
sub store {
return &{$_[0]->{type}.'::store'}(@_);
}
sub load {
return &{$_[0]->{type}.'::load'}(@_);
}
1; 1;
__END__ __END__

View File

@ -2,7 +2,7 @@ package Lemonldap::NG::Manager::Help;
use AutoLoader qw(AUTOLOAD); use AutoLoader qw(AUTOLOAD);
use UNIVERSAL qw(can); use UNIVERSAL qw(can);
our $VERSION = '0.31'; our $VERSION = '0.32';
sub import { sub import {
my ($caller_package) = caller; my ($caller_package) = caller;
@ -324,25 +324,41 @@ EOT
sub help_ldap_en { sub help_ldap_en {
print <<EOT; print <<EOT;
<h3>LDAP Parameters</h3> <h3>LDAP Parameters</h3>
This help chapter does not exist in english. If you want to help us, you can <p>LDAP parameters are used to identify users. They must be set even if
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us authentication is done by another system (SSL for example).</p>
your contribution.<br> <ul>
Thanks. <li>LDAP base : required (except if your server accepts the requests without
base). Example&nbsp;:
<pre> dc=example, dc=com </pre></li>
<li>LDAP server port : 389 by default&nbsp;;</li>
<li>LDAP server : Name (or IP address) of the LDAP server. To use LDAPS, set
here&nbsp;:
<pre> ldaps://server/</pre>
and don't forget to change port (636 for example)</li>
<li>LDAP account : optional, must be set if anonymous connection cannot
access to the wanted LDAP attributes. This account is used before LDAP
authentication to find user's dn&nbsp;;
</li>
<li>LDAP password : password corresponding to the account above.
</ul>
EOT EOT
} }
sub help_ldap_fr { sub help_ldap_fr {
print <<EOT; print <<EOT;
<h3>Param&egrave;tres LDAP</h3> <h3>Param&egrave;tres LDAP</h3>
<p> Le param&egrave;tres LDAP servent &agrave; identifier les utilisateurs. Ils doivent &ecirc;tre <p> Les param&egrave;tres LDAP servent &agrave; identifier les utilisateurs.
renseign&eacute;s m&ecirc;me si l'authentification est r&eacute;alis&eacute;e par un autre moyen (SSL par Ils doivent &ecirc;tre renseign&eacute;s m&ecirc;me si l'authentification est
exemple).</p> r&eacute;alis&eacute;e par un autre moyen (SSL par exemple).</p>
<ul> <ul>
<li>Base de recherche LDAP : obligatoire (&agrave; moins que votre serveur LDAP <li>Base de recherche LDAP : obligatoire (&agrave; moins que votre serveur LDAP
accepte les requ&ecirc;tes sans base)&nbsp;; exemple&nbsp;: accepte les requ&ecirc;tes sans base). Exemple&nbsp;:
<pre> dc=example, dc=com </pre></li> <pre> dc=example, dc=com </pre></li>
<li>Port du serveur LDAP : 389 par d&eacute;faut&nbsp;;</li> <li>Port du serveur LDAP : 389 par d&eacute;faut&nbsp;;</li>
<li>Serveur LDAP : Nom (ou adresse IP) du serveur LDAP&nbsp;;</li> <li>Serveur LDAP : Nom (ou adresse IP) du serveur LDAP. Pour une connexion
LDAPS, indiquez ici&nbsp;:
<pre> ldaps://server/</pre>
et n'oubliez pas de changer le port (636 en général)</li>
<li>Compte de connexion LDAP : optionnel, &agrave; renseigner si les attributs LDAP <li>Compte de connexion LDAP : optionnel, &agrave; renseigner si les attributs LDAP
utilis&eacute;s ne sont pas accessibles par une session anonyme. Ce compte est utilis&eacute;s ne sont pas accessibles par une session anonyme. Ce compte est
utilis&eacute; avant l'authentification pour trouver le dn de l'utilisateur&nbsp;; utilis&eacute; avant l'authentification pour trouver le dn de l'utilisateur&nbsp;;

View File

@ -6,7 +6,7 @@ my $portal = Lemonldap::NG::Portal::SharedConf->new(
{ {
configStorage => { configStorage => {
type => 'File', type => 'File',
dirName => '__DIR__/conf/', dirName => '__CONFDIR__',
} }
} }
); );