Commit 90522e3e authored by Xavier Guimard's avatar Xavier Guimard

* Help system skeleton in Manager

 * Correction in apache-1.3 configuration file
 * Rights corrections in example files (Apache::Registry needs +x for apache-1.3
 * perltidy on all files
parent f1a9171c
Revision history for Perl extension Lemonldap::NG::Handler.
0.72 Thu Jan 4 9:24:18 2007
- Correction in apache-1.3 configuration example file
0.71 Sun Dec 31 13:47:49 2006
- Bug corrections in Vhosts: default header does not work
Safe does not work because lmSetHeaderIn
......
Changes
example/lmH-apache.conf
example/lmH-apache2.conf
example/MyHandler.pm
lib/Lemonldap/NG/Handler.pm
lib/Lemonldap/NG/Handler/Proxy.pm
......
#Listen 127.0.0.3:80
# On Apache2, uncomment this:
# PerlOptions +GlobalRequest
<VirtualHost 127.0.0.3:*>
ServerName test.example.com
PerlRequire __DIR__/handler/MyHandler.pm
PerlInitHandler My::Package
<Location /reload>
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
PerlInitHandler My::Package->refresh
</Location>
# Just to make example running (index.pl display authenticated user)
DocumentRoot __DIR__
<Directory __DIR__>
Order allow,deny
Allow from all
Options +ExecCGI
</Directory>
<Files *.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlHandler Apache::Registry
</Files>
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
PerlInitHandler My::Package
<Location /reload>
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
PerlInitHandler My::Package->refresh
</Location>
</VirtualHost>
PerlOptions +GlobalRequest
<VirtualHost 127.0.0.3:*>
ServerName test.example.com
PerlRequire __DIR__/handler/MyHandler.pm
PerlInitHandler My::Package
<Location /reload>
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
PerlInitHandler My::Package->refresh
</Location>
# Just to make example running (index.pl display authenticated user)
DocumentRoot __DIR__
<Directory __DIR__>
Order allow,deny
Allow from all
</Directory>
<Files *.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
</Files>
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
</VirtualHost>
package Lemonldap::NG::Handler;
print STDERR "See Lemonldap::NG::Handler(3) to know which Lemonldap::NG::Handler::* module to use.";
our $VERSION = "0.71";
print STDERR
"See Lemonldap::NG::Handler(3) to know which Lemonldap::NG::Handler::* module to use.";
our $VERSION = "0.72";
1;
......
......@@ -53,7 +53,10 @@ sub run($$) {
$_[1] =~ s/lemon=[^;]*;?// if ( $_[0] =~ /Cookie/i );
return 1 if ( $_[1] =~ /^$/ );
$request->header(@_) unless ( $_[0] =~ /^(Host|Referer)$/i );
$class->lmLog( "$class: header pushed to the server: " . $_[0] . ": " . $_[1], 'debug' );
$class->lmLog(
"$class: header pushed to the server: " . $_[0] . ": " . $_[1],
'debug'
);
1;
}
);
......@@ -90,7 +93,7 @@ sub cb_content {
sub headers {
$class = shift;
my $response = shift;
my $tmp = $response->header('Content-Type');
my $tmp = $response->header('Content-Type');
$r->content_type($tmp) if ($tmp);
# Modif demandée par mail
......@@ -99,7 +102,8 @@ sub headers {
$r->status_line( join ' ', $response->code, $response->message );
# Scan LWP response headers to generate Apache response headers
my ( $location_old, $location_new ) = split /[;,]+/, $r->dir_config('LmLocationToReplace');
my ( $location_old, $location_new ) = split /[;,]+/,
$r->dir_config('LmLocationToReplace');
$response->scan(
sub {
......@@ -107,7 +111,10 @@ sub headers {
$_[1] =~ s#$location_old#$location_new#
if ( $location_old and $location_new and $_[0] =~ /Location/i );
lmSetErrHeaderOut( $r, @_ );
$class->lmLog( "$class: header pushed to the client: " . $_[0] . ": " . $_[1], 'debug' );
$class->lmLog(
"$class: header pushed to the client: " . $_[0] . ": " . $_[1],
'debug'
);
1;
}
);
......
......@@ -18,19 +18,20 @@ our $lmConf;
BEGIN {
if ( MP() == 2 ) {
eval {
require threads::shared;
eval {
require threads::shared;
Apache2::compat->import();
threads::shared::share($childLock);
threads::shared::share($childLock);
threads::shared::share($childLock);
threads::shared::share($childLock);
threads::shared::share($childLock);
};
};
}
*EXPORT_TAGS = *Lemonldap::NG::Handler::Simple::EXPORT_TAGS;
*EXPORT_OK = *Lemonldap::NG::Handler::Simple::EXPORT_OK;
push( @{ $EXPORT_TAGS{$_} }, qw($reloadTime $lastReload) ) foreach (qw(variables localStorage));
push( @{ $EXPORT_TAGS{$_} }, qw($reloadTime $lastReload) )
foreach (qw(variables localStorage));
push @EXPORT_OK, qw($reloadTime $lastReload);
}
......@@ -44,8 +45,8 @@ sub init($$) {
}
sub localInit {
my($class, $args) = @_;
$lmConf = Lemonldap::NG::Manager::Conf->new ( $args->{configStorage} );
my ( $class, $args ) = @_;
$lmConf = Lemonldap::NG::Manager::Conf->new( $args->{configStorage} );
$class->defaultValuesInit($args);
$class->SUPER::localInit($args);
}
......@@ -79,7 +80,8 @@ sub localConfUpdate($$) {
my ( $class, $r ) = @_;
my $args;
return SERVER_ERROR unless ($refLocalStorage);
unless ( $args = $refLocalStorage->get("conf") and $class->confTest($args) ) {
unless ( $args = $refLocalStorage->get("conf") and $class->confTest($args) )
{
# TODO: LOCK
#unless ( $class->confTest($args) ) {
......@@ -97,7 +99,7 @@ sub globalConfUpdate {
my $tmp = $class->getConf;
# getConf can return an Apache constant in case of error
return $tmp unless (ref($tmp));
return $tmp unless ( ref($tmp) );
$class->setConf($tmp);
OK;
}
......@@ -112,9 +114,9 @@ sub setConf {
sub getConf {
my $class = shift;
my $tmp = $lmConf->getConf;
unless(ref($tmp)) {
$class->lmLog( "$class: Unable to load configuration", 'error');
my $tmp = $lmConf->getConf;
unless ( ref($tmp) ) {
$class->lmLog( "$class: Unable to load configuration", 'error' );
return SERVER_ERROR;
}
return $tmp;
......
......@@ -28,11 +28,11 @@ my ( $dbh, $cfgNum ) = ( undef, 0 );
sub localInit($$) {
my ( $class, $args ) = @_;
$args->configStorage = {
type => 'DBI',
dbiChain => $args->{dbiChain},
dbiUser => $args->{dbiUser},
dbiPassword => $args->{dbiPassword},
dbiTable => $args->{dbiTable},
type => 'DBI',
dbiChain => $args->{dbiChain},
dbiUser => $args->{dbiUser},
dbiPassword => $args->{dbiPassword},
dbiTable => $args->{dbiTable},
};
$class->SUPER::localInit($args);
}
......
......@@ -6,24 +6,19 @@ use MIME::Base64;
use Exporter 'import';
use Safe;
our $VERSION = '0.71';
our $VERSION = '0.72';
our %EXPORT_TAGS = (
localStorage => [
qw( $localStorage $localStorageOptions $refLocalStorage )
],
globalStorage => [
qw( $globalStorage $globalStorageOptions )
],
localStorage =>
[ qw( $localStorage $localStorageOptions $refLocalStorage ) ],
globalStorage => [ qw( $globalStorage $globalStorageOptions ) ],
locationRules => [
qw(
$locationCondition $defaultCondition $locationCount
$locationRegexp $apacheRequest $datas $safe
)
],
import => [
qw( import @EXPORT_OK @EXPORT %EXPORT_TAGS )
],
import => [ qw( import @EXPORT_OK @EXPORT %EXPORT_TAGS ) ],
headers => [
qw(
$forgeHeaders
......@@ -34,29 +29,28 @@ our %EXPORT_TAGS = (
lmSetErrHeaderOut
)
],
traces => [
qw( $whatToTrace )
],
apache => [
qw( MP lmLog OK REDIRECT FORBIDDEN DONE DECLINED SERVER_ERROR )
],
traces => [ qw( $whatToTrace ) ],
apache =>
[ qw( MP lmLog OK REDIRECT FORBIDDEN DONE DECLINED SERVER_ERROR ) ],
);
our @EXPORT_OK = ();
push( @EXPORT_OK, @{ $EXPORT_TAGS{$_} } ) foreach (
push( @EXPORT_OK, @{ $EXPORT_TAGS{$_} } )
foreach (
qw( localStorage globalStorage locationRules import headers traces apache )
);
);
$EXPORT_TAGS{all} = \@EXPORT_OK;
our @EXPORT = ();
# Shared variables
our (
$locationRegexp, $locationCondition, $defaultCondition, $forgeHeaders,
$apacheRequest, $locationCount, $cookieName, $portal,
$datas, $globalStorage, $globalStorageOptions, $localStorage,
$localStorageOptions, $whatToTrace, $https, $refLocalStorage,
$safe,
$locationRegexp, $locationCondition, $defaultCondition,
$forgeHeaders, $apacheRequest, $locationCount,
$cookieName, $portal, $datas,
$globalStorage, $globalStorageOptions, $localStorage,
$localStorageOptions, $whatToTrace, $https,
$refLocalStorage, $safe,
);
##########################################
......@@ -209,7 +203,7 @@ sub lmHeaderOut {
# Security jail
$safe = new Safe;
$safe->share('&encode_base64','$datas', '&lmSetHeaderIn', '$apacheRequest');
$safe->share( '&encode_base64', '$datas', '&lmSetHeaderIn', '$apacheRequest' );
# init() : by default, it calls localInit and globalInit, but with
# a shared configuration, init() is overloaded to call only
......@@ -234,7 +228,9 @@ sub localInit($$) {
# At each Apache (re)start, we've to clear the cache to avoid living
# with old datas
eval '$refLocalStorage = new ' . $localStorage . '($localStorageOptions);';
eval '$refLocalStorage = new '
. $localStorage
. '($localStorageOptions);';
if ( defined $refLocalStorage ) {
$refLocalStorage->clear();
}
......@@ -251,12 +247,19 @@ sub localInit($$) {
# performances.
no strict;
if ( MP() == 2 ) {
Apache->push_handlers( PerlChildInitHandler => sub { return $class->initLocalStorage( $_[1], $_[0] ); } );
Apache->push_handlers( PerlCleanupHandler => sub { return $class->cleanLocalStorage(@_); } );
Apache->push_handlers( PerlChildInitHandler =>
sub { return $class->initLocalStorage( $_[1], $_[0] ); } );
Apache->push_handlers(
PerlCleanupHandler => sub { return $class->cleanLocalStorage(@_); }
);
}
else {
Apache->push_handlers( PerlChildInitHandler => sub { return $class->initLocalStorage(@_); } );
Apache->push_handlers( PerlCleanupHandler => sub { return $class->cleanLocalStorage(@_); } );
Apache->push_handlers(
PerlChildInitHandler => sub { return $class->initLocalStorage(@_); }
);
Apache->push_handlers(
PerlCleanupHandler => sub { return $class->cleanLocalStorage(@_); }
);
}
}
......@@ -282,11 +285,13 @@ sub locationRulesInit {
# Pre compilation : both regexp and conditions
foreach ( keys %{ $args->{locationRules} } ) {
if ( $_ eq 'default' ) {
$defaultCondition = $class->conditionSub( $args->{locationRules}->{$_} );
$defaultCondition =
$class->conditionSub( $args->{locationRules}->{$_} );
}
else {
$locationCondition->[$locationCount] = $class->conditionSub( $args->{locationRules}->{$_} );
$locationRegexp->[$locationCount] = qr/$_/;
$locationCondition->[$locationCount] =
$class->conditionSub( $args->{locationRules}->{$_} );
$locationRegexp->[$locationCount] = qr/$_/;
$locationCount++;
}
}
......@@ -315,8 +320,8 @@ sub defaultValuesInit {
my ( $class, $args ) = @_;
# Other values
$cookieName ||= $args->{cookieName} || 'lemon';
$whatToTrace ||= $args->{whatToTrace} || '$uid';
$cookieName = $args->{cookieName} || 'lemon';
$whatToTrace = $args->{whatToTrace} || '$uid';
$whatToTrace =~ s/\$//g;
$https = $args->{https} unless defined($https);
$https = 1 unless defined($https);
......@@ -359,12 +364,16 @@ sub forgeHeadersInit {
my $sub;
foreach ( keys %tmp ) {
$sub .= "lmSetHeaderIn(\$apacheRequest,'$_' => join('',split(/[\\r\\n]+/," . $tmp{$_} . ")));";
$sub .=
"lmSetHeaderIn(\$apacheRequest,'$_' => join('',split(/[\\r\\n]+/,"
. $tmp{$_} . ")));";
}
#$sub = "\$forgeHeaders = sub {$sub};";
#eval "$sub";
$forgeHeaders = $safe->reval("sub {$sub};");
$class->lmLog( "$class: Unable to forge headers: $@: sub {$sub}", 'error' ) if ($@);
$class->lmLog( "$class: Unable to forge headers: $@: sub {$sub}", 'error' )
if ($@);
}
################
......@@ -386,8 +395,10 @@ sub forbidden {
my $class = shift;
# We use Apache::Log here
$class->lmLog( 'The user "' . $datas->{$whatToTrace} . '" was reject when he tried to access to ' . shift,
'notice' );
$class->lmLog(
'The user "' . $datas->{$whatToTrace} . '" was reject when he tried to access to ' . shift,
'notice'
);
return FORBIDDEN;
}
......@@ -401,9 +412,18 @@ sub hideCookie {
# Redirect non-authenticated users to the portal
sub goToPortal() {
my ( $class, $url ) = @_;
my $urlc_init = encode_base64( "http" . ( $https ? "s" : "" ) . "://" . $apacheRequest->get_server_name() . $url );
my $urlc_init =
encode_base64( "http"
. ( $https ? "s" : "" ) . "://"
. $apacheRequest->get_server_name()
. $url );
$urlc_init =~ s/[\n\s]//g;
$class->lmLog( "Redirect " . $apacheRequest->connection->remote_ip . " to portal (url was $url)", 'debug' );
$class->lmLog(
"Redirect "
. $apacheRequest->connection->remote_ip
. " to portal (url was $url)",
'debug'
);
$apacheRequest->headers_out->set( 'Location' => "$portal?url=$urlc_init" );
return REDIRECT;
}
......@@ -413,12 +433,17 @@ sub run ($$) {
my $class;
( $class, $apacheRequest ) = @_;
my $uri = $apacheRequest->uri . ( $apacheRequest->args ? "?" . $apacheRequest->args : "" );
my $uri =
$apacheRequest->uri
. ( $apacheRequest->args ? "?" . $apacheRequest->args : "" );
# AUTHENTICATION
# I - recover the cookie
my $id;
unless ( ($id) = ( lmHeaderIn( $apacheRequest, 'Cookie' ) =~ /$cookieName=([^; ]+);?/o ) ) {
unless ( ($id) =
( lmHeaderIn( $apacheRequest, 'Cookie' ) =~ /$cookieName=([^; ]+);?/o )
)
{
$class->lmLog( "$class: No cookie found", 'info' );
return $class->goToPortal($uri);
}
......@@ -437,7 +462,8 @@ sub run ($$) {
if ($@) {
# The cookie isn't yet available
$class->lmLog( "The cookie $id isn't yet available: $@", 'info' );
$class->lmLog( "The cookie $id isn't yet available: $@",
'info' );
return $class->goToPortal($uri);
}
$datas->{$_} = $h{$_} foreach ( keys %h );
......@@ -456,7 +482,12 @@ sub run ($$) {
# AUTHORIZATION
return $class->forbidden($uri) unless ( $class->grant($uri) );
$class->lmLog( "User " . $datas->{$whatToTrace} . " was authorizated to access to $uri", 'debug' );
$class->lmLog(
"User "
. $datas->{$whatToTrace}
. " was authorizated to access to $uri",
'debug'
);
# ACCOUNTING
# 2 - Inform remote application
......@@ -475,7 +506,9 @@ sub sendHeaders {
sub initLocalStorage {
my ( $class, $r ) = @_;
if ( $localStorage and not $refLocalStorage ) {
eval '$refLocalStorage = new ' . $localStorage . '($localStorageOptions);';
eval '$refLocalStorage = new '
. $localStorage
. '($localStorageOptions);';
}
$class->lmLog( "Local cache initialization failed: $@", 'error' )
unless ( defined $refLocalStorage );
......
......@@ -12,7 +12,9 @@ sub locationRulesInit {
$locationCount->{$vhost} = 0;
foreach ( keys %{ $args->{locationRules}->{$vhost} } ) {
if ( $_ eq 'default' ) {
$defaultCondition->{$vhost} = $class->conditionSub( $args->{locationRules}->{$vhost}->{$_} );
$defaultCondition->{$vhost} =
$class->conditionSub(
$args->{locationRules}->{$vhost}->{$_} );
}
else {
$locationCondition->{$vhost}->[ $locationCount->{$vhost} ] =
......@@ -41,12 +43,17 @@ sub forgeHeadersInit {
my $sub;
foreach ( keys %tmp ) {
$sub .= "lmSetHeaderIn(\$apacheRequest,'$_' => join('',split(/[\\r\\n]+/," . $tmp{$_} . ")));";
$sub .=
"lmSetHeaderIn(\$apacheRequest,'$_' => join('',split(/[\\r\\n]+/,"
. $tmp{$_} . ")));";
}
#$sub = "\$forgeHeaders->{'$vhost'} = sub {$sub};";
#eval "$sub";
$forgeHeaders->{$vhost} = $safe->reval("sub {$sub}");
$class->lmLog( "$class: Unable to forge headers: $@: sub {$sub}", 'error' ) if ($@);
$forgeHeaders->{$vhost} = $safe->reval("sub {$sub}");
$class->lmLog( "$class: Unable to forge headers: $@: sub {$sub}",
'error' )
if ($@);
}
}
......@@ -71,7 +78,10 @@ sub grant {
}
}
unless ( $defaultCondition->{$vhost} ) {
$class->lmLog( "User rejected because VirtualHost \"$vhost\" has no configuration", 'warn' );
$class->lmLog(
"User rejected because VirtualHost \"$vhost\" has no configuration",
'warn'
);
}
return &{ $defaultCondition->{$vhost} };
}
......
Revision history for Perl extension Lemonldap::NG::Manager.
0.3 Thu Jan 4 9:22:34 2007
- Help system skeleton
0.2 Sun Dec 31 16:40:04 2006
- Localization (fr and en)
......
......@@ -52,6 +52,7 @@ lib/Lemonldap/NG/Manager/Base.pm
lib/Lemonldap/NG/Manager/Conf.pm
lib/Lemonldap/NG/Manager/Conf/DBI.pm
lib/Lemonldap/NG/Manager/Conf/File.pm
lib/Lemonldap/NG/Manager/Help.pm
Makefile.PL
MANIFEST
META.yml Module meta-data (added by MakeMaker)
......
......@@ -7,17 +7,14 @@ use XML::Simple;
use Lemonldap::NG::Manager::Base;
use Lemonldap::NG::Manager::Conf;
use Lemonldap::NG::Manager::_HTML;
require Lemonldap::NG::Manager::_i18n;
require Lemonldap::NG::Manager::Help;
our @ISA = qw(Lemonldap::NG::Manager::Base);
our $VERSION = '0.2';
our $VERSION = '0.3';
sub new {
unless(__PACKAGE__->can('ldapServer')) {
require Lemonldap::NG::Manager::_i18n;
Lemonldap::NG::Manager::_i18n::import($ENV{HTTP_ACCEPT_LANGUAGE});
}
my ( $class, $args ) = @_;
my $self = $class->SUPER::new();
unless ($args) {
......@@ -90,12 +87,18 @@ sub print_lmjs {
sub print_help {
my $self = shift;
print $self->header_public;
print "TODO: help";
Lemonldap::NG::Manager::Help::import( $ENV{HTTP_ACCEPT_LANGUAGE} )
unless ( $self->can('help_groups') );
my $chap = $self->param('help');
eval { no strict "refs"; &{"help_$chap"} };
}
# Configuration download subroutines
sub print_conf {
my $self = shift;
unless ( __PACKAGE__->can('ldapServer') ) {
Lemonldap::NG::Manager::_i18n::import( $ENV{HTTP_ACCEPT_LANGUAGE} );
}
print $self->header( -type => "text/xml", '-Cache-Control' => 'private' );
$self->printXmlConf;
exit;
......@@ -117,7 +120,7 @@ sub printXmlConf {
item => {
id => 'root',
open => 1,
text => &configuration." $config->{cfgNum}",
text => &configuration . " $config->{cfgNum}",
item => {
generalParameters => {
text => &generalParameters,
......@@ -133,9 +136,8 @@ sub printXmlConf {
sessionStorage => {
text => &sessionStorage,
item => {
globalStorageOptions => {
text => &globalStorageOptions,
}
globalStorageOptions =>
{ text => &globalStorageOptions, }
},
},
authParams => {
......@@ -153,70 +155,53 @@ sub printXmlConf {
},
};
my $generalParameters = $tree->{item}->{item}->{generalParameters}->{item};
my $exportedVars = $tree->{item}->{item}->{generalParameters}->{item}->{exportedVars}->{item};
my $ldapParameters = $tree->{item}->{item}->{generalParameters}->{item}->{ldapParameters}->{item};
my $sessionStorage = $tree->{item}->{item}->{generalParameters}->{item}->{sessionStorage}->{item};
my $globalStorageOptions = $tree->{item}->{item}->{generalParameters}->{item}->{sessionStorage}->{item}->{globalStorageOptions}->{item};
my $authParams = $tree->{item}->{item}->{generalParameters}->{item}->{authParams}->{item};
$authParams->{authentication} = $self->xmlField(
"value",
$config->{authentication} || 'ldap',
&authenticationType,
);
my $exportedVars =
$tree->{item}->{item}->{generalParameters}->{item}->{exportedVars}
->{item};
my $ldapParameters =
$tree->{item}->{item}->{generalParameters}->{item}->{ldapParameters}
->{item};
my $sessionStorage =
$tree->{item}->{item}->{generalParameters}->{item}->{sessionStorage}
->{item};
my $globalStorageOptions =
$tree->{item}->{item}->{generalParameters}->{item}->{sessionStorage}
->{item}->{globalStorageOptions}->{item};
my $authParams =
$tree->{item}->{item}->{generalParameters}->{item}->{authParams}->{item};
$authParams->{authentication} =
$self->xmlField( "value", $config->{authentication} || 'ldap',
&authenticationType, );
$authParams->{portal} =
$self->xmlField(
"value",
$config->{portal} || 'http://portal/',
$self->xmlField( "value", $config->{portal} || 'http://portal/',
"Portail" );
$authParams->{securedCookie} = $self->xmlField(
"value",
$config->{securedCookie} || 0,
&securedCookie,
);
$authParams->{securedCookie} =
$self->xmlField( "value", $config->{securedCookie} || 0, &securedCookie,
);
$generalParameters->{domain} =
$self->xmlField(
"value",
$config->{domain} || 'example.com',
&domain,
);
$generalParameters->{cookieName} = $self->xmlField(
"value",
$config->{cookieName} || 'lemonldap',
&cookieName,
);
$self->xmlField( "value", $config->{domain} || 'example.com', &domain, );
$generalParameters->{cookieName} =
$self->xmlField( "value", $config->{cookieName} || 'lemonldap',
&cookieName, );
$sessionStorage->{globalStorage} = $self->xmlField(
"value",
$sessionStorage->{globalStorage} =
$self->xmlField( "value",
$config->{globalStorage} || 'Apache::Session::File',
&apacheSessionModule,
);
$ldapParameters->{ldapServer} = $self->xmlField(
"value",
$config->{ldapServer} || 'localhost',
&ldapServer,
);
$ldapParameters->{ldapPort} = $self->xmlField(
"value",
$config->{ldapPort} || 389,
&ldapPort,
);
$ldapParameters->{ldapBase} = $self->xmlField(
"value",
$config->{ldapBase} || ' ',
&ldapBase,
);
$ldapParameters->{managerDn} = $self->xmlField(
"value",
$config->{managerDn} || ' ',
&managerDn,
);
$ldapParameters->{managerPassword} = $self->xmlField(