2016-01-05 19:27:19 +01:00
|
|
|
package Lemonldap::NG::Manager::Conf::Zero;
|
|
|
|
|
2017-02-28 21:53:19 +01:00
|
|
|
our $VERSION = '2.0.0';
|
|
|
|
|
2016-01-05 19:27:19 +01:00
|
|
|
sub zeroConf {
|
2016-01-14 21:32:25 +01:00
|
|
|
my ( $domain, $sessionDir, $persistentSessionDir, $notificationDir ) = @_;
|
|
|
|
$domain ||= 'example.com';
|
|
|
|
$sessionDir ||= '/var/lib/lemonldap-ng/sessions';
|
2016-01-05 19:27:19 +01:00
|
|
|
$persistentSessionDir ||= '/var/lib/lemonldap-ng/psessions';
|
2016-02-08 11:03:49 +01:00
|
|
|
$notificationDir ||= '/var/lib/lemonldap-ng/notifications';
|
2016-01-05 19:27:19 +01:00
|
|
|
return {
|
|
|
|
'timeout' => 72000,
|
|
|
|
'loginHistoryEnabled' => 1,
|
2017-02-05 10:13:20 +01:00
|
|
|
'userDB' => 'Same',
|
2016-01-05 19:27:19 +01:00
|
|
|
'applicationList' => {
|
|
|
|
'2administration' => {
|
|
|
|
'manager' => {
|
|
|
|
'options' => {
|
2016-01-14 21:32:25 +01:00
|
|
|
'logo' => 'configure.png',
|
|
|
|
'name' => 'WebSSO Manager',
|
|
|
|
'display' => 'auto',
|
|
|
|
'uri' => "http://manager.$domain/manager.html",
|
2016-01-05 19:27:19 +01:00
|
|
|
'description' => 'Configure LemonLDAP::NG WebSSO'
|
|
|
|
},
|
|
|
|
'type' => 'application'
|
|
|
|
},
|
|
|
|
'sessions' => {
|
|
|
|
'type' => 'application',
|
|
|
|
'options' => {
|
2016-01-14 21:32:25 +01:00
|
|
|
'display' => 'auto',
|
|
|
|
'uri' => "http://manager.$domain/sessions.html",
|
2016-01-05 19:27:19 +01:00
|
|
|
'description' => 'Explore WebSSO sessions',
|
|
|
|
'logo' => 'database.png',
|
|
|
|
'name' => 'Sessions explorer'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'catname' => 'Administration',
|
|
|
|
'notifications' => {
|
|
|
|
'type' => 'application',
|
|
|
|
'options' => {
|
|
|
|
'description' => 'Explore WebSSO notifications',
|
2016-01-14 21:32:25 +01:00
|
|
|
'uri' => "http://manager.$domain/notifications.html",
|
2016-01-05 19:27:19 +01:00
|
|
|
'display' => 'auto',
|
|
|
|
'logo' => 'database.png',
|
|
|
|
'name' => 'Notifications explorer'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'type' => 'category'
|
|
|
|
},
|
|
|
|
'3documentation' => {
|
|
|
|
'type' => 'category',
|
|
|
|
'localdoc' => {
|
|
|
|
'options' => {
|
|
|
|
'description' =>
|
|
|
|
'Documentation supplied with LemonLDAP::NG',
|
|
|
|
'display' => 'on',
|
|
|
|
'uri' => "http://manager.$domain/doc/",
|
|
|
|
'name' => 'Local documentation',
|
|
|
|
'logo' => 'help.png'
|
|
|
|
},
|
|
|
|
'type' => 'application'
|
|
|
|
},
|
|
|
|
'officialwebsite' => {
|
|
|
|
'options' => {
|
|
|
|
'description' => 'Official LemonLDAP::NG Website',
|
|
|
|
'uri' => 'http://lemonldap-ng.org/',
|
|
|
|
'display' => 'on',
|
|
|
|
'logo' => 'network.png',
|
|
|
|
'name' => 'Offical Website'
|
|
|
|
},
|
|
|
|
'type' => 'application'
|
|
|
|
},
|
|
|
|
'catname' => 'Documentation'
|
|
|
|
},
|
|
|
|
'1sample' => {
|
|
|
|
'test1' => {
|
|
|
|
'options' => {
|
|
|
|
'description' =>
|
|
|
|
'A simple application displaying authenticated user',
|
|
|
|
'uri' => "http://test1.$domain/",
|
|
|
|
'display' => 'auto',
|
|
|
|
'logo' => 'demo.png',
|
|
|
|
'name' => 'Application Test 1'
|
|
|
|
},
|
|
|
|
'type' => 'application'
|
|
|
|
},
|
|
|
|
'catname' => 'Sample applications',
|
|
|
|
'type' => 'category',
|
|
|
|
'test2' => {
|
|
|
|
'type' => 'application',
|
|
|
|
'options' => {
|
|
|
|
'description' =>
|
|
|
|
'The same simple application displaying authenticated user',
|
|
|
|
'uri' => "http://test2.$domain/",
|
|
|
|
'display' => 'auto',
|
|
|
|
'name' => 'Application Test 2',
|
|
|
|
'logo' => 'thumbnail.png'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2016-01-18 19:40:47 +01:00
|
|
|
'cfgNum' => 0,
|
2016-01-05 19:27:19 +01:00
|
|
|
'globalStorageOptions' => {
|
|
|
|
'Directory' => $sessionDir,
|
|
|
|
'generateModule' =>
|
|
|
|
'Lemonldap::NG::Common::Apache::Session::Generate::SHA256',
|
|
|
|
'LockDirectory' => "$sessionDir/lock"
|
|
|
|
},
|
|
|
|
'macros' => {
|
|
|
|
'_whatToTrace' =>
|
|
|
|
'$_auth eq \'SAML\' ? "$_user\\@$_idpConfKey" : "$_user"'
|
|
|
|
},
|
|
|
|
'notificationStorageOptions' => {
|
|
|
|
'dirName' => $notificationDir
|
|
|
|
},
|
|
|
|
'authentication' => 'Demo',
|
|
|
|
'demoExportedVars' => {
|
|
|
|
'mail' => 'mail',
|
|
|
|
'cn' => 'cn',
|
|
|
|
'uid' => 'uid'
|
|
|
|
},
|
|
|
|
'domain' => $domain,
|
|
|
|
'globalStorage' => 'Apache::Session::File',
|
|
|
|
'passwordDB' => 'Demo',
|
|
|
|
'persistentStorage' => 'Apache::Session::File',
|
|
|
|
'persistentStorageOptions' => {
|
|
|
|
'Directory' => $persistentSessionDir,
|
|
|
|
'LockDirectory' => "$persistentSessionDir/lock"
|
|
|
|
},
|
|
|
|
'reloadUrls' => {
|
|
|
|
"reload.$domain" => "http://reload.$domain/reload"
|
|
|
|
},
|
|
|
|
'sessionDataToRemember' => {},
|
|
|
|
'notification' => 1,
|
|
|
|
'groups' => {},
|
|
|
|
'exportedHeaders' => {
|
|
|
|
"test1.$domain" => {
|
|
|
|
'Auth-User' => '$uid'
|
|
|
|
},
|
|
|
|
"test2.$domain" => {
|
|
|
|
'Auth-User' => '$uid'
|
|
|
|
}
|
|
|
|
},
|
2016-01-18 18:19:06 +01:00
|
|
|
'registerDB' => 'Demo',
|
2017-01-30 17:22:39 +01:00
|
|
|
'registerUrl' => "http://auth.$domain/register",
|
2016-01-05 19:27:19 +01:00
|
|
|
'portal' => "http://auth.$domain/",
|
|
|
|
'notificationStorage' => 'File',
|
|
|
|
'locationRules' => {
|
|
|
|
"test1.$domain" => {
|
|
|
|
'default' => 'accept',
|
|
|
|
'^/logout' => 'logout_sso'
|
|
|
|
},
|
|
|
|
"test2.$domain" => {
|
|
|
|
'default' => 'accept',
|
|
|
|
'^/logout' => 'logout_sso'
|
|
|
|
},
|
|
|
|
"manager.$domain" => {
|
2016-01-14 21:32:25 +01:00
|
|
|
'default' => '$uid eq "dwho"',
|
|
|
|
'(?#Configuration)^/(manager\.html|conf/)' => '$uid eq "dwho"',
|
|
|
|
'(?#Sessions)/sessions' => '$uid eq "dwho" or $uid eq "rtyler"',
|
|
|
|
'(?#Notifications)/notifications' =>
|
|
|
|
'$uid eq "dwho" or $uid eq "rtyler"',
|
2016-01-05 19:27:19 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
'whatToTrace' => '_whatToTrace',
|
|
|
|
'securedCookie' => 0,
|
|
|
|
'cookieName' => 'lemonldap',
|
|
|
|
'cfgAuthor' => 'The LemonLDAP::NG team',
|
2017-03-07 18:49:46 +01:00
|
|
|
'cfgVersion' => $VERSION,
|
2016-01-05 19:27:19 +01:00
|
|
|
'exportedVars' => {
|
|
|
|
'UA' => 'HTTP_USER_AGENT'
|
|
|
|
},
|
2016-01-18 18:19:06 +01:00
|
|
|
'portalSkin' => 'bootstrap',
|
2016-01-05 19:27:19 +01:00
|
|
|
'portalSkinBackground' =>
|
|
|
|
'1280px-Cedar_Breaks_National_Monument_partially.jpg',
|
2017-01-30 17:22:39 +01:00
|
|
|
'mailUrl' => "http://auth.$domain/resetpwd",
|
2016-01-20 11:32:30 +01:00
|
|
|
'localSessionStorage' => 'Cache::FileCache',
|
|
|
|
'localSessionStorageOptions' => {
|
|
|
|
'namespace' => 'lemonldap-ng-sessions',
|
|
|
|
'default_expires_in' => 600,
|
|
|
|
'directory_umask' => '007',
|
|
|
|
'cache_root' => '/tmp',
|
|
|
|
'cache_depth' => 3,
|
|
|
|
},
|
2016-01-05 19:27:19 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|