diff --git a/build/lemonldap-ng/INSTALL b/build/lemonldap-ng/INSTALL index db738a904..7267327f6 100644 --- a/build/lemonldap-ng/INSTALL +++ b/build/lemonldap-ng/INSTALL @@ -168,8 +168,8 @@ else for a complete install: See prereq in §1.1.2 -2.3 - LEMONLDAP INSTALLATION ----------------------------- +2.3 - LEMONLDAP::NG INSTALLATION +-------------------------------- 2.3.1 - Database configuration @@ -202,7 +202,7 @@ example with MySQL: dbiPassword => "mypass", } ); -Securise Manager access with Apache: Lemonldap does not securise the manager +Securise Manager access with Apache: Lemonldap::NG does not securise the manager itself yet: SSLEngine On diff --git a/build/lemonldap-ng/TODO b/build/lemonldap-ng/TODO index 6af3d81db..122434cc7 100644 --- a/build/lemonldap-ng/TODO +++ b/build/lemonldap-ng/TODO @@ -2,10 +2,8 @@ Lemonldap::NG TODO ------------------ TODO list for Lemonldap::NG development -- Priority: High Status: In progress Created: 2007\04\21 13-13-25 -Buttons to manage configurations (delete, next, previous, last,...) - - Priority: Low Status: N/A Created: 2007\05\03 11-40-36 - Delete buttons in virtualHosts if 'read"-"only' +- Priority: Low Status: N/A Created: 2007\05\03 11-40-36 +Delete buttons in virtualHosts if 'read"-"only' - Priority: Normal Status: Planning Created: 2007\05\03 12-28-30 Modify example to use nameVirtualHost instead of 127.0.0.x adresses - Priority: Normal Status: In progress Created: 2007\05\03 10-41-36 diff --git a/build/lemonldap-ng/_example/index.pl b/build/lemonldap-ng/_example/index.pl index 10ee56529..5d2fea6ab 100755 --- a/build/lemonldap-ng/_example/index.pl +++ b/build/lemonldap-ng/_example/index.pl @@ -40,7 +40,7 @@ foreach(keys %$headers) { \n" } print ' -

Note that lemonldap cookie is hidden. So that application developpers can +

Note that Lemonldap::NG cookie is hidden. So that application developpers can not spoof sessions.

You can access to any information (IP address or LDAP attribute) by customizing exported headers with the diff --git a/build/lemonldap-ng/debian/changelog b/build/lemonldap-ng/debian/changelog index 4b818f8a1..59c70532c 100644 --- a/build/lemonldap-ng/debian/changelog +++ b/build/lemonldap-ng/debian/changelog @@ -9,6 +9,7 @@ lemonldap-ng (0.8.1.2) unstable; urgency=low * New debian structure: lemonldap-ng is splitted in 5 packages, default configuration file has moved to /var/lib/lemonldap-ng/conf/ and first configuration file is managed by debconf + * Buttons to manage configurations in manager (next, previous, last, delete) -- Xavier Guimard Thu, 03 May 2007 10:39:51 +0200 diff --git a/build/lemonldap-ng/doc/overview.html b/build/lemonldap-ng/doc/overview.html index 39c794363..11956c3a5 100644 --- a/build/lemonldap-ng/doc/overview.html +++ b/build/lemonldap-ng/doc/overview.html @@ -37,9 +37,9 @@ authenticates user with a ldap bind by default, but you can also use another authentication sheme like using x509 user certificates (see Lemonldap::NG::Portal::AuthSSL(3) for more).

-

Lemonldap use session cookies generated by Apache::Session so as secure as a -128-bit random cookie. You may use the securedCookie options to avoid session -hijacking.

+

Lemonldap::NG use session cookies generated by Apache::Session so as secure +as a 128-bit random cookie. You may use the securedCookie options to avoid +session hijacking.

You have to manage life of sessions by yourself since Lemonldap::NG knows nothing about the L module you've choosed, but it's very easy diff --git a/modules/lemonldap-ng-handler/README b/modules/lemonldap-ng-handler/README index 4ea047b11..56fcf3151 100644 --- a/modules/lemonldap-ng-handler/README +++ b/modules/lemonldap-ng-handler/README @@ -54,7 +54,7 @@ authenticates user with a ldap bind by default, but you can also use another authentication sheme like using x509 user certificates (see Lemonldap::NG::Portal::AuthSSL(3) for more). -Lemonldap use session cookies generated by Apache::Session so as secure as a +Lemonldap::NG use session cookies generated by Apache::Session so as secure as a 128-bit random cookie. You may use the securedCookie options to avoid session hijacking. diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler.pm index 8bf5e02df..71cc0a715 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler.pm @@ -96,8 +96,8 @@ authenticates user with a ldap bind by default, but you can also use another authentication sheme like using x509 user certificates (see L for more). -Lemonldap use session cookies generated by L so as secure as a -128-bit random cookie. You may use the C options of +Lemonldap::NG use session cookies generated by L so as secure +as a 128-bit random cookie. You may use the C options of L to avoid session hijacking. You have to manage life of sessions by yourself since Lemonldap::NG knows diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm index 6a8e50219..419bd575d 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm @@ -417,7 +417,7 @@ sub forbidden { return FORBIDDEN; } -# hideCookie : hide Lemonldap cookie to the protected application +# hideCookie : hide Lemonldap::NG cookie to the protected application sub hideCookie { my $class = shift; $class->lmLog( "$class: removing cookie", 'debug' ); @@ -521,7 +521,7 @@ sub run ($$) { $class->sendHeaders; # SECURITY - # Hide Lemonldap cookie + # Hide Lemonldap::NG cookie $class->hideCookie; OK; } @@ -695,7 +695,7 @@ method itself. =item B (default: lemon) -Name of the cookie used by the Lemonldap infrastructure. +Name of the cookie used by the Lemonldap::NG infrastructure. =item B (required) diff --git a/modules/lemonldap-ng-manager/Changes b/modules/lemonldap-ng-manager/Changes index 442ff7130..8cc84e2ab 100644 --- a/modules/lemonldap-ng-manager/Changes +++ b/modules/lemonldap-ng-manager/Changes @@ -9,6 +9,7 @@ Revision history for Perl extension Lemonldap::NG::Manager. - whatToTrace parameter in configuration interface - Fix tree bug when an hash ref is not defined - More tests + - Next and previous conf 0.61 Thu Mar 29 21:45:44 2007 - configuration is checked before saving diff --git a/modules/lemonldap-ng-manager/README b/modules/lemonldap-ng-manager/README index 05394eea6..329099918 100644 --- a/modules/lemonldap-ng-manager/README +++ b/modules/lemonldap-ng-manager/README @@ -53,7 +53,7 @@ authenticates user with a ldap bind by default, but you can also use another authentication sheme like using x509 user certificates (see Lemonldap::NG::Portal::AuthSSL(3) for more). -Lemonldap use session cookies generated by Apache::Session so as secure as a +Lemonldap::NG use session cookies generated by Apache::Session so as secure as a 128-bit random cookie. You may use the securedCookie options to avoid session hijacking. diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm index 42389de2e..5fe5d8100 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm @@ -100,11 +100,27 @@ sub print_help { eval { no strict "refs"; &{"help_$chap"} }; } +# Delete subroutine + +sub print_delete { + my $self = shift; + print $self->header; + Lemonldap::NG::Manager::Help::import( $ENV{HTTP_ACCEPT_LANGUAGE} ) + unless ( $self->can('help_groups') ); + if ( $self->config->delete ( $self->param ( 'cfgNum' ) ) ) { + print &txt_configurationDeleted; + } + else { + print &txt_configurationNotDeleted; + } + exit; +} + # Configuration download subroutines sub print_conf { my $self = shift; print $self->header( -type => "text/xml", '-Cache-Control' => 'private' ); - $self->printXmlConf; + $self->printXmlConf( { cfgNum => $self->param ( 'cfgNum' ), } ); exit; } @@ -118,7 +134,7 @@ sub default { sub printXmlConf { my $self = shift; print XMLout( - $self->buildTree, + $self->buildTree( @_ ), #XMLDecl => "", RootName => 'tree', KeyAttr => { item => 'id', username => 'name' }, @@ -128,7 +144,7 @@ sub printXmlConf { sub buildTree { my $self = shift; - my $config = $self->config->getConf(); + my $config = $self->config->getConf( @_ ); $config = $self->default unless ($config); my $tree = { id => '0', diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm index bbe231c73..9dfb30a10 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm @@ -65,6 +65,10 @@ sub getConf { my ( $self, $args ) = @_; $args->{cfgNum} ||= $self->lastCfg; return undef unless $args->{cfgNum}; + if ( $args->{cfgNum}<0 ) { + my @a = $self->available(); + $args->{cfgNum} = ( @a + $args->{cfgNum} >0 ) ? ( $a[ $#a + $args->{cfgNum} ] ) : $a[0]; + } my $fields = $self->load( $args->{cfgNum}, $args->{fields} ); my $conf; while ( my ( $k, $v ) = each(%$fields) ) { @@ -111,6 +115,13 @@ sub load { return &{$_[0]->{type}.'::load'}(@_); } +sub delete { + my($self, $c) = @_; + my @a = $self->available(); + return 0 unless ( @a + $c >0 ); + return &{$self->{type}.'::delete'}( $self, $a[ $#a + $c ] ); +} + 1; __END__ diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/DBI.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/DBI.pm index 97948e7f7..d4548043d 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/DBI.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/DBI.pm @@ -6,7 +6,7 @@ use Storable qw(freeze thaw); use MIME::Base64; use Lemonldap::NG::Manager::Conf::Constants; -our $VERSION = 0.13; +our $VERSION = 0.14; sub prereq { my $self = shift; @@ -106,6 +106,11 @@ sub load { return $row; } +sub delete { + my ( $self, $cfgNum ) = @_; + $self->dbh->do( "DELETE from " . $self->{dbiTable} . " WHERE cfgNum=$cfgNum" ); +} + sub logError { my $self = shift; print STDERR "Database error: " . $self->dbh->errstr . "\n"; diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/File.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/File.pm index cfdffe06c..8b3072384 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/File.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/File.pm @@ -3,7 +3,7 @@ package Lemonldap::NG::Manager::Conf::File; use strict; use Lemonldap::NG::Manager::Conf::Constants; -our $VERSION = 0.21; +our $VERSION = 0.22; sub prereq { my $self = shift; @@ -96,4 +96,9 @@ sub load { return $f; } +sub delete { + my ( $self, $cfgNum ) = @_; + unlink ( $self->{dirName} . "/lmConf-$cfgNum" ); +} + __END__ diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Help.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Help.pm index ae851508d..78e85a180 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Help.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Help.pm @@ -54,7 +54,7 @@ sub help_authParams_fr {

Paramètres d'authentification

Type d'authentification
-
Le schéma classique d'authentification Lemonldap;;NG consiste à utiliser une +
Le schéma classique d'authentification Lemonldap::NG consiste à utiliser une authentification par LDAP. Vous pouvez changer ceci en "SSL" par exemple.
Portail
@@ -277,7 +277,7 @@ corresponding parameters :