2009-12-17 20:20:17 +01:00
|
|
|
## @file
|
|
|
|
# Manager tree structure and tests
|
|
|
|
|
|
|
|
## @class
|
|
|
|
# Manager tree structure and tests
|
2009-12-11 19:17:00 +01:00
|
|
|
package Lemonldap::NG::Manager::_Struct;
|
|
|
|
|
|
|
|
use strict;
|
2010-01-28 18:58:49 +01:00
|
|
|
use Lemonldap::NG::Common::Conf::SAML::Metadata;
|
|
|
|
|
2009-12-11 19:17:00 +01:00
|
|
|
our $VERSION = '0.1';
|
|
|
|
|
2009-12-17 20:20:17 +01:00
|
|
|
## @method protected hashref cstruct(hashref h,string k)
|
|
|
|
# Merge $h with the structure produced with $k and return it.
|
2010-02-22 15:38:31 +01:00
|
|
|
# Used to manage virtual hosts, and metadatas (IDP, SP).
|
2009-12-17 20:20:17 +01:00
|
|
|
#@param $h Result of struct()
|
2010-02-22 15:38:31 +01:00
|
|
|
#@param $k Full path of the key
|
2009-12-17 20:20:17 +01:00
|
|
|
#@return Tree structure
|
2009-12-11 19:17:00 +01:00
|
|
|
sub cstruct {
|
|
|
|
shift;
|
|
|
|
my ( $h, $k ) = @_;
|
2010-03-01 21:32:28 +01:00
|
|
|
my @tmp = split( /\//, $k );
|
|
|
|
return $h unless ( scalar(@tmp) > 1 );
|
2010-02-22 15:38:31 +01:00
|
|
|
my $k1 = $tmp[0];
|
|
|
|
my $k2 = $tmp[1];
|
2010-03-01 21:32:28 +01:00
|
|
|
if ( $k1 =~ /^virtualHosts/i ) {
|
|
|
|
%$h = (
|
|
|
|
%$h,
|
|
|
|
virtualHosts => {
|
|
|
|
$k2 => {
|
|
|
|
_nodes => [qw(rules:rules:rules headers)],
|
|
|
|
rules => {
|
|
|
|
_nodes => ["hash:/locationRules/$k2:rules:rules"],
|
|
|
|
_js => 'rulesRoot'
|
|
|
|
},
|
|
|
|
headers => {
|
|
|
|
_nodes => ["hash:/exportedHeaders/$k2"],
|
|
|
|
_js => 'hashRoot'
|
2010-02-22 15:38:31 +01:00
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
2010-03-01 21:32:28 +01:00
|
|
|
elsif ( $k1 =~ /^samlIDPMetaDataNode/i ) {
|
|
|
|
%$h = (
|
|
|
|
%$h,
|
|
|
|
samlIDPMetaDataNode => {
|
|
|
|
$k2 => {
|
|
|
|
_nodes => [
|
2010-03-04 17:51:28 +01:00
|
|
|
qw(samlIDPMetaDataXML samlIDPMetaDataExportedAttributes samlIDPMetaDataOptions)
|
2010-02-22 15:38:31 +01:00
|
|
|
],
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPMetaDataExportedAttributes => {
|
|
|
|
_nodes => [
|
|
|
|
"hash:/samlIDPMetaDataExportedAttributes/$k2"
|
|
|
|
. ":samlIDPMetaDataExportedAttributes:samlAttribute"
|
2010-02-22 15:38:31 +01:00
|
|
|
],
|
2010-03-01 21:32:28 +01:00
|
|
|
_js => 'samlAttributeRoot'
|
|
|
|
},
|
|
|
|
samlIDPMetaDataXML => "samlmetadata:/samlIDPMetaDataXML/$k2"
|
2010-03-11 17:43:21 +01:00
|
|
|
. ":samlIDPMetaDataXML:filearea",
|
2010-03-04 16:44:03 +01:00
|
|
|
samlIDPMetaDataOptions => {
|
|
|
|
_nodes => [
|
2010-03-04 17:51:28 +01:00
|
|
|
qw(samlIDPMetaDataOptionsNameIDFormat samlIDPMetaDataOptionsForceAuthn samlIDPMetaDataOptionsAllowProxiedAuthn samlIDPMetaDataOptionsSSOBinding samlIDPMetaDataOptionsSLOBinding samlIDPMetaDataOptionsResolutionRule)
|
|
|
|
],
|
|
|
|
samlIDPMetaDataOptionsNameIDFormat =>
|
|
|
|
"text:/samlIDPMetaDataOptions/$k2/samlIDPMetaDataOptionsNameIDFormat",
|
|
|
|
samlIDPMetaDataOptionsForceAuthn =>
|
|
|
|
"bool:/samlIDPMetaDataOptions/$k2/samlIDPMetaDataOptionsForceAuthn",
|
|
|
|
samlIDPMetaDataOptionsAllowProxiedAuthn =>
|
|
|
|
"bool:/samlIDPMetaDataOptions/$k2/samlIDPMetaDataOptionsAllowProxiedAuthn",
|
|
|
|
samlIDPMetaDataOptionsSSOBinding =>
|
|
|
|
"text:/samlIDPMetaDataOptions/$k2/samlIDPMetaDataOptionsSSOBinding",
|
|
|
|
samlIDPMetaDataOptionsSLOBinding =>
|
|
|
|
"text:/samlIDPMetaDataOptions/$k2/samlIDPMetaDataOptionsSLOBinding",
|
|
|
|
samlIDPMetaDataOptionsResolutionRule =>
|
|
|
|
"textarea:/samlIDPMetaDataOptions/$k2/samlIDPMetaDataOptionsResolutionRule",
|
|
|
|
},
|
2010-03-01 21:32:28 +01:00
|
|
|
}
|
2009-12-11 19:17:00 +01:00
|
|
|
}
|
2010-03-01 21:32:28 +01:00
|
|
|
);
|
2010-02-22 15:38:31 +01:00
|
|
|
}
|
2009-12-11 19:17:00 +01:00
|
|
|
return $h;
|
|
|
|
}
|
|
|
|
|
2009-12-17 20:20:17 +01:00
|
|
|
## @method protected hashref struct(hashref h,string k)
|
|
|
|
# Returns the tree structure
|
|
|
|
#@return Tree structure
|
2009-12-11 19:17:00 +01:00
|
|
|
sub struct {
|
2009-12-23 10:37:38 +01:00
|
|
|
my $self = shift;
|
2009-12-11 19:17:00 +01:00
|
|
|
return {
|
2010-03-01 21:32:28 +01:00
|
|
|
_nodes => [
|
|
|
|
qw(n:generalParameters n:variables n:virtualHosts n:samlServiceMetaData n:samlIDPMetaDataNode)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
2009-12-23 10:37:38 +01:00
|
|
|
|
2010-01-11 17:04:36 +01:00
|
|
|
######################
|
|
|
|
# GENERAL PARAMETERS #
|
|
|
|
######################
|
2009-12-11 19:17:00 +01:00
|
|
|
generalParameters => {
|
|
|
|
_nodes => [
|
2010-03-15 21:24:02 +01:00
|
|
|
qw(n:portalParams n:authParams n:logParams n:cookieParams n:sessionParams n:advancedParams)
|
2009-12-11 19:17:00 +01:00
|
|
|
],
|
2010-03-01 21:32:28 +01:00
|
|
|
_help => 'default',
|
2010-01-22 17:04:15 +01:00
|
|
|
|
|
|
|
# PORTAL PARAMETERS
|
|
|
|
portalParams => {
|
2010-03-14 15:38:39 +01:00
|
|
|
_nodes => [qw(portal n:portalModules n:portalCustomization)],
|
2010-03-15 21:24:02 +01:00
|
|
|
_help => 'portalParams',
|
|
|
|
|
|
|
|
portal => 'text:/portal',
|
|
|
|
|
|
|
|
portalModules => {
|
|
|
|
_nodes => [
|
|
|
|
qw(portalDisplayLogout portalDisplayResetPassword portalDisplayChangePassword portalDisplayAppslist)
|
|
|
|
],
|
|
|
|
portalDisplayLogout => 'text:/portalDisplayLogout',
|
|
|
|
portalDisplayResetPassword =>
|
|
|
|
'text:/portalDisplayResetPassword',
|
|
|
|
portalDisplayChangePassword =>
|
|
|
|
'text:/portalDisplayChangePassword',
|
|
|
|
portalDisplayAppslist => 'text:/portalDisplayAppslist',
|
|
|
|
},
|
|
|
|
|
|
|
|
portalCustomization => {
|
|
|
|
_nodes => [
|
|
|
|
qw(portalSkin portalAutocomplete portalRequireOldPassword portalUserAttr portalOpenLinkInNewWindow)
|
|
|
|
],
|
|
|
|
|
|
|
|
portalSkin => 'text:/portalSkin',
|
|
|
|
portalAutocomplete => 'bool:/portalAutocomplete',
|
2010-03-14 15:29:15 +01:00
|
|
|
portalRequireOldPassword =>
|
|
|
|
'bool:/portalRequireOldPassword',
|
2010-03-15 21:24:02 +01:00
|
|
|
portalUserAttr => 'text:/portalUserAttr',
|
2010-03-14 15:29:15 +01:00
|
|
|
portalOpenLinkInNewWindow =>
|
|
|
|
'bool:/portalOpenLinkInNewWindow',
|
2010-03-15 21:24:02 +01:00
|
|
|
},
|
2010-01-22 17:04:15 +01:00
|
|
|
},
|
2010-01-11 17:04:36 +01:00
|
|
|
|
|
|
|
# AUTHENTICATION AND USERDB PARAMETERS
|
2009-12-11 19:17:00 +01:00
|
|
|
authParams => {
|
2009-12-23 10:37:38 +01:00
|
|
|
|
2010-01-11 17:04:36 +01:00
|
|
|
# Displayed nodes depend on authentication/userDB modules choosed
|
2009-12-23 10:37:38 +01:00
|
|
|
_nodes => sub {
|
|
|
|
my $self = shift;
|
2009-12-29 18:03:24 +01:00
|
|
|
my $auth = $self->conf->{authentication}
|
2009-12-23 10:37:38 +01:00
|
|
|
|| $self->defaultConf()->{authentication};
|
2009-12-29 18:03:24 +01:00
|
|
|
my $udb = $self->conf->{userDB}
|
2009-12-23 10:37:38 +01:00
|
|
|
|| $self->defaultConf()->{userDB};
|
2010-03-15 21:24:02 +01:00
|
|
|
my $pdb = $self->conf->{passwordDB}
|
|
|
|
|| $self->defaultConf()->{passwordDB};
|
2009-12-23 10:37:38 +01:00
|
|
|
$auth = lc($auth);
|
|
|
|
$udb = lc($udb);
|
2010-03-15 21:24:02 +01:00
|
|
|
$pdb = lc($pdb);
|
2010-03-15 11:44:44 +01:00
|
|
|
my %res;
|
2010-03-15 21:24:02 +01:00
|
|
|
|
|
|
|
foreach my $mod (
|
|
|
|
(
|
|
|
|
$auth,
|
|
|
|
( $udb ne ( $auth or $pdb ) ? $udb : () ),
|
|
|
|
( $pdb ne ( $auth or $udb ) ? $pdb : () )
|
|
|
|
)
|
|
|
|
)
|
2009-12-23 10:37:38 +01:00
|
|
|
{
|
|
|
|
my $tmp = {
|
2010-03-15 21:24:02 +01:00
|
|
|
ldap => ['ldapParams'],
|
|
|
|
ssl => [qw(ldapParams sslParams)],
|
|
|
|
cas => ['casParams'],
|
|
|
|
remote => ['remoteParams'],
|
|
|
|
proxy => ['proxyParams'],
|
|
|
|
openid => ['openIdParams'],
|
2010-03-15 14:47:36 +01:00
|
|
|
twitter => ['twitterParams'],
|
2009-12-23 10:37:38 +01:00
|
|
|
}->{$mod};
|
|
|
|
if ($tmp) {
|
|
|
|
$res{$_}++ foreach (@$tmp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
my @u = keys %res;
|
2010-03-15 11:44:44 +01:00
|
|
|
|
2010-03-15 21:24:02 +01:00
|
|
|
# Add authentication, userDB and passwordDB nodes at the beginning
|
|
|
|
unshift( @u, "passwordDB" );
|
2010-03-15 11:44:44 +01:00
|
|
|
unshift( @u, "userDB" );
|
|
|
|
unshift( @u, "authentication" );
|
|
|
|
|
|
|
|
# Return nodes
|
2009-12-23 10:37:38 +01:00
|
|
|
return \@u;
|
|
|
|
},
|
2010-03-15 11:44:44 +01:00
|
|
|
|
2010-03-15 21:24:02 +01:00
|
|
|
_help => 'authParams',
|
2010-03-15 11:44:44 +01:00
|
|
|
|
2009-12-23 10:37:38 +01:00
|
|
|
authentication => 'text:/authentication:authParams:authParams',
|
2010-03-17 16:45:53 +01:00
|
|
|
userDB => 'text:/userDB:authParams:userdbParams',
|
|
|
|
passwordDB => 'text:/passwordDB:authParams:passworddbParams',
|
2010-03-15 11:44:44 +01:00
|
|
|
|
|
|
|
# LDAP
|
2010-03-15 21:24:02 +01:00
|
|
|
ldapParams => {
|
2009-12-23 10:37:38 +01:00
|
|
|
_nodes => [
|
2010-03-15 21:24:02 +01:00
|
|
|
qw(n:ldapConnection n:ldapFilters n:ldapGroups n:ldapPassword)
|
2009-12-23 10:37:38 +01:00
|
|
|
],
|
2010-03-15 21:24:02 +01:00
|
|
|
_help => 'ldap',
|
|
|
|
|
|
|
|
ldapConnection => {
|
|
|
|
_nodes => [
|
|
|
|
qw(ldapServer ldapPort ldapBase managerDn managerPassword)
|
|
|
|
],
|
|
|
|
ldapServer => 'text:/ldapServer',
|
|
|
|
ldapPort => 'int:/ldapPort',
|
|
|
|
ldapBase => 'text:/ldapBase',
|
|
|
|
managerDn => 'text:/managerDn',
|
|
|
|
managerPassword => 'text:/managerPassword',
|
|
|
|
},
|
2010-03-14 22:45:49 +01:00
|
|
|
|
2010-03-15 21:24:02 +01:00
|
|
|
ldapFilters => {
|
2010-03-14 22:45:49 +01:00
|
|
|
_nodes =>
|
2010-03-15 10:03:24 +01:00
|
|
|
[qw(LDAPFilter AuthLDAPFilter mailLDAPFilter)],
|
2010-03-15 21:24:02 +01:00
|
|
|
LDAPFilter => 'text:/LDAPFilter',
|
|
|
|
AuthLDAPFilter => 'text:/AuthLDAPFilter',
|
|
|
|
mailLDAPFilter => 'text:/mailLDAPFilter',
|
|
|
|
},
|
|
|
|
|
|
|
|
ldapGroups => {
|
|
|
|
_nodes => [
|
|
|
|
qw(ldapGroupBase ldapGroupObjectClass ldapGroupAttributeName ldapGroupAttributeNameUser ldapGroupAttributeNameSearch ldapGroupRecursive ldapGroupAttributeNameGroup)
|
|
|
|
],
|
|
|
|
ldapGroupBase => 'text:/ldapGroupBase',
|
|
|
|
ldapGroupObjectClass => 'text:/ldapGroupObjectClass',
|
2010-03-14 22:45:49 +01:00
|
|
|
ldapGroupAttributeName =>
|
|
|
|
'text:/ldapGroupAttributeName',
|
|
|
|
ldapGroupAttributeNameUser =>
|
|
|
|
'text:/ldapGroupAttributeNameUser',
|
2010-03-15 10:03:24 +01:00
|
|
|
ldapGroupAttributeNameSearch =>
|
|
|
|
'text:/ldapGroupAttributeNameSearch',
|
2010-03-15 21:24:02 +01:00
|
|
|
ldapGroupRecursive => 'bool:/ldapGroupRecursive',
|
2010-03-14 22:45:49 +01:00
|
|
|
ldapGroupAttributeNameGroup =>
|
|
|
|
'text:/ldapGroupAttributeNameGroup',
|
2010-03-15 21:24:02 +01:00
|
|
|
},
|
2010-03-14 22:45:49 +01:00
|
|
|
|
2010-03-15 21:24:02 +01:00
|
|
|
ldapPassword => {
|
2010-03-15 10:03:24 +01:00
|
|
|
_nodes => [qw(ldapPpolicyControl ldapSetPassword)],
|
2010-03-15 21:24:02 +01:00
|
|
|
ldapPpolicyControl => 'bool:/ldapPpolicyControl',
|
|
|
|
ldapSetPassword => 'bool:/ldapSetPassword',
|
|
|
|
},
|
|
|
|
|
2010-03-14 22:45:49 +01:00
|
|
|
},
|
|
|
|
|
2010-03-15 11:44:44 +01:00
|
|
|
# SSL
|
2010-03-15 21:24:02 +01:00
|
|
|
sslParams => {
|
|
|
|
_nodes => [qw(SSLVar SSLLDAPField SSLRequire)],
|
|
|
|
SSLVar => 'text:/SSLVar',
|
|
|
|
SSLLDAPField => 'text:/SSLLDAPField',
|
|
|
|
SSLRequire => 'bool:/SSLRequire',
|
|
|
|
},
|
|
|
|
|
|
|
|
# CAS
|
|
|
|
casParams => {
|
|
|
|
_nodes =>
|
|
|
|
[qw(CAS_url CAS_loginUrl CAS_validationUrl CAS_CAFile)],
|
|
|
|
CAS_url => 'text:/CAS_url',
|
|
|
|
CAS_loginUrl => 'text:/CAS_loginUrl',
|
|
|
|
CAS_validationUrl => 'text:/CAS_validationUrl',
|
|
|
|
CAS_CAFile => 'text:/CAS_CAFile',
|
|
|
|
},
|
|
|
|
|
|
|
|
# Remote
|
|
|
|
remoteParams => {
|
|
|
|
_nodes => [
|
|
|
|
qw(remotePortal remoteGlobalStorage remoteGlobalStorageOptions)
|
|
|
|
],
|
|
|
|
remotePortal => 'text:/remotePortal',
|
|
|
|
remoteGlobalStorage => 'text:/remoteGlobalStorage',
|
|
|
|
remoteGlobalStorageOptions =>
|
|
|
|
{ _nodes => ['hash:/remoteGlobalStorageOptions'], },
|
|
|
|
},
|
|
|
|
|
|
|
|
# Proxy
|
|
|
|
proxyParams => {
|
|
|
|
_nodes =>
|
|
|
|
[qw(soapAuthService remoteCookieName soapSessionService)],
|
|
|
|
soapAuthService => 'text:/soapAuthService',
|
|
|
|
remoteCookieName => 'text:/remoteCookieName',
|
|
|
|
soapSessionService => 'text:/soapSessionService',
|
|
|
|
},
|
2010-03-15 17:47:50 +01:00
|
|
|
|
2010-03-15 11:44:44 +01:00
|
|
|
# OpenID
|
|
|
|
openIdParams => {
|
2010-03-15 14:47:36 +01:00
|
|
|
_nodes => [qw(openIdSecret)],
|
2010-03-15 11:44:44 +01:00
|
|
|
openIdSecret => 'text:/openIdSecret',
|
2010-03-15 14:47:36 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
# Twitter
|
|
|
|
twitterParams => {
|
|
|
|
_nodes => [qw(twitterKey twitterSecret twitterAppName)],
|
|
|
|
twitterKey => 'text:/twitterKey',
|
|
|
|
twitterSecret => 'text:/twitterSecret',
|
|
|
|
twitterAppName => 'text:/twitterAppName',
|
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
},
|
|
|
|
|
2010-01-11 17:04:36 +01:00
|
|
|
# LOGS PARAMETERS
|
2009-12-23 10:37:38 +01:00
|
|
|
logParams => {
|
2009-12-30 18:02:23 +01:00
|
|
|
_nodes => [qw(syslog useXForwardedForIP whatToTrace)],
|
|
|
|
syslog => 'text:/syslog',
|
2009-12-30 15:22:24 +01:00
|
|
|
useXForwardedForIP => 'bool:/useXForwardedForIP',
|
2009-12-19 09:57:59 +01:00
|
|
|
whatToTrace => 'text:/whatToTrace:whatToTrace:text',
|
2009-12-11 19:17:00 +01:00
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
|
2010-01-11 17:04:36 +01:00
|
|
|
# COOKIE PARAMETERS
|
2009-12-11 19:17:00 +01:00
|
|
|
cookieParams => {
|
2009-12-14 15:01:46 +01:00
|
|
|
_nodes =>
|
2010-03-14 15:38:39 +01:00
|
|
|
[qw(cookieName domain cda securedCookie cookieExpiration)],
|
2009-12-19 09:57:59 +01:00
|
|
|
_help => 'cookies',
|
2009-12-11 19:17:00 +01:00
|
|
|
cookieName => 'text:/cookieName:cookieName:text',
|
|
|
|
domain => 'text:/domain:domain:text',
|
2010-03-14 15:38:39 +01:00
|
|
|
cda => 'bool:/cda',
|
2009-12-11 19:17:00 +01:00
|
|
|
securedCookie =>
|
|
|
|
'int:/securedCookie:securedCookie:securedCookieValues',
|
2009-12-14 15:01:46 +01:00
|
|
|
cookieExpiration => 'text:/cookieExpiration',
|
2009-12-11 19:17:00 +01:00
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
|
2010-01-11 17:04:36 +01:00
|
|
|
# SESSIONS PARAMETERS
|
2009-12-11 19:17:00 +01:00
|
|
|
sessionParams => {
|
2009-12-23 10:37:38 +01:00
|
|
|
_nodes => [
|
2010-03-15 21:24:02 +01:00
|
|
|
qw(grantSessionRule storePassword timeout n:sessionStorage n:multipleSessions)
|
2009-12-23 10:37:38 +01:00
|
|
|
],
|
2010-03-15 21:24:02 +01:00
|
|
|
_help => 'storage',
|
|
|
|
|
|
|
|
grantSessionRule => 'textarea:/grantSessionRule',
|
|
|
|
storePassword => 'bool:/storePassword',
|
|
|
|
timeout => 'text:/timeout:timeout:text',
|
|
|
|
|
2009-12-11 19:17:00 +01:00
|
|
|
sessionStorage => {
|
|
|
|
_nodes => [qw(globalStorage globalStorageOptions)],
|
|
|
|
globalStorage => 'text:/globalStorage',
|
|
|
|
globalStorageOptions => {
|
|
|
|
_nodes => ['hash:/globalStorageOptions'],
|
|
|
|
_js => 'hashRoot'
|
|
|
|
},
|
|
|
|
},
|
2010-03-15 21:24:02 +01:00
|
|
|
|
|
|
|
multipleSessions => {
|
|
|
|
_nodes => [
|
|
|
|
qw(singleSession singleIP singleUserByIP notifyDeleted notifyOther)
|
|
|
|
],
|
|
|
|
singleSession => 'bool:/singleSession',
|
|
|
|
singleIP => 'bool:/singleIP',
|
|
|
|
singleUserByIP => 'bool:/singleUserByIP',
|
|
|
|
notifyDeleted => 'bool:/notifyDeleted',
|
|
|
|
notifyOther => 'bool:/notifyOther',
|
|
|
|
},
|
2009-12-11 19:17:00 +01:00
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
|
2010-01-11 17:04:36 +01:00
|
|
|
# OTHER PARAMETERS
|
2009-12-14 15:01:46 +01:00
|
|
|
advancedParams => {
|
|
|
|
_nodes => [
|
2010-03-17 09:23:20 +01:00
|
|
|
qw(customFunctions n:soap n:notifications n:passwordManagement n:security n:redirection)
|
2009-12-14 15:01:46 +01:00
|
|
|
],
|
2010-03-14 15:29:15 +01:00
|
|
|
|
2010-03-17 09:23:20 +01:00
|
|
|
customFunctions => 'text:/customFunctions',
|
|
|
|
|
2010-03-15 21:24:02 +01:00
|
|
|
soap => {
|
2010-03-14 15:38:39 +01:00
|
|
|
_nodes => [qw(Soap exportedAttr trustedDomains)],
|
2010-03-15 21:24:02 +01:00
|
|
|
Soap => 'bool:/Soap',
|
|
|
|
exportedAttr => 'text:/exportedAttr',
|
|
|
|
trustedDomains => 'text:/trustedDomains',
|
|
|
|
},
|
2010-03-14 15:29:15 +01:00
|
|
|
|
2009-12-14 15:01:46 +01:00
|
|
|
notifications => {
|
|
|
|
_nodes => [
|
|
|
|
qw(notification notificationStorage notificationStorageOptions)
|
|
|
|
],
|
2009-12-19 09:57:59 +01:00
|
|
|
_help => 'notifications',
|
2009-12-30 15:22:24 +01:00
|
|
|
notification => 'bool:/notification',
|
2009-12-19 09:57:59 +01:00
|
|
|
notificationStorage => 'text:/notificationStorage',
|
2009-12-14 15:01:46 +01:00
|
|
|
notificationStorageOptions => {
|
|
|
|
_nodes => ['hash:/notificationStorageOptions'],
|
|
|
|
_js => 'hashRoot'
|
|
|
|
},
|
|
|
|
},
|
2010-03-14 15:29:15 +01:00
|
|
|
|
2009-12-14 15:01:46 +01:00
|
|
|
passwordManagement => {
|
|
|
|
_nodes => [
|
2010-03-15 21:24:02 +01:00
|
|
|
qw(SMTPServer mailUrl mailFrom mailSubject mailBody mailConfirmSubject mailConfirmBody randomPasswordRegexp)
|
2009-12-14 15:01:46 +01:00
|
|
|
],
|
|
|
|
SMTPServer => 'text:/SMTPServer',
|
2010-03-14 15:29:15 +01:00
|
|
|
mailUrl => 'text:/mailUrl',
|
2009-12-14 15:01:46 +01:00
|
|
|
mailFrom => 'text:/mailFrom',
|
|
|
|
mailSubject => 'text:/mailSubject',
|
2010-03-14 15:29:15 +01:00
|
|
|
mailBody => 'textarea:/mailBody',
|
|
|
|
mailConfirmSubject => 'text:/mailConfirmSubject',
|
|
|
|
mailConfirmBody => 'textarea:/mailConfirmBody',
|
2009-12-14 15:01:46 +01:00
|
|
|
randomPasswordRegexp => 'text:/randomPasswordRegexp',
|
|
|
|
},
|
2010-03-14 15:29:15 +01:00
|
|
|
|
2010-03-15 21:24:02 +01:00
|
|
|
security => {
|
2010-03-17 09:23:20 +01:00
|
|
|
_nodes => [qw(userControl portalForceAuthn)],
|
2010-03-15 21:24:02 +01:00
|
|
|
userControl => 'text:/userControl:userControl:text',
|
|
|
|
portalForceAuthn =>
|
|
|
|
'bool:/portalForceAuthn:portalForceAuthn:bool',
|
|
|
|
},
|
2010-03-14 15:29:15 +01:00
|
|
|
|
2010-03-17 09:23:20 +01:00
|
|
|
redirection => {
|
|
|
|
_nodes => [qw(https port)],
|
|
|
|
https => 'bool:/https',
|
|
|
|
port => 'int:/port',
|
|
|
|
}
|
|
|
|
|
2009-12-14 15:01:46 +01:00
|
|
|
}
|
2009-12-11 19:17:00 +01:00
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
|
2010-01-15 17:40:47 +01:00
|
|
|
#############
|
|
|
|
# VARIABLES #
|
|
|
|
#############
|
|
|
|
|
|
|
|
variables => {
|
2010-03-04 14:41:59 +01:00
|
|
|
_nodes => [qw(cn:exportedVars cn:macros cn:groups)],
|
2010-02-16 10:42:29 +01:00
|
|
|
_help => 'default',
|
2010-01-15 17:40:47 +01:00
|
|
|
|
2010-02-16 10:42:29 +01:00
|
|
|
# EXPORTED ATTRIBUTES
|
|
|
|
exportedVars => {
|
|
|
|
_nodes => ['hash:/exportedVars:vars:btext'],
|
2010-01-27 15:06:02 +01:00
|
|
|
_js => 'hashRoot',
|
2010-02-16 10:42:29 +01:00
|
|
|
},
|
2010-01-15 17:40:47 +01:00
|
|
|
|
2010-02-16 10:42:29 +01:00
|
|
|
# MACROS
|
|
|
|
macros => {
|
|
|
|
_nodes => ['hash:/macros:macros:btext'],
|
2010-01-27 15:06:02 +01:00
|
|
|
_js => 'hashRoot',
|
2010-02-16 10:42:29 +01:00
|
|
|
},
|
2010-01-15 17:40:47 +01:00
|
|
|
|
2010-02-16 10:42:29 +01:00
|
|
|
# GROUPS
|
|
|
|
groups => {
|
|
|
|
_nodes => ['hash:/groups:groups:btext'],
|
|
|
|
_js => 'hashRoot',
|
|
|
|
_help => 'default',
|
|
|
|
},
|
2010-01-15 17:40:47 +01:00
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
|
2010-01-11 17:04:36 +01:00
|
|
|
#################
|
|
|
|
# VIRTUAL HOSTS #
|
|
|
|
#################
|
2009-12-19 09:57:59 +01:00
|
|
|
virtualHosts => {
|
2009-12-30 16:40:37 +01:00
|
|
|
_nodes => ['nhash:/locationRules:virtualHosts:vhost'],
|
2009-12-19 09:57:59 +01:00
|
|
|
_upload => ['/exportedHeaders'],
|
|
|
|
_help => 'default',
|
2010-03-13 17:21:55 +01:00
|
|
|
_js => 'vhostRoot',
|
2009-12-19 09:57:59 +01:00
|
|
|
},
|
2010-01-28 18:58:49 +01:00
|
|
|
|
2010-02-03 13:07:58 +01:00
|
|
|
########
|
|
|
|
# SAML #
|
|
|
|
########
|
2010-03-01 21:32:28 +01:00
|
|
|
# virtual keys should not begin like configuration keys.
|
|
|
|
samlIDPMetaDataNode => {
|
|
|
|
_nodes => [
|
|
|
|
'nhash:/samlIDPMetaDataExportedAttributes:samlIDPMetaDataNode:samlMetaData'
|
|
|
|
],
|
2010-03-11 16:00:59 +01:00
|
|
|
_upload => [ '/samlIDPMetaDataXML', '/samlIDPMetaDataOptions' ],
|
2010-03-01 21:32:28 +01:00
|
|
|
_help => 'default',
|
2010-03-13 17:21:55 +01:00
|
|
|
_js => 'samlIdpRoot',
|
2010-03-01 21:32:28 +01:00
|
|
|
},
|
2010-02-16 11:44:03 +01:00
|
|
|
|
2010-03-01 21:32:28 +01:00
|
|
|
samlServiceMetaData => {
|
|
|
|
_nodes => [
|
|
|
|
qw(samlEntityID
|
|
|
|
samlServicePrivateKey
|
|
|
|
n:samlOrganization
|
|
|
|
n:samlSPSSODescriptor
|
|
|
|
n:samlIDPSSODescriptor)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
2010-02-05 11:20:16 +01:00
|
|
|
|
2010-03-01 21:32:28 +01:00
|
|
|
# GLOBAL INFORMATIONS
|
|
|
|
samlEntityID => 'text:/samlEntityID',
|
2010-02-17 18:07:15 +01:00
|
|
|
samlServicePrivateKey =>
|
2010-03-15 18:05:30 +01:00
|
|
|
'filearea:/samlServicePrivateKey:samlServicePrivateKey:filearea',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlOrganization => {
|
|
|
|
_nodes => [
|
|
|
|
qw(samlOrganizationDisplayName
|
|
|
|
samlOrganizationName
|
|
|
|
samlOrganizationURL)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
samlOrganizationDisplayName =>
|
|
|
|
'text:/samlOrganizationDisplayName',
|
|
|
|
samlOrganizationURL => 'text:/samlOrganizationURL',
|
|
|
|
samlOrganizationName => 'text:/samlOrganizationName',
|
|
|
|
},
|
|
|
|
|
|
|
|
# SERVICE PROVIDER
|
|
|
|
'samlSPSSODescriptor' => {
|
|
|
|
_nodes => [
|
|
|
|
qw(samlSPSSODescriptorAuthnRequestsSigned
|
|
|
|
samlSPSSODescriptorProtocolSupportEnumeration
|
|
|
|
samlSPSSODescriptorKeyDescriptorSigning
|
|
|
|
n:samlSPSSODescriptorSingleLogoutService
|
|
|
|
n:samlSPSSODescriptorAssertionConsumerService
|
|
|
|
n:samlSPSSODescriptorNameIDFormat)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
|
|
|
|
samlSPSSODescriptorAuthnRequestsSigned =>
|
|
|
|
'bool:/samlSPSSODescriptorAuthnRequestsSigned',
|
|
|
|
samlSPSSODescriptorProtocolSupportEnumeration =>
|
|
|
|
'text:/samlSPSSODescriptorProtocolSupportEnumeration',
|
|
|
|
samlSPSSODescriptorKeyDescriptorSigning =>
|
2010-03-15 18:05:30 +01:00
|
|
|
'filearea:/samlSPSSODescriptorKeyDescriptorSigning',
|
2010-03-01 21:32:28 +01:00
|
|
|
|
|
|
|
samlSPSSODescriptorSingleLogoutService => {
|
2010-02-05 11:20:16 +01:00
|
|
|
_nodes => [
|
2010-03-01 21:32:28 +01:00
|
|
|
qw(samlSPSSODescriptorSingleLogoutServiceHTTP
|
|
|
|
samlSPSSODescriptorSingleLogoutServiceSOAP)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
samlSPSSODescriptorSingleLogoutServiceHTTP =>
|
|
|
|
'samlService:/samlSPSSODescriptorSingleLogoutServiceHTTP',
|
|
|
|
samlSPSSODescriptorSingleLogoutServiceSOAP =>
|
|
|
|
'samlService:/samlSPSSODescriptorSingleLogoutServiceSOAP',
|
|
|
|
},
|
|
|
|
|
|
|
|
samlSPSSODescriptorAssertionConsumerService => {
|
2010-02-05 11:20:16 +01:00
|
|
|
_nodes => [
|
2010-03-01 21:32:28 +01:00
|
|
|
qw(samlSPSSODescriptorAssertionConsumerServiceHTTPArtifact
|
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPPost
|
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPRedirect)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPArtifact =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlAssertion:/samlSPSSODescriptorAssertionConsumerServiceHTTPArtifact',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPPost =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlAssertion:/samlSPSSODescriptorAssertionConsumerServiceHTTPPost',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPRedirect =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlAssertion:/samlSPSSODescriptorAssertionConsumerServiceHTTPRedirect',
|
2010-03-01 21:32:28 +01:00
|
|
|
},
|
2010-02-09 21:49:23 +01:00
|
|
|
|
2010-03-01 21:32:28 +01:00
|
|
|
samlSPSSODescriptorNameIDFormat => {
|
|
|
|
_nodes => [
|
|
|
|
qw(samlSPSSODescriptorNameIDFormatX509SubjectName
|
|
|
|
samlSPSSODescriptorNameIDFormatPersistent
|
|
|
|
samlSPSSODescriptorNameIDFormatTransient)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
samlSPSSODescriptorNameIDFormatX509SubjectName =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'bool:/samlSPSSODescriptorNameIDFormatX509SubjectName:samlNameIDFormatX509SubjectName:bool',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlSPSSODescriptorNameIDFormatPersistent =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'bool:/samlSPSSODescriptorNameIDFormatPersistent:samlNameIDFormatPersistent:bool',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlSPSSODescriptorNameIDFormatTransient =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'bool:/samlSPSSODescriptorNameIDFormatTransient:samlNameIDFormatTransient:bool',
|
2010-03-01 21:32:28 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
# IDENTITY PROVIDER
|
|
|
|
samlIDPSSODescriptor => {
|
|
|
|
_nodes => [
|
|
|
|
qw(samlIDPSSODescriptorWantAuthnRequestsSigned
|
|
|
|
samlIDPSSODescriptorProtocolSupportEnumeration
|
|
|
|
samlIDPSSODescriptorKeyDescriptorSigning
|
|
|
|
n:samlIDPSSODescriptorSingleSignOnService
|
|
|
|
n:samlIDPSSODescriptorSingleLogoutService
|
|
|
|
n:samlIDPSSODescriptorArtifactResolutionService
|
|
|
|
n:samlIDPSSODescriptorNameIDFormat
|
|
|
|
n:samlIDPSSODescriptorManageNameIDService)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
|
|
|
|
samlIDPSSODescriptorWantAuthnRequestsSigned =>
|
|
|
|
'bool:/samlIDPSSODescriptorWantAuthnRequestsSigned',
|
|
|
|
samlIDPSSODescriptorProtocolSupportEnumeration =>
|
|
|
|
'text:/samlIDPSSODescriptorProtocolSupportEnumeration',
|
|
|
|
samlIDPSSODescriptorKeyDescriptorSigning =>
|
2010-03-15 18:05:30 +01:00
|
|
|
'filearea:/samlIDPSSODescriptorKeyDescriptorSigning',
|
2010-02-05 11:20:16 +01:00
|
|
|
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorSingleSignOnService => {
|
2010-02-05 11:20:16 +01:00
|
|
|
_nodes => [
|
2010-03-01 21:32:28 +01:00
|
|
|
qw(samlIDPSSODescriptorSingleSignOnServiceHTTP
|
|
|
|
samlIDPSSODescriptorSingleSignOnServiceSOAP)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
samlIDPSSODescriptorSingleSignOnServiceHTTP =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlService:/samlIDPSSODescriptorSingleSignOnServiceHTTP',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorSingleSignOnServiceSOAP =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlService:/samlIDPSSODescriptorSingleSignOnServiceSOAP',
|
2010-03-01 21:32:28 +01:00
|
|
|
},
|
2010-02-05 11:20:16 +01:00
|
|
|
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorSingleLogoutService => {
|
|
|
|
_nodes => [
|
|
|
|
qw(samlIDPSSODescriptorSingleLogoutServiceHTTP
|
|
|
|
samlIDPSSODescriptorSingleLogoutServiceSOAP)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
samlIDPSSODescriptorSingleLogoutServiceHTTP =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlService:/samlIDPSSODescriptorSingleLogoutServiceHTTP',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorSingleLogoutServiceSOAP =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlService:/samlIDPSSODescriptorSingleLogoutServiceSOAP',
|
2010-03-01 21:32:28 +01:00
|
|
|
},
|
2010-02-05 11:20:16 +01:00
|
|
|
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorArtifactResolutionService => {
|
|
|
|
_nodes => [
|
|
|
|
qw(samlIDPSSODescriptorArtifactResolutionServiceArtifact)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
samlIDPSSODescriptorArtifactResolutionServiceArtifact =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlAssertion:/samlIDPSSODescriptorArtifactResolutionServiceArtifact',
|
2010-03-01 21:32:28 +01:00
|
|
|
},
|
2010-02-09 21:49:23 +01:00
|
|
|
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorNameIDFormat => {
|
|
|
|
_nodes => [
|
|
|
|
qw(samlIDPSSODescriptorNameIDFormatX509SubjectName
|
|
|
|
samlIDPSSODescriptorNameIDFormatPersistent
|
|
|
|
samlIDPSSODescriptorNameIDFormatTransient)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
samlIDPSSODescriptorNameIDFormatX509SubjectName =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'bool:/samlIDPSSODescriptorNameIDFormatX509SubjectName:samlNameIDFormatX509SubjectName:bool',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorNameIDFormatPersistent =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'bool:/samlIDPSSODescriptorNameIDFormatPersistent:samlNameIDFormatPersistent:bool',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorNameIDFormatTransient =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'bool:/samlIDPSSODescriptorNameIDFormatTransient:samlNameIDFormatTransient:bool',
|
2010-03-01 21:32:28 +01:00
|
|
|
},
|
2010-02-05 11:20:16 +01:00
|
|
|
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorManageNameIDService => {
|
|
|
|
_nodes => [
|
|
|
|
qw(samlIDPSSODescriptorManageNameIDServiceHTTP
|
|
|
|
samlIDPSSODescriptorManageNameIDServiceSOAP)
|
|
|
|
],
|
|
|
|
_help => 'default',
|
|
|
|
samlIDPSSODescriptorManageNameIDServiceHTTP =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlService:/samlIDPSSODescriptorManageNameIDServiceHTTP',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorManageNameIDServiceSOAP =>
|
2010-02-09 21:49:23 +01:00
|
|
|
'samlService:/samlIDPSSODescriptorManageNameIDServiceSOAP',
|
2010-03-01 21:32:28 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2009-12-11 19:17:00 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2009-12-17 20:20:17 +01:00
|
|
|
## @method protected hashref testStruct()
|
|
|
|
# Returns the tests to do with the datas uploaded.
|
|
|
|
# @return hashref
|
2009-12-11 19:17:00 +01:00
|
|
|
sub testStruct {
|
2010-01-11 17:04:36 +01:00
|
|
|
my $safe = Safe->new();
|
2009-12-11 19:17:00 +01:00
|
|
|
my $assignTest = qr/(?<=[^=<!>\?])=(?![=~])/;
|
|
|
|
my $assignMsg = 'containsAnAssignment';
|
|
|
|
my $perlExpr = sub {
|
|
|
|
my $e = shift;
|
2010-01-11 17:04:36 +01:00
|
|
|
$safe->reval( $e, 1 );
|
|
|
|
return 1 unless ($@);
|
2009-12-11 19:17:00 +01:00
|
|
|
return 1 if ( $@ =~ /Global symbol "\$.*requires explicit package/ );
|
2010-01-11 17:04:36 +01:00
|
|
|
return ( 1,
|
|
|
|
"Function \"<b>$1</b>\" must be declared in customFunctions" )
|
|
|
|
if ( $@ =~ /Bareword "(.*?)" not allowed while "strict subs"/ );
|
2010-01-04 14:28:10 +01:00
|
|
|
return ( 0, $@ );
|
2009-12-11 19:17:00 +01:00
|
|
|
};
|
2009-12-14 15:01:46 +01:00
|
|
|
my $boolean = { test => qr/^(?:0|1)?$/, msgFail => 'Value must be 0 or 1' };
|
2009-12-19 09:57:59 +01:00
|
|
|
my $pcre = sub {
|
|
|
|
my $r = shift;
|
|
|
|
my $q;
|
|
|
|
eval { $q = qr/$r/ };
|
|
|
|
return ( $@ ? ( 0, $@ ) : 1 );
|
|
|
|
};
|
|
|
|
my $testNotDefined = { test => sub { 1 }, msgFail => 'Ok' };
|
2009-12-23 10:37:38 +01:00
|
|
|
|
2009-12-11 19:17:00 +01:00
|
|
|
return {
|
2009-12-19 09:57:59 +01:00
|
|
|
mailFrom => $testNotDefined,
|
|
|
|
trustedDomains => $testNotDefined,
|
|
|
|
exportedAttr => $testNotDefined,
|
|
|
|
mailSubject => $testNotDefined,
|
|
|
|
randomPasswordRegexp => $testNotDefined,
|
|
|
|
passwordDB => $testNotDefined,
|
|
|
|
mailBody => $testNotDefined,
|
|
|
|
SMTPServer => $testNotDefined,
|
|
|
|
cookieExpiration => $testNotDefined,
|
|
|
|
notificationStorage => $testNotDefined,
|
2010-03-15 10:03:24 +01:00
|
|
|
mailUrl => $testNotDefined,
|
|
|
|
mailConfirmSubject => $testNotDefined,
|
|
|
|
mailConfirmBody => $testNotDefined,
|
2009-12-19 09:57:59 +01:00
|
|
|
authentication => {
|
2010-03-17 16:45:53 +01:00
|
|
|
test => qr/^[a-zA-Z]+(?:\s[\w\s:;]+)?$/,
|
2009-12-11 19:17:00 +01:00
|
|
|
msgFail => 'Bad module name',
|
|
|
|
},
|
2009-12-19 09:57:59 +01:00
|
|
|
cda => $boolean,
|
2009-12-11 19:17:00 +01:00
|
|
|
cookieName => {
|
|
|
|
test => qr/^[a-zA-Z]\w*$/,
|
|
|
|
msgFail => 'Bad cookie name',
|
|
|
|
},
|
2010-03-17 09:23:20 +01:00
|
|
|
customFunctions => $testNotDefined,
|
2009-12-11 19:17:00 +01:00
|
|
|
domain => {
|
|
|
|
test => qr/^\.?\w+(?:\.[a-zA-Z]\w*)*(?:\.[a-zA-Z]+)$/,
|
|
|
|
msgFail => 'Bad domain',
|
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
exportedHeaders => {
|
|
|
|
keyTest => qr/^[a-zA-Z](?:[\w\-\.]*\w)?$/,
|
|
|
|
keyMsgFail => 'Bad virtual host name',
|
|
|
|
'*' => {
|
|
|
|
keyTest => qr/^\w([\w\-]*\w)?$/,
|
|
|
|
keyMsgFail => 'Bad header name',
|
|
|
|
test => $perlExpr,
|
|
|
|
warnTest => sub {
|
|
|
|
my $e = shift;
|
|
|
|
return ( 0, $assignMsg ) if ( $e =~ $assignTest );
|
|
|
|
1;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
exportedVars => {
|
|
|
|
keyTest => qr/^[a-zA-Z]\w*$/,
|
|
|
|
keyMsgFail => 'Bad variable name',
|
|
|
|
test => qr/^[a-zA-Z]\w*$/,
|
|
|
|
msgFail => 'Bad attribute name',
|
2009-12-11 19:17:00 +01:00
|
|
|
},
|
|
|
|
globalStorage => {
|
|
|
|
test => qr/^[\w:]+$/,
|
|
|
|
msgFail => 'Bad module name',
|
|
|
|
},
|
|
|
|
globalStorageOptions => {
|
|
|
|
keyTest => qr/^\w+$/,
|
|
|
|
keyMsgFail => 'Bad parameter',
|
|
|
|
},
|
2010-01-22 17:04:15 +01:00
|
|
|
grantSessionRule => {
|
|
|
|
test => $perlExpr,
|
|
|
|
warnTest => sub {
|
|
|
|
my $e = shift;
|
|
|
|
return ( 0, $assignMsg ) if ( $e =~ $assignTest );
|
|
|
|
1;
|
|
|
|
},
|
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
groups => {
|
|
|
|
keyTest => qr/^\w[\w-]*$/,
|
|
|
|
keyMsgFail => 'Bad group name',
|
|
|
|
test => $perlExpr,
|
|
|
|
warnTest => sub {
|
|
|
|
my $e = shift;
|
|
|
|
return ( 0, $assignMsg ) if ( $e =~ $assignTest );
|
|
|
|
1;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
https => $boolean,
|
2009-12-11 19:17:00 +01:00
|
|
|
ldapBase => {
|
|
|
|
test => qr/^(?:\w+=.*|)$/,
|
|
|
|
msgFail => 'Bad LDAP base',
|
|
|
|
},
|
|
|
|
ldapPort => {
|
|
|
|
test => qr/^\d*$/,
|
|
|
|
msgFail => 'Bad port number'
|
|
|
|
},
|
|
|
|
ldapServer => {
|
|
|
|
test => sub {
|
|
|
|
my $l = shift;
|
|
|
|
my @s = split( /[\s,]+/, $l );
|
|
|
|
foreach my $s (@s) {
|
|
|
|
$s =~
|
|
|
|
/^(?:ldap(?:s|\+tls|i):\/\/)?\w[\w\-\.]+\w(?::\d{0,5})?\/?$/
|
|
|
|
or return ( 0, "Bad ldap uri \"$s\"" );
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
},
|
|
|
|
},
|
2010-03-15 10:03:24 +01:00
|
|
|
ldapPpolicyControl => $boolean,
|
|
|
|
ldapSetPassword => $boolean,
|
|
|
|
mailLDAPFilter => $testNotDefined,
|
|
|
|
LDAPFilter => $testNotDefined,
|
|
|
|
AuthLDAPFilter => $testNotDefined,
|
|
|
|
ldapGroupRecursive => $boolean,
|
|
|
|
ldapGroupObjectClass => $testNotDefined,
|
|
|
|
ldapGroupBase => $testNotDefined,
|
|
|
|
ldapGroupAttributeName => $testNotDefined,
|
|
|
|
ldapGroupAttributeNameUser => $testNotDefined,
|
|
|
|
ldapGroupAttributeNameSearch => $testNotDefined,
|
|
|
|
ldapGroupAttributeNameGroup => $testNotDefined,
|
2010-03-15 21:24:02 +01:00
|
|
|
locationRules => {
|
2009-12-11 19:17:00 +01:00
|
|
|
keyTest => qr/^[a-zA-Z](?:[\w\-\.]*\w)?$/,
|
|
|
|
msgFail => 'Bad virtual host name',
|
|
|
|
'*' => {
|
2009-12-19 09:57:59 +01:00
|
|
|
keyTest => $pcre,
|
|
|
|
test => sub {
|
2009-12-11 19:17:00 +01:00
|
|
|
my $e = shift;
|
2010-03-09 22:42:31 +01:00
|
|
|
return 1 if ( $e =~ /^(?:accept|deny|unprotect)$/i );
|
2009-12-11 19:17:00 +01:00
|
|
|
if ( $e =~ s/^logout(?:_(?:app|sso|app_sso))?\s*// ) {
|
|
|
|
return (
|
|
|
|
$e =~ /^(?:https?:\/\/\S+)?$/
|
|
|
|
? 1
|
|
|
|
: ( 0, "bad url \"$e\"" )
|
|
|
|
);
|
|
|
|
}
|
|
|
|
return &$perlExpr($e);
|
|
|
|
},
|
|
|
|
warnTest => sub {
|
|
|
|
my $e = shift;
|
2010-03-09 22:42:31 +01:00
|
|
|
return ( 0, $assignMsg ) if ( $e =~ $assignTest );
|
2009-12-11 19:17:00 +01:00
|
|
|
1;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
macros => {
|
|
|
|
keyTest => qr/^[a-zA-Z]\w*$/,
|
|
|
|
keyMsgFail => 'Bad macro name',
|
2010-01-11 17:04:36 +01:00
|
|
|
test => $perlExpr,
|
|
|
|
warnTest => sub {
|
|
|
|
my $e = shift;
|
|
|
|
return ( 0, $assignMsg ) if ( $e =~ $assignTest );
|
|
|
|
1;
|
2009-12-11 19:17:00 +01:00
|
|
|
},
|
2010-01-11 17:04:36 +01:00
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
managerDn => {
|
|
|
|
test => qr/^(?:\w+=.*,\w+=.*)?$/,
|
|
|
|
msgFail => 'Bad LDAP dn',
|
|
|
|
},
|
|
|
|
managerPassword => {
|
2009-12-23 13:55:23 +01:00
|
|
|
test => qr/^\S*$/,
|
2009-12-23 10:37:38 +01:00
|
|
|
msgFail => 'Bad LDAP password',
|
2009-12-11 19:17:00 +01:00
|
|
|
},
|
2010-01-11 17:04:36 +01:00
|
|
|
notification => $boolean,
|
2009-12-23 10:37:38 +01:00
|
|
|
notificationStorage => {
|
|
|
|
test => qr/^[\w:]+$/,
|
|
|
|
msgFail => 'Bad module name',
|
|
|
|
},
|
|
|
|
notificationStorageOptions => {
|
|
|
|
keyTest => qr/^\w+$/,
|
|
|
|
keyMsgFail => 'Bad parameter',
|
|
|
|
},
|
2010-01-11 17:04:36 +01:00
|
|
|
notifyDeleted => $boolean,
|
2010-01-12 10:53:49 +01:00
|
|
|
notifyOther => $boolean,
|
2010-03-17 09:23:20 +01:00
|
|
|
port => {
|
|
|
|
test => qr/^\d*$/,
|
|
|
|
msgFail => 'Bad port number'
|
|
|
|
},
|
2010-01-11 17:04:36 +01:00
|
|
|
portal => {
|
2009-12-23 10:37:38 +01:00
|
|
|
test => qr/^https?:\/\/\S+$/,
|
|
|
|
msgFail => 'Bad portal value',
|
|
|
|
},
|
2010-01-27 15:06:02 +01:00
|
|
|
portalAutocomplete => $boolean,
|
2010-01-22 17:04:15 +01:00
|
|
|
portalDisplayAppslist => { test => $perlExpr, },
|
|
|
|
portalDisplayChangePassword => { test => $perlExpr, },
|
|
|
|
portalDisplayLogout => { test => $perlExpr, },
|
|
|
|
portalDisplayResetPassword => $boolean,
|
2010-01-27 15:06:02 +01:00
|
|
|
portalForceAuthn => $boolean,
|
2010-01-22 17:04:15 +01:00
|
|
|
portalOpenLinkInNewWindow => $boolean,
|
|
|
|
portalParams => $testNotDefined,
|
|
|
|
portalRequireOldPassword => $boolean,
|
|
|
|
portalSkin => {
|
|
|
|
test => qr/\w+$/,
|
|
|
|
msgFail => 'Bad skin name',
|
|
|
|
},
|
|
|
|
portalUserAttr => {
|
|
|
|
test => qr/\w+$/,
|
2010-01-27 15:06:02 +01:00
|
|
|
msgFail => 'Unvalid session field',
|
2010-01-22 17:04:15 +01:00
|
|
|
},
|
2010-01-11 17:04:36 +01:00
|
|
|
protection => {
|
2009-12-14 15:01:46 +01:00
|
|
|
keyTest => qr/^(?:none|authentificate|manager|)$/,
|
|
|
|
msgFail => 'must be one of none authentificate manager',
|
|
|
|
},
|
2010-02-03 13:07:58 +01:00
|
|
|
saml => $testNotDefined,
|
|
|
|
samlServiceMetaData => $testNotDefined,
|
|
|
|
samlServicePrivateKey => $testNotDefined,
|
2010-03-01 21:32:28 +01:00
|
|
|
securedCookie => {
|
2009-12-23 10:37:38 +01:00
|
|
|
test => qr/^(?:0|1|2)$/,
|
|
|
|
msgFail => 'securedCookie must be 0, 1 or 2',
|
|
|
|
},
|
2010-01-11 17:04:36 +01:00
|
|
|
singleSession => $boolean,
|
|
|
|
singleIP => $boolean,
|
|
|
|
singleUserByIP => $boolean,
|
2009-12-23 10:37:38 +01:00
|
|
|
Soap => $boolean,
|
|
|
|
storePassword => $boolean,
|
|
|
|
syslog => {
|
|
|
|
test => qw/^(?:auth|authpriv|daemon|local\d|user)?$/,
|
|
|
|
msgFail =>
|
|
|
|
'Only auth|authpriv|daemon|local0-7|user is allowed here',
|
|
|
|
},
|
|
|
|
timeout => {
|
|
|
|
test => qr/^\d*$/,
|
|
|
|
msgFail => 'Bad number'
|
|
|
|
},
|
2010-01-11 17:04:36 +01:00
|
|
|
userControl => {
|
2009-12-19 09:57:59 +01:00
|
|
|
test => $pcre,
|
|
|
|
msgFail => 'Bad regular expression',
|
|
|
|
},
|
2009-12-23 10:37:38 +01:00
|
|
|
userDB => {
|
|
|
|
test => qr/^[a-zA-Z][\w\:]*$/,
|
|
|
|
msgFail => 'Bad module name',
|
|
|
|
},
|
|
|
|
useXForwardedForIP => $boolean,
|
2010-01-18 23:49:22 +01:00
|
|
|
variables => $testNotDefined,
|
2009-12-23 10:37:38 +01:00
|
|
|
whatToTrace => {
|
|
|
|
test => qr/^\$?[a-zA-Z]\w*$/,
|
|
|
|
msgFail => 'Bad value',
|
|
|
|
},
|
2010-02-04 11:08:27 +01:00
|
|
|
########
|
|
|
|
# SAML #
|
|
|
|
########
|
2010-02-24 17:24:17 +01:00
|
|
|
samlIDPMetaDataExportedAttributes => {
|
|
|
|
keyTest => qr/^[a-zA-Z](?:[\w\-\.]*\w)?$/,
|
|
|
|
keyMsgFail => 'Bad metadata name',
|
|
|
|
'*' => {
|
|
|
|
keyTest => qr/^\w([\w\-]*\w)?$/,
|
|
|
|
keyMsgFail => 'Bad attribute name',
|
2010-03-13 17:21:55 +01:00
|
|
|
test => sub { return 1; },
|
2010-02-24 17:24:17 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
samlIDPMetaDataXML => {
|
|
|
|
keyTest => qr/^[a-zA-Z](?:[\w\-\.]*\w)?$/,
|
|
|
|
keyMsgFail => 'Bad metadata name',
|
|
|
|
'*' => {
|
2010-03-01 21:32:28 +01:00
|
|
|
test => sub { return 1; },
|
|
|
|
keyTest => sub { return 1; },
|
2010-02-24 17:24:17 +01:00
|
|
|
},
|
|
|
|
},
|
2010-03-04 16:44:03 +01:00
|
|
|
samlIDPMetaDataOptions => {
|
|
|
|
keyTest => qr/^[a-zA-Z](?:[\w\-\.]*\w)?$/,
|
|
|
|
keyMsgFail => 'Bad metadata name',
|
|
|
|
'*' => {
|
|
|
|
test => sub { return 1; },
|
|
|
|
keyTest => sub { return 1; },
|
|
|
|
},
|
|
|
|
},
|
2010-03-01 21:32:28 +01:00
|
|
|
samlServicePrivateKey => $testNotDefined,
|
|
|
|
samlEntityID => $testNotDefined,
|
|
|
|
samlOrganizationDisplayName => $testNotDefined,
|
|
|
|
samlOrganizationName => $testNotDefined,
|
|
|
|
samlOrganizationURL => $testNotDefined,
|
|
|
|
samlSPSSODescriptorAuthnRequestsSigned => $boolean,
|
2010-02-04 11:08:27 +01:00
|
|
|
samlSPSSODescriptorProtocolSupportEnumeration => $testNotDefined,
|
2010-03-01 21:32:28 +01:00
|
|
|
samlSPSSODescriptorKeyDescriptorSigning => $testNotDefined,
|
|
|
|
samlSPSSODescriptorSingleLogoutServiceHTTP => $testNotDefined,
|
|
|
|
samlSPSSODescriptorSingleLogoutServiceSOAP => $testNotDefined,
|
2010-02-09 21:49:23 +01:00
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPArtifact =>
|
|
|
|
$testNotDefined,
|
2010-02-04 11:08:27 +01:00
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPPost => $testNotDefined,
|
2010-02-09 21:49:23 +01:00
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPRedirect =>
|
|
|
|
$testNotDefined,
|
|
|
|
samlSPSSODescriptorNameIDFormatX509SubjectName => $boolean,
|
|
|
|
samlSPSSODescriptorNameIDFormatPersistent => $boolean,
|
|
|
|
samlSPSSODescriptorNameIDFormatTransient => $boolean,
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorWantAuthnRequestsSigned => $boolean,
|
2010-02-04 11:08:27 +01:00
|
|
|
samlIDPSSODescriptorProtocolSupportEnumeration => $testNotDefined,
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorKeyDescriptorSigning => $testNotDefined,
|
|
|
|
samlIDPSSODescriptorSingleSignOnServiceHTTP => $testNotDefined,
|
|
|
|
samlIDPSSODescriptorSingleSignOnServiceSOAP => $testNotDefined,
|
|
|
|
samlIDPSSODescriptorSingleLogoutServiceHTTP => $testNotDefined,
|
|
|
|
samlIDPSSODescriptorSingleLogoutServiceSOAP => $testNotDefined,
|
2010-02-09 21:49:23 +01:00
|
|
|
samlIDPSSODescriptorArtifactResolutionServiceArtifact =>
|
|
|
|
$testNotDefined,
|
|
|
|
samlIDPSSODescriptorNameIDFormatX509SubjectName => $boolean,
|
|
|
|
samlIDPSSODescriptorNameIDFormatPersistent => $boolean,
|
|
|
|
samlSPSSODescriptorNameIDFormatTransient => $boolean,
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorManageNameIDServiceHTTP => $testNotDefined,
|
|
|
|
samlIDPSSODescriptorManageNameIDServiceSOAP => $testNotDefined,
|
2010-03-15 11:44:44 +01:00
|
|
|
|
2010-03-15 21:24:02 +01:00
|
|
|
# SSL
|
|
|
|
SSLVar => $testNotDefined,
|
|
|
|
SSLLDAPField => $testNotDefined,
|
|
|
|
SSLRequire => $boolean,
|
|
|
|
|
|
|
|
# CAS
|
|
|
|
CAS_url => $testNotDefined,
|
|
|
|
CAS_loginUrl => $testNotDefined,
|
|
|
|
CAS_validationUrl => $testNotDefined,
|
|
|
|
CAS_CAFile => $testNotDefined,
|
|
|
|
|
|
|
|
# Remote
|
|
|
|
remotePortal => $testNotDefined,
|
|
|
|
remoteGlobalStorage => {
|
|
|
|
test => qr/^[\w:]+$/,
|
|
|
|
msgFail => 'Bad module name',
|
|
|
|
},
|
|
|
|
remoteGlobalStorageOptions => {
|
|
|
|
keyTest => qr/^\w+$/,
|
|
|
|
keyMsgFail => 'Bad parameter',
|
|
|
|
},
|
|
|
|
|
|
|
|
# Proxy
|
|
|
|
soapAuthService => $testNotDefined,
|
|
|
|
remoteCookieName => $testNotDefined,
|
|
|
|
soapSessionService => $testNotDefined,
|
|
|
|
|
2010-03-15 11:44:44 +01:00
|
|
|
# OpenID
|
|
|
|
openIdSecret => $testNotDefined,
|
2010-03-15 14:47:36 +01:00
|
|
|
|
|
|
|
# Twitter
|
|
|
|
twitterKey => $testNotDefined,
|
|
|
|
twitterSecret => $testNotDefined,
|
|
|
|
twitterAppName => $testNotDefined,
|
2009-12-11 19:17:00 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2009-12-17 20:20:17 +01:00
|
|
|
## @method protected hashref defaultConf()
|
|
|
|
#@return Hashref of default values
|
2009-12-11 19:17:00 +01:00
|
|
|
sub defaultConf {
|
2010-03-17 16:45:53 +01:00
|
|
|
my $self = shift;
|
|
|
|
my $portal = defined $self->{portal} ? $self->{portal} : 'http://auth.example.com';
|
|
|
|
$portal =~ s/\/$//;
|
2009-12-11 19:17:00 +01:00
|
|
|
return {
|
2010-01-11 17:04:36 +01:00
|
|
|
authentication => 'LDAP',
|
|
|
|
cda => '0',
|
|
|
|
cookieName => 'lemonldap',
|
|
|
|
domain => 'example.com',
|
2009-12-29 18:03:24 +01:00
|
|
|
exportedHeaders => { 'test.example.com' => { 'Auth-User' => '$uid' }, },
|
2010-01-11 17:04:36 +01:00
|
|
|
exportedVars => { cn => 'cn', mail => 'mail', uid => 'uid', },
|
|
|
|
globalStorage => 'Apache::Session::File',
|
2009-12-14 15:01:46 +01:00
|
|
|
globalStorageOptions => {
|
2009-12-19 09:57:59 +01:00
|
|
|
'Directory' => '/var/lib/lemonldap-ng/sessions/',
|
2009-12-14 15:01:46 +01:00
|
|
|
'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/'
|
|
|
|
},
|
2010-01-11 17:04:36 +01:00
|
|
|
https => '0',
|
|
|
|
ldapBase => 'dc=example,dc=com',
|
|
|
|
ldapPort => '389',
|
|
|
|
ldapServer => 'localhost',
|
2009-12-29 18:03:24 +01:00
|
|
|
locationRules => { 'test.example.com' => { default => 'accept' }, },
|
2010-01-11 17:04:36 +01:00
|
|
|
managerDn => '',
|
|
|
|
managerPassword => '',
|
|
|
|
notification => '0',
|
2009-12-19 09:57:59 +01:00
|
|
|
notificationStorage => 'File',
|
2009-12-23 10:37:38 +01:00
|
|
|
notificationStorageOptions =>
|
|
|
|
{ dirName => '/var/lib/lemonldap-ng/notifications', },
|
2010-03-15 21:24:02 +01:00
|
|
|
notifyDeleted => '1',
|
|
|
|
notifyOther => '1',
|
2010-03-17 16:45:53 +01:00
|
|
|
portal => $portal,
|
2010-03-15 21:24:02 +01:00
|
|
|
portalSkin => 'pastel',
|
|
|
|
portalUserAttr => '_user',
|
|
|
|
protection => 'none',
|
|
|
|
remoteGlobalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
|
|
|
|
securedCookie => '0',
|
|
|
|
singleSession => '0',
|
|
|
|
singleIP => '0',
|
|
|
|
singleUserByIP => '0',
|
|
|
|
Soap => '1',
|
|
|
|
SSLRequired => '0',
|
|
|
|
storePassword => '0',
|
|
|
|
syslog => '',
|
|
|
|
timeout => '7200',
|
|
|
|
userControl => '^[\w\.\-@]+$',
|
|
|
|
userDB => 'LDAP',
|
2010-03-17 16:45:53 +01:00
|
|
|
passwordDB => 'Null',
|
2010-03-15 21:24:02 +01:00
|
|
|
useXForwardedForIP => '0',
|
|
|
|
whatToTrace => '$uid',
|
2010-02-04 11:08:27 +01:00
|
|
|
########
|
|
|
|
# SAML #
|
|
|
|
########
|
2010-02-22 16:35:16 +01:00
|
|
|
samlIDPMetaDataXML => { 'authentic' => {} },
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPMetaDataExportedAttributes =>
|
|
|
|
{ 'authentic' => { 'uid' => '0;uid;;' } },
|
2010-03-11 16:00:59 +01:00
|
|
|
samlIDPMetaDataOptions => {
|
|
|
|
'authentic' => {
|
|
|
|
'samlIDPMetaDataOptionsNameIDFormat' => '',
|
|
|
|
'samlIDPMetaDataOptionsForceAuthn' => '0',
|
|
|
|
'samlIDPMetaDataOptionsAllowProxiedAuthn' => '1',
|
|
|
|
'samlIDPMetaDataOptionsSSOBinding' => '',
|
|
|
|
'samlIDPMetaDataOptionsSLOBinding' => '',
|
|
|
|
'samlIDPMetaDataOptionsResolutionRule' => '',
|
|
|
|
}
|
|
|
|
},
|
2010-03-01 21:32:28 +01:00
|
|
|
samlServicePrivateKey => '',
|
2010-03-17 16:45:53 +01:00
|
|
|
samlEntityID => $portal . '/saml/metadata',
|
2010-02-04 11:08:27 +01:00
|
|
|
samlOrganizationDisplayName => 'Example',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlOrganizationName => 'Example',
|
|
|
|
samlOrganizationURL => 'http://www.example.com',
|
2010-02-04 11:08:27 +01:00
|
|
|
samlSPSSODescriptorAuthnRequestsSigned => '0',
|
|
|
|
samlSPSSODescriptorProtocolSupportEnumeration =>
|
|
|
|
'urn:oasis:names:tc:SAML:2.0:protocol',
|
|
|
|
samlSPSSODescriptorKeyDescriptorSigning => '',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlSPSSODescriptorSingleLogoutServiceHTTP =>
|
|
|
|
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/proxySingleLogout;'
|
|
|
|
. $portal . '/saml/proxySingleLogoutReturn',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlSPSSODescriptorSingleLogoutServiceSOAP =>
|
|
|
|
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/proxySingleLogoutSOAP;',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPArtifact =>
|
|
|
|
'1;0;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/proxySingleSignOnArtifact',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPPost =>
|
|
|
|
'0;1;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/proxySingleSignOnPost',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlSPSSODescriptorAssertionConsumerServiceHTTPRedirect =>
|
|
|
|
'0;2;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/proxySingleSignOnRedirect',
|
2010-02-09 21:49:23 +01:00
|
|
|
samlSPSSODescriptorNameIDFormatX509SubjectName => '0',
|
|
|
|
samlSPSSODescriptorNameIDFormatPersistent => '1',
|
|
|
|
samlSPSSODescriptorNameIDFormatTransient => '0',
|
2010-03-01 21:32:28 +01:00
|
|
|
samlIDPSSODescriptorWantAuthnRequestsSigned => '0',
|
2010-02-04 11:08:27 +01:00
|
|
|
samlIDPSSODescriptorProtocolSupportEnumeration =>
|
|
|
|
'urn:oasis:names:tc:SAML:2.0:protocol',
|
|
|
|
samlIDPSSODescriptorKeyDescriptorSigning => '',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlIDPSSODescriptorSingleSignOnServiceHTTP =>
|
|
|
|
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/singleSignOn;',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlIDPSSODescriptorSingleSignOnServiceSOAP =>
|
2010-02-05 17:14:05 +01:00
|
|
|
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/singleSignOnSOAP;',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlIDPSSODescriptorSingleLogoutServiceHTTP =>
|
|
|
|
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/singleLogout;'
|
|
|
|
. $portal . '/saml/singleLogoutReturn',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlIDPSSODescriptorSingleLogoutServiceSOAP =>
|
|
|
|
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/singleLogoutSOAP;',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlIDPSSODescriptorArtifactResolutionServiceArtifact =>
|
|
|
|
'1;0;urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/artifact',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlIDPSSODescriptorManageNameIDServiceHTTP =>
|
|
|
|
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/manageNameId;'
|
|
|
|
. $portal . '/saml/manageNameIdReturn',
|
2010-02-04 17:41:58 +01:00
|
|
|
samlIDPSSODescriptorManageNameIDServiceSOAP =>
|
|
|
|
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
|
2010-03-17 16:45:53 +01:00
|
|
|
. $portal . '/saml/manageNameIdSOAP;',
|
2010-02-09 21:49:23 +01:00
|
|
|
samlIDPSSODescriptorNameIDFormatX509SubjectName => '0',
|
|
|
|
samlIDPSSODescriptorNameIDFormatPersistent => '1',
|
|
|
|
samlIDPSSODescriptorNameIDFormatTransient => '0',
|
2009-12-11 19:17:00 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2009-12-29 18:03:24 +01:00
|
|
|
sub subDefaultConf {
|
|
|
|
return {
|
2010-03-15 21:24:02 +01:00
|
|
|
locationRules => { default => 'deny' },
|
|
|
|
exportedHeaders => { 'Auth-User' => '$uid' },
|
|
|
|
remoteGlobalStorageOptions => {
|
|
|
|
'proxy' => 'https://remote/index.pl/sessions',
|
|
|
|
'ns' => 'https://remote/Lemonldap/NG/Common/CGI/SOAPService',
|
|
|
|
},
|
|
|
|
samlIDPMetaDataXML => { {} },
|
|
|
|
samlIDPMetaDataExportedAttributes => { 'uid' => '0;uid;;' },
|
2010-03-04 16:44:03 +01:00
|
|
|
samlIDPMetaDataOptions => {
|
2010-03-04 17:51:28 +01:00
|
|
|
'samlIDPMetaDataOptionsNameIDFormat' => '',
|
|
|
|
'samlIDPMetaDataOptionsForceAuthn' => '0',
|
|
|
|
'samlIDPMetaDataOptionsAllowProxiedAuthn' => '1',
|
|
|
|
'samlIDPMetaDataOptionsSSOBinding' => '',
|
|
|
|
'samlIDPMetaDataOptionsSLOBinding' => '',
|
|
|
|
'samlIDPMetaDataOptionsResolutionRule' => '',
|
2010-03-04 16:44:03 +01:00
|
|
|
},
|
2009-12-29 18:03:24 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2009-12-11 19:17:00 +01:00
|
|
|
1;
|