Work on default values for Portal (#686)

environments/ppa-mbqj77/deployments/1
Clément Oudot 12 years ago
parent 25be47b266
commit 2630d09d72
  1. 18
      lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm
  2. 509
      lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Attributes.pm
  3. 114
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm
  4. 27
      lemonldap-ng-portal/t/01-Lemonldap-NG-Portal-Simple.t
  5. 2
      lemonldap-ng-portal/t/03-XSS-protection.t
  6. 7
      lemonldap-ng-portal/t/04-Lemonldap-NG-Portal-SOAP.t
  7. 7
      lemonldap-ng-portal/t/05-Lemonldap-NG-Portal-Safe.t
  8. 2
      lemonldap-ng-portal/t/20-Lemonldap-NG-Portal-AuthApache.t
  9. 2
      lemonldap-ng-portal/t/21-Lemonldap-NG-Portal-AuthSSL.t
  10. 4
      lemonldap-ng-portal/t/22-Lemonldap-NG-Portal-AuthCAS.t
  11. 3
      lemonldap-ng-portal/t/24-Lemonldap-NG-Portal-AuthRemote.t
  12. 136
      lemonldap-ng-portal/t/25-Lemonldap-NG-Portal-Multi.t
  13. 3
      lemonldap-ng-portal/t/26-Lemonldap-NG-Portal-AuthProxy.t
  14. 10
      lemonldap-ng-portal/t/30-Lemonldap-NG-Portal-UserDBNull.t
  15. 10
      lemonldap-ng-portal/t/40-Lemonldap-NG-Portal-CDA.t
  16. 3
      lemonldap-ng-portal/t/50-Lemonldap-NG-Portal-Menu.t
  17. 3
      lemonldap-ng-portal/t/66-Lemonldap-NG-Portal-Captcha.t
  18. 2
      lemonldap-ng-portal/t/67-Lemonldap-NG-Portal-AuthBrowserID.t

@ -184,18 +184,36 @@ sub getConf {
}
}
# Create cipher object
eval { $r->{cipher} = Lemonldap::NG::Common::Crypto->new( $r->{key} ); };
if ($@) {
$msg .= "Bad key: $@. \n";
return $r;
}
# Adapt some values
# Convert old option useXForwardedForIP into trustedProxies
if ( defined $r->{useXForwardedForIP}
and $r->{useXForwardedForIP} == 1 )
{
$r->{trustedProxies} = '*';
}
# Force Choice backend
if ( $r->{authentication} eq "Choice" ) {
$r->{userDB} = "Choice";
$r->{passwordDB} = "Choice";
}
# Some parameters expect key name (example), not variable ($example)
foreach (qw/whatToTrace/) {
if ( defined $r->{$_} ) {
$r->{$_} =~ s/^\$//;
}
}
# Return configuration hash
return $r;
}
}

@ -10,6 +10,77 @@ use Mouse;
our $VERSION = 1.4.0;
## A
has 'activeTimer' => (
is => 'rw',
isa => 'Bool',
default => '1',
documentation => 'Enable timers on portal pages',
);
has 'apacheAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '4',
documentation => 'Apache authentication level',
);
has 'authChoiceParam' => (
is => 'rw',
isa => 'Str',
default => 'lmAuth',
documentation => 'HTTP parameter to store choosen authentication method',
);
has 'authentication' => (
is => 'rw',
isa => 'Str',
default => 'Demo',
documentation => 'Authentication module',
);
## B
## C
has 'casAccessControlPolicy' => (
is => 'rw',
isa => 'Str',
default => 'none',
documentation => 'CAS access control policy',
);
has 'CAS_authnLevel' => (
is => 'rw',
isa => 'Int',
default => '1',
documentation => 'CAS authentication level',
);
has 'confirmFormMethod' => (
is => 'rw',
isa => 'Str',
default => 'post',
documentation => 'HTTP method for confirm page form',
);
has 'cookieName' => (
is => 'rw',
isa => 'Str',
default => 'lemonldap',
documentation => 'Name of the cookie',
);
## D
has 'dbiAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '2',
documentation => 'DBI authentication level',
);
has 'domain' => (
is => 'rw',
isa => 'Str',
@ -17,15 +88,19 @@ has 'domain' => (
documentation => 'DNS domain',
);
has 'key' => (
is => 'rw',
isa => 'Str',
default => sub {
return join( '', map { chr( int( rand(94) ) + 33 ) } ( 1 .. 16 ) );
},
documentation => 'Secret key',
## E
## F
has 'facebookAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '1',
documentation => 'Facebook authentication level',
);
## G
has 'globalStorage' => (
is => 'rw',
isa => 'Str',
@ -42,12 +117,432 @@ has 'globalStorageOptions' => (
documentation => 'Session backend module options',
);
has 'googleAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '1',
documentation => 'Google authentication level',
);
## H
has 'hiddenAttributes' => (
is => 'rw',
isa => 'Str',
default => '_password',
documentation => 'Name of attributes to hide in logs',
);
has 'httpOnly' => (
is => 'rw',
isa => 'Bool',
default => '1',
documentation => 'Enable httpOnly flag in cookie',
);
## I
has 'infoFormMethod' => (
is => 'rw',
isa => 'Str',
default => 'get',
documentation => 'HTTP method for info page form',
);
## J
has 'jsRedirect' => (
is => 'rw',
isa => 'Str',
default => '0',
documentation => 'Use javascript for redirections',
);
## K
has 'key' => (
is => 'rw',
isa => 'Str',
default => sub {
return join( '', map { chr( int( rand(94) ) + 33 ) } ( 1 .. 16 ) );
},
documentation => 'Secret key',
);
## L
has 'ldapAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '2',
documentation => 'LDAP authentication level',
);
has 'ldapGroupAttributeName' => (
is => 'rw',
isa => 'Str',
default => 'member',
documentation => 'LDAP attribute name for member in groups',
);
has 'ldapGroupAttributeNameGroup' => (
is => 'rw',
isa => 'Str',
default => 'dn',
documentation =>
'LDAP attribute name in group entry referenced as member in groups',
);
has 'ldapGroupAttributeNameSearch' => (
is => 'rw',
isa => 'Str',
default => 'cn',
documentation => 'LDAP attributes to search in groups',
);
has 'ldapGroupAttributeNameUser' => (
is => 'rw',
isa => 'Str',
default => 'dn',
documentation =>
'LDAP attribute name in user entry referenced as member in groups',
);
has 'ldapGroupObjectClass' => (
is => 'rw',
isa => 'Str',
default => 'groupOfNames',
documentation => 'LDAP object class of groups',
);
has 'ldapGroupRecursive' => (
is => 'rw',
isa => 'Bool',
default => '0',
documentation => 'LDAP recursive search in groups',
);
has 'logoutServices' => (
is => 'rw',
isa => 'HashRef',
default => sub { return {}; },
documentation => 'Send logout trough GET request to these services',
);
## M
has 'mailConfirmSubject' => (
is => 'rw',
isa => 'Str',
default => '[LemonLDAP::NG] Password reset confirmation',
documentation => 'Mail subject for reset confirmation',
);
has 'mailFrom' => (
is => 'rw',
isa => 'Str',
default => sub {
my $self = shift;
return "noreply@" . $self->domain;
},
lazy => 1,
documentation => 'Sender email',
);
has 'mailSessionKey' => (
is => 'rw',
isa => 'Str',
default => 'mail',
documentation => 'Session parameter where mail is stored',
);
has 'mailSubject' => (
is => 'rw',
isa => 'Str',
default => '[LemonLDAP::NG] Your new password',
documentation => 'Mail subject for new password email',
);
has 'mailUrl' => (
is => 'rw',
isa => 'Str',
default => sub {
my $self = shift;
return $self->portal . "/mail.pl";
},
lazy => 1,
documentation => 'URL of password reset page',
);
has 'multiValuesSeparator' => (
is => 'rw',
isa => 'Str',
default => '; ',
documentation => 'Separator for multiple values',
);
## N
has 'nullAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '2',
documentation => 'Null authentication level',
);
## O
has 'openIdAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '1',
documentation => 'OpenID authentication level',
);
## P
has 'passwordDB' => (
is => 'rw',
isa => 'Str',
default => 'Demo',
documentation => 'Password module',
);
has 'portal' => (
is => 'rw',
isa => 'Any',
default => 'http://auth.example.com',
documentation => 'Portal URL',
);
has 'portalAutocomplete' => (
is => 'rw',
isa => 'Bool',
default => '0',
documentation => 'Allow autocompletion of login input in portal',
);
has 'portalDisplayAppslist' => (
is => 'rw',
isa => 'Str',
default => '1',
documentation => 'Display applications tab in portal',
);
has 'portalDisplayChangePassword' => (
is => 'rw',
isa => 'Str',
default => '1',
documentation => 'Display password tab in portal',
);
has 'portalDisplayLoginHistory' => (
is => 'rw',
isa => 'Str',
default => '1',
documentation => 'Display login history tab in portal',
);
has 'portalDisplayLogout' => (
is => 'rw',
isa => 'Str',
default => '1',
documentation => 'Display logout tab in portal',
);
has 'portalDisplayResetPassword' => (
is => 'rw',
isa => 'Str',
default => '1',
documentation => 'Display reset password button in portal',
);
has 'portalForceAuthn' => (
is => 'rw',
isa => 'Bool',
default => '0',
documentation => 'Force to authenticate when displaying portal',
);
has 'portalForceAuthnInterval' => (
is => 'rw',
isa => 'Int',
default => '0',
documentation =>
'Minimum number of seconds since last authentifcation to force reauthentication',
);
has 'portalOpenLinkInNewWindow' => (
is => 'rw',
isa => 'Bool',
default => '0',
documentation => 'Open applications in new windows',
);
has 'portalPingInterval' => (
is => 'rw',
isa => 'Int',
default => '60000',
documentation => 'Interval in ms between portal Ajax pings ',
);
has 'portalRequireOldPassword' => (
is => 'rw',
isa => 'Bool',
default => '1',
documentation => 'Old password is required to change the password',
);
has 'portalSkin' => (
is => 'rw',
isa => 'Str',
default => 'bootstrap',
documentation => 'Name of portal skin',
);
has 'portalUserAttr' => (
is => 'rw',
isa => 'Str',
default => '_user',
documentation => 'Session parameter to display connected user in portal',
);
## Q
## R
has 'radiusAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '3',
documentation => 'Radius authentication level',
);
has 'randomPasswordRegexp' => (
is => 'rw',
isa => 'Str',
default => '[A-Z]{3}[a-z]{5}.\d{2}',
documentation => 'Regular expression to create a random password',
);
has 'redirectFormMethod' => (
is => 'rw',
isa => 'Str',
default => 'get',
documentation => 'HTTP method for redirect page form',
);
## S
has 'samlAuthnContextMapKerberos' => (
is => 'rw',
isa => 'Int',
default => '4',
documentation => 'SAML authn context kerberos level',
);
has 'samlAuthnContextMapPassword' => (
is => 'rw',
isa => 'Int',
default => '2',
documentation => 'SAML authn context password level',
);
has 'samlAuthnContextMapPasswordProtectedTransport' => (
is => 'rw',
isa => 'Int',
default => '3',
documentation => 'SAML authn context password protected transport level',
);
has 'samlAuthnContextMapTLSClient' => (
is => 'rw',
isa => 'Int',
default => '5',
documentation => 'SAML authn context TLS client level',
);
has 'samlIdPResolveCookie' => (
is => 'rw',
isa => 'Str',
default => sub {
my $self = shift;
return $self->cookieName . "idp";
},
lazy => 1,
documentation => 'SAML IDP resolution cookie',
);
has 'samlMetadataForceUTF8' => (
is => 'rw',
isa => 'Bool',
default => '1',
documentation => 'SAML force metadata UTF8 conversion',
);
has 'samlRelayStateTimeout' => (
is => 'rw',
isa => 'Int',
default => '600',
documentation => 'SAML timeout of relay state',
);
has 'securedCookie' => (
is => 'rw',
isa => 'Int',
default => '0',
documentation => 'Cookie securisation method',
);
has 'SMTPServer' => (
is => 'rw',
isa => 'Str',
default => 'localhost',
documentation => 'SMTP Server',
);
has 'SSLAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '5',
documentation => 'SSL authentication level',
);
## T
has 'twitterAuthnLevel' => (
is => 'rw',
isa => 'Int',
default => '1',
documentation => 'Twitter authentication level',
);
## U
has 'userDB' => (
is => 'rw',
isa => 'Str',
default => 'Demo',
documentation => 'User module',
);
## V
## W
has 'whatToTrace' => (
is => 'rw',
isa => 'Str',
default => 'uid',
documentation => 'Session parameter used to fill REMOTE_USER',
);
## X
## Y
## Z
no Mouse;
1;

@ -520,135 +520,21 @@ sub getConf {
# Set default values.
sub setDefaultValues {
my $self = shift;
$self->{portal} ||=
"http" . ( $ENV{HTTPS} ? 's' : '' ) . '://' . $self->server_name();
$self->{whatToTrace} ||= 'uid';
$self->{whatToTrace} =~ s/^\$//;
$self->{httpOnly} = 1 unless ( defined( $self->{httpOnly} ) );
$self->{portalSkin} ||= 'bootstrap';
$self->{portalDisplayLogout} = 1
unless ( defined( $self->{portalDisplayLogout} ) );
$self->{portalDisplayResetPassword} = 1
unless ( defined( $self->{portalDisplayResetPassword} ) );
$self->{portalDisplayChangePassword} = 1
unless ( defined( $self->{portalDisplayChangePassword} ) );
$self->{portalDisplayAppslist} = 1
unless ( defined( $self->{portalDisplayAppslist} ) );
$self->{portalDisplayLoginHistory} = 1
unless ( defined( $self->{portalDisplayLoginHistory} ) );
$self->{jsRedirect} = 0
unless ( defined( $self->{jsRedirect} ) );
$self->{portalAutocomplete} ||= 0;
$self->{portalRequireOldPassword} = 1
unless ( defined( $self->{portalRequireOldPassword} ) );
$self->{portalOpenLinkInNewWindow} = 0
unless ( defined( $self->{portalOpenLinkInNewWindow} ) );
$self->{portalForceAuthn} = 0
unless ( defined( $self->{portalForceAuthn} ) );
$self->{portalForceAuthnInterval} = 5
unless ( defined( $self->{portalForceAuthnInterval} ) );
$self->{portalUserAttr} ||= "_user";
$self->{portalHiddenFormValues} = ();
$self->{securedCookie} ||= 0;
$self->{cookieName} ||= "lemonldap";
$self->{authentication} ||= 'LDAP';
$self->{authentication} =~ s/^ldap/LDAP/;
$self->{SMTPServer} ||= 'localhost';
$self->{randomPasswordRegexp} ||= '[A-Z]{3}[a-z]{5}.\d{2}';
$self->{mailFrom} ||= "noreply@" . $self->{domain};
$self->{mailSubject} ||= "[LemonLDAP::NG] Your new password";
$self->{mailConfirmSubject} ||=
"[LemonLDAP::NG] Password reset confirmation";
$self->{mailSessionKey} ||= 'mail';
$self->{mailUrl} ||= $self->{portal} . "/mail.pl";
$self->{multiValuesSeparator} ||= '; ';
$self->{activeTimer} = 1 unless ( defined( $self->{activeTimer} ) );
$self->{infoFormMethod} ||= "get";
$self->{confirmFormMethod} ||= "post";
$self->{redirectFormMethod} ||= "get";
$self->{authChoiceParam} ||= "lmAuth";
$self->{hiddenAttributes} = "_password"
unless defined $self->{hiddenAttributes};
$self->{portalPingInterval} = 60000
unless defined $self->{portalPingInterval};
# Set default userDB and passwordDB to DBI if authentication is DBI
if ( $self->{authentication} =~ /DBI/i ) {
$self->{userDB} ||= "DBI";
$self->{passwordDB} ||= "DBI";
}
# Set default userDB and passwordDB to Null if authentication is Null
if ( $self->{authentication} =~ /Null/i ) {
$self->{userDB} ||= "Null";
$self->{passwordDB} ||= "Null";
}
# Set userDB and passwordDB to Choice if authentication is Choice
if ( $self->{authentication} =~ /Choice/i ) {
$self->{userDB} = "Choice";
$self->{passwordDB} = "Choice";
}
# Else default to LDAP
else {
# Default to LDAP
$self->{userDB} ||= "LDAP";
$self->{passwordDB} ||= "LDAP";
}
# LDAP
$self->{ldapGroupObjectClass} ||= "groupOfNames";
$self->{ldapGroupAttributeName} ||= "member";
$self->{ldapGroupAttributeNameUser} ||= "dn";
$self->{ldapGroupAttributeNameGroup} ||= "dn";
$self->{ldapGroupAttributeNameSearch} ||= ["cn"];
$self->{ldapGroupRecursive} ||= 0;
# SAML
$self->{samlIdPResolveCookie} ||= $self->{cookieName} . "idp";
$self->{samlStorage} ||= $self->{globalStorage};
if ( !$self->{samlStorageOptions} or !%{ $self->{samlStorageOptions} } ) {
$self->{samlStorageOptions} = $self->{globalStorageOptions};
}
$self->{samlMetadataForceUTF8} = 1
unless ( defined( $self->{samlMetadataForceUTF8} ) );
$self->{samlAuthnContextMapPassword} = 2
unless defined $self->{samlAuthnContextMapPassword};
$self->{samlAuthnContextMapPasswordProtectedTransport} = 3
unless defined $self->{samlAuthnContextMapPasswordProtectedTransport};
$self->{samlAuthnContextMapTLSClient} = 5
unless defined $self->{samlAuthnContextMapTLSClient};
$self->{samlAuthnContextMapKerberos} = 4
unless defined $self->{samlAuthnContextMapKerberos};
$self->{samlRelayStateTimeout} = 600
unless defined $self->{samlRelayStateTimeout};
# CAS
$self->{casStorage} ||= $self->{globalStorage};
if ( !$self->{casStorageOptions} or !%{ $self->{casStorageOptions} } ) {
$self->{casStorageOptions} = $self->{globalStorageOptions};
}
$self->{casAccessControlPolicy} ||= "none";
# Authentication levels
$self->{ldapAuthnLevel} = 2 unless defined $self->{ldapAuthnLevel};
$self->{dbiAuthnLevel} = 2 unless defined $self->{dbiAuthnLevel};
$self->{SSLAuthnLevel} = 5 unless defined $self->{SSLAuthnLevel};
$self->{apacheAuthnLevel} = 4 unless defined $self->{apacheAuthnLevel};
$self->{nullAuthnLevel} = 0 unless defined $self->{nullAuthnLevel};
$self->{radiusAuthnLevel} = 3 unless defined $self->{radiusAuthnLevel};
foreach my $k (
qw(CAS_authnLevel openIdAuthnLevel twitterAuthnLevel googleAuthnLevel
facebookAuthnLevel)
)
{
$self->{$k} = 1 unless defined $self->{$k};
}
# Other
$self->{logoutServices} ||= {};
$self->{useSafeJail} = 1 unless defined $self->{useSafeJail};
$self->{ldapUsePasswordResetAttribute} = 1
unless ( defined( $self->{ldapUsePasswordResetAttribute} ) );

@ -36,11 +36,17 @@ $ENV{REMOTE_ADDR} = '127.0.0.1';
ok(
$p = Lemonldap::NG::Portal::Simple->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'LDAP test=1',
user => '',
password => '',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'LDAP test=1',
userDB => 'LDAP',
passwordDB => 'LDAP',
cookieName => 'lemonldap',
whatToTrace => '_user',
multiValuesSeparator => '; ',
securedCookie => 0,
user => '',
password => '',
}
),
'Portal object'
@ -60,8 +66,15 @@ $ENV{REQUEST_URI} = '/?user=test&password=';
$ENV{QUERY_STRING} = 'user=test&password=';
$p = Lemonldap::NG::Portal::Simple->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'LDAP test=1',
userDB => 'Null',
passwordDB => 'Null',
cookieName => 'lemonldap',
whatToTrace => 'dummy',
multiValuesSeparator => '; ',
securedCookie => 0,
}
);

@ -132,6 +132,8 @@ ok(
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'LDAP test=1',
userDB => 'Null',
passwordDB => 'Null',
domain => 'example.com',
trustedDomains => '.example2.com example3.com',
}

@ -74,8 +74,11 @@ SKIP: {
Directory => '/tmp/',
LockDirectory => '/tmp/',
},
domain => 'example.com',
soap => 1,
domain => 'example.com',
authentication => 'Null',
userDB => 'Null',
passwordDB => 'Null',
soap => 1,
}
),
'Portal object'

@ -20,8 +20,11 @@ $ENV{REQUEST_METHOD} = "GET";
ok(
$p = Lemonldap::NG::Portal::Simple->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Null',
userDB => 'Null',
passwordDB => 'Null',
}
),
'Portal object with Safe jail'

@ -21,6 +21,8 @@ ok(
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Apache',
userDB => 'Null',
passwordDB => 'Null',
}
)
);

@ -21,6 +21,8 @@ ok(
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'SSL',
userDB => 'Null',
passwordDB => 'Null',
}
)
);

@ -33,6 +33,8 @@ SKIP: {
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'CAS',
userDB => 'Null',
passwordDB => 'Null',
CAS_url => 'https://cas.example.com',
CAS_pgt => '/tmp/pgt.txt',
CAS_proxiedServices => {},
@ -46,6 +48,8 @@ SKIP: {
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'CAS',
userDB => 'Null',
passwordDB => 'Null',
CAS_url => 'https://cas.example.com',
CAS_pgt => '/tmp/pgt.txt',
CAS_proxiedServices => { 'CAS1' => 'http://cas1.example.com' },

@ -56,6 +56,9 @@ ok(
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Remote',
userDB => 'Null',
passwordDB => 'Null',
cookieName => 'lemonldap',
portal => 'http://abc',
remotePortal => 'http://zz/',
remoteGlobalStorage => 'Apache::Session::File',

@ -76,16 +76,22 @@ my ( $test, $testU );
ok(
$p = My::Portal->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2',
userDB => 'Multi 1;2',
getUser => sub { PE_OK },
setSessionInfo => sub { PE_OK },
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2',
userDB => 'Multi 1;2',
passwordDB => 'Null',
cookieName => 'lemonldap',
whatToTrace => 'dummy',
multiValuesSeparator => '; ',
securedCookie => 0,
hiddenAttributes => '',
getUser => sub { PE_OK },
setSessionInfo => sub { PE_OK },
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
}
),
'Portal object'
@ -104,14 +110,20 @@ my ( $test, $testU );
ok(
$p = My::Portal->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2',
userDB => 'Multi 1;2',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2',
userDB => 'Multi 1;2',
passwordDB => 'Null',
cookieName => 'lemonldap',
whatToTrace => 'dummy',
multiValuesSeparator => '; ',
securedCookie => 0,
hiddenAttributes => '',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
}
),
'Portal object'
@ -126,14 +138,20 @@ my ( $test, $testU );
ok(
$p = My::Portal->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2',
userDB => 'Multi 3;4',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2',
userDB => 'Multi 3;4',
passwordDB => 'Null',
cookieName => 'lemonldap',
whatToTrace => 'dummy',
multiValuesSeparator => '; ',
securedCookie => 0,
hiddenAttributes => '',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
}
),
'Portal object'
@ -148,14 +166,20 @@ my ( $test, $testU );
ok(
$p = My::Portal->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1 1==0;2 1==0',
userDB => 'Multi 3;4',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1 1==0;2 1==0',
userDB => 'Multi 3;4',
passwordDB => 'Null',
cookieName => 'lemonldap',
whatToTrace => 'dummy',
multiValuesSeparator => '; ',
securedCookie => 0,
hiddenAttributes => '',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
}
),
'Portal object'
@ -167,14 +191,20 @@ my ( $test, $testU );
ok(
$p = My::Portal->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2 1==0',
userDB => 'Multi 3;4',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2 1==0',
userDB => 'Multi 3;4',
passwordDB => 'Null',
cookieName => 'lemonldap',
whatToTrace => 'dummy',
multiValuesSeparator => '; ',
securedCookie => 0,
hiddenAttributes => '',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
}
),
'Portal object'
@ -186,14 +216,20 @@ my ( $test, $testU );
ok(
$p = My::Portal->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2 1==1',
userDB => 'Multi 3;4',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Multi 1;2 1==1',
userDB => 'Multi 3;4',
passwordDB => 'Null',
cookieName => 'lemonldap',
whatToTrace => 'dummy',
multiValuesSeparator => '; ',
securedCookie => 0,
hiddenAttributes => '',
portal => 'http://abc',
sessionInfo => { uid => 't', },
userNotice => sub { },
user => 'jdoe',
}
),
'Portal object'

@ -56,6 +56,9 @@ ok(
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Proxy',
userDB => 'Null',
passwordDB => 'Null',
cookieName => 'lemonldap',
portal => 'http://abc',
soapAuthService => 'https://lm.com',
}

@ -23,10 +23,12 @@ my $p;
ok(
$p = Lemonldap::NG::Portal::Simple->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
userDB => 'Null',
exportedVars => { uid => "TEST_STRING", },
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'Null',
userDB => 'Null',
passwordDB => 'Null',
exportedVars => { uid => "TEST_STRING", },
}
)
);

@ -26,9 +26,13 @@ $ENV{QUERY_STRING} = '';
ok(
$p = My::Portal->new(
{
globalStorage => 'Apache::Session::File',
domain => 'example.com',
cookieName => 'lemonldap',
globalStorage => 'Apache::Session::File',
domain => 'example.com',
cookieName => 'lemonldap',
authentication => 'Null',
userDB => 'Null',
passwordDB => 'Null',
}
),
'Portal object'

@ -21,6 +21,9 @@ my $p = Lemonldap::NG::Portal::Simple->new(
globalStorage => 'Apache::Session::File',
domain => 'example.com',
error => 0,
authentication => 'Null',
userDB => 'Null',
passwordDB => 'Null',
applicationList => {},
locationRules => {
'test.example.com' => {

@ -11,6 +11,9 @@ my $p = Lemonldap::NG::Portal::Simple->new(
globalStorage => 'Apache::Session::File',
domain => 'example.com',
error => 0,
authentication => 'Demo',
userDB => 'Null',
passwordDB => 'Null',
applicationList => {},
locationRules => {
'test.example.com' => {

@ -21,6 +21,8 @@ ok(
globalStorage => 'Apache::Session::File',
domain => 'example.com',
authentication => 'BrowserID',
userDB => 'Null',
passwordDB => 'Null',
}
)
);

Loading…
Cancel
Save