Merge branch 'llng-2.0-improvements' into 'master'

Llng 2.0 improvements

See merge request lemonldap-ng/lemonldap-ng!30
This commit is contained in:
Xavier Guimard 2018-05-01 07:34:40 +02:00
commit 9b584d9509
15 changed files with 85 additions and 74 deletions

View File

@ -8,12 +8,12 @@ sub types {
'authParamsText' => {
'test' => sub {
1;
}
}
},
'blackWhiteList' => {
'test' => sub {
1;
}
}
},
'bool' => {
'msgFail' => '__notABoolean__',
@ -36,17 +36,17 @@ sub types {
split( /\n/, $@, 0 ) )
);
return $err ? ( 1, "__badExpression__: $err" ) : 1;
}
}
},
'catAndAppList' => {
'test' => sub {
1;
}
}
},
'file' => {
'test' => sub {
1;
}
}
},
'hostname' => {
'form' => 'text',
@ -80,48 +80,48 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
if $_ =~ /exportedvars$/i and defined $conf->{$_}{$val};
}
return 1, "__unknownAttrOrMacro__: $val";
}
}
},
'longtext' => {
'test' => sub {
1;
}
}
},
'menuApp' => {
'test' => sub {
1;
}
}
},
'menuCat' => {
'test' => sub {
1;
}
}
},
'oidcmetadatajson' => {
'test' => sub {
1;
}
}
},
'oidcmetadatajwks' => {
'test' => sub {
1;
}
}
},
'oidcOPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'oidcRPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'password' => {
'msgFail' => '__malformedValue__',
'test' => sub {
1;
}
}
},
'pcre' => {
'form' => 'text',
@ -132,7 +132,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
}
};
return $@ ? ( 0, "__badRegexp__: $@" ) : 1;
}
}
},
'PerlModule' => {
'form' => 'text',
@ -142,17 +142,17 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
'portalskin' => {
'test' => sub {
1;
}
}
},
'portalskinbackground' => {
'test' => sub {
1;
}
}
},
'post' => {
'test' => sub {
1;
}
}
},
'RSAPrivateKey' => {
'test' => sub {
@ -160,7 +160,7 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
m[^(?:(?:\-+\s*BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:RSA\s+)PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}
}
},
'RSAPublicKey' => {
'test' => sub {
@ -168,7 +168,7 @@ m[^(?:(?:\-+\s*BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+=
m[^(?:(?:\-+\s*BEGIN\s+PUBLIC\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+PUBLIC\s+KEY\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}
}
},
'RSAPublicKeyOrCertificate' => {
'test' => sub {
@ -176,37 +176,37 @@ m[^(?:(?:\-+\s*BEGIN\s+PUBLIC\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\
m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+)?[\r\n]*)?$]s
? 1
: ( 1, '__badPemEncoding__' );
}
}
},
'rule' => {
'test' => sub {
1;
}
}
},
'samlAssertion' => {
'test' => sub {
1;
}
}
},
'samlAttribute' => {
'test' => sub {
1;
}
}
},
'samlIDPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'samlService' => {
'test' => sub {
1;
}
}
},
'samlSPMetaDataNode' => {
'test' => sub {
1;
}
}
},
'select' => {
'test' => sub {
@ -216,19 +216,19 @@ m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\
return $test
? 1
: ( 1, "Invalid value '$_[0]' for this select" );
}
}
},
'subContainer' => {
'keyTest' => qr/\w/,
'test' => sub {
1;
}
}
},
'text' => {
'msgFail' => '__malformedValue__',
'test' => sub {
1;
}
}
},
'trool' => {
'msgFail' => '__authorizedValues__: -1, 0, 1',
@ -1035,7 +1035,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
split( /\n/, $@, 0 ) )
);
return $err ? ( 1, "__badExpression__: $err" ) : 1;
}
}
},
'type' => 'keyTextContainer'
},
@ -1210,7 +1210,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
and defined $conf->{$_}{$val};
}
return 1, "__unknownAttrOrMacro__: $val";
}
}
},
'type' => 'doubleHash'
},
@ -1498,7 +1498,7 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
split( /\n/, $@, 0 ) )
);
return $err ? ( 1, "__badExpression__: $err" ) : 1;
}
}
},
'type' => 'ruleContainer'
},
@ -3004,19 +3004,19 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'default' => 0,
'select' => [
{
'k' => '0',
'k' => 0,
'v' => 'unsecuredCookie'
},
{
'k' => '1',
'k' => 1,
'v' => 'securedCookie'
},
{
'k' => '2',
'k' => 2,
'v' => 'doubleCookie'
},
{
'k' => '3',
'k' => 3,
'v' => 'doubleCookieForSingleSession'
}
],

View File

@ -1,5 +1,5 @@
###
# Session explorer
# Sessions explorer
###
# Max number of session to display (see overScheme)
@ -207,8 +207,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
# 2. Push session keys in result, grouped by categories
for category, attrs of categories
subres = []
for attr in attrs
for attr in attrs
if session[attr] and session[attr].match(/\w+/)
if session[attr].match(/"type":\s*"(?:TOTP|U2F|UBK)"/)
subres.push
@ -235,6 +234,8 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
value: session[attr]
epoch: ''
delete session[attr]
else
delete session[attr]
if subres.length >0
res.push
title: "__#{category}__"

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript 1.9.3
/*
* Session explorer
* Sessions explorer
*/
(function() {
@ -277,6 +277,8 @@
});
delete session[attr];
}
} else {
delete session[attr];
}
}
if (subres.length > 0) {

File diff suppressed because one or more lines are too long

View File

@ -639,7 +639,7 @@
"restConfigServer":"REST configuration server",
"restore":"Restore",
"restoreConf":"Restore configuration",
"rest2f":"REST Second Factor",
"rest2f":"REST second factor",
"rest2fActivation":"Activation",
"rest2fAuthnLevel":"Authentication level",
"rest2fInitArgs":"Init Arguments",

View File

@ -24,7 +24,7 @@
"_userDB":"Utilisateur",
"_url":"URL d'origine",
"_utime":"Tampon de la session",
"2faSessions":"Explorateur de sessions 2ndFA",
"2faSessions":"Explorateur sessions 2ndFA",
"2ndFA":"Seconds Facteurs",
"actives":"Actives",
"activeTimer":"Délai d'acceptation automatique",
@ -131,7 +131,7 @@
"casSrvMetaDataOptionsUrl":"URL du serveur",
"casSrvMetaDataNodes":"Serveurs CAS",
"casSrvName":"Nom du serveur CAS",
"casStorage":"Nom du module des session CAS",
"casStorage":"Nom du module des sessions CAS",
"casStorageOptions":"Options du module des sessions CAS",
"categoryName":"Nom de la catégorie",
"cda":"Domaines multiples",
@ -402,7 +402,7 @@
"modulesTitle":"Modules utilisés",
"multiIp":"Multi IP",
"multipleSessions":"Sessions multiples",
"multiValuesSeparator":"Separateur",
"multiValuesSeparator":"Séparateur",
"name":"Nom",
"needConfirmation":"Une nouvelle configuration est disponible. Pour sauvegarder celle-ci, cocher la case à côté du bouton 'sauver'",
"networkProblem":"Problème de réseau",
@ -504,15 +504,15 @@
"oidcServiceMetaDataJWKSURI":"JWKS",
"oidcServiceMetaDataKeys":"Clefs",
"oidcServiceMetaDataRegistrationURI":"Enregistrement",
"oidcServiceMetaDataSecurity":"Securité",
"oidcServiceMetaDataSecurity":"Sécurité",
"oidcServiceMetaDataEndSessionURI":"Fin de session",
"oidcServiceMetaDataAuthnContext":"Contexte d'authentification",
"oidcServiceMetaDataSessions":"Sessions",
"oidcServicePrivateKeySig":"Clef privée de signature",
"oidcServicePublicKeySig":"Clef publique de signature",
"oidcServiceKeyIdSig":"Identifiant de clef de signature",
"oidcStorage":"Nom du module de sessions",
"oidcStorageOptions":"Options du module de sessions",
"oidcStorage":"Nom du module des sessions",
"oidcStorageOptions":"Options du module des sessions",
"oidcOPMetaDataNodes":"Fournisseurs OpenID Connect",
"oidcRPMetaDataNodes":"Clients OpenID Connect",
"oidcOPMetaDataOptionsPrompt":"Interaction",
@ -660,7 +660,7 @@
"saveReport":"Rapport de sauvegarde",
"savingConfirmation":"Confirmation de sauvegarde",
"search":"Rechercher ...",
"secondFactors":"Second facteurs",
"secondFactors":"Seconds facteurs",
"securedCookie":"Cookie sécurisé (HTTPS)",
"security":"Sécurité",
"serverError":"Erreur du serveur",
@ -911,7 +911,7 @@
"samlIdPResolveCookie":"Nom du cookie de résolution IDP",
"samlPartnerName":"Nom du partenaire SAML",
"samlMetadataForceUTF8":"Conversion des métadonnées en UTF8",
"samlStorage":"Nom du module des session SAML",
"samlStorage":"Nom du module des sessions SAML",
"samlStorageOptions":"Options du module des sessions SAML",
"samlAuthnContextMap":"Contextes d'authentification",
"samlAuthnContextMapPassword":"Mot de passe",

View File

@ -12,7 +12,7 @@
<div class="navbar navbar-default">
<div class="navbar-collapse">
<ul class="nav navbar-nav" role="grid">
<li><a id="a-persistent" role="row"><i class="glyphicon glyphicon-exclamation-sign"></i> {{translate('2faSessions')}}</a></li>
<li><a id="a-persistent" role="row"><i class="glyphicon glyphicon-exclamation-sign"></i> {{translate('2faSessions')}} &nbsp;&nbsp;</a></li>
<form name="filterForm">
<div class="form-check ">&nbsp;&nbsp;&nbsp;
<input type="checkbox" ng-model="U2FCheck" class="form-check-input" ng-true-value="'2'" ng-false-value="'1'" ng-change="search2FA()"/>
@ -86,13 +86,13 @@
</table>
</div>
<div ng-if="!node.nodes" >
<th ng-if="node.title!='UBK' && node.title!='TOTP' && node.title!='U2F'">{{translate(node.title)}}</th>
<td ng-if="node.title=='TOTP' || node.title=='UBK' || node.title=='U2F'" >{{node.title}}</td>
<th class="col-md-3" ng-if="node.title!='UBK' && node.title!='TOTP' && node.title!='U2F'">{{translate(node.title)}}</th>
<td class="data-{{node.epoch}}" ng-if="node.title=='TOTP' || node.title=='UBK' || node.title=='U2F'" >{{node.title}}</td>
<th class="col-md-3" ng-if="node.title=='type'">{{translate(node.value)}}</th>
<td class="col-md-3" ng-if="node.title!='type'" >{{node.value}}</td>
<td class="col-md-3 data-{{node.epoch}}" ng-if="node.title!='type'" >{{node.value}}</td>
<th class="col-md-3" ng-if="node.title=='type'">{{translate(node.epoch)}}</th>
<td class="col-md-3" ng-if="node.title=='TOTP' || node.title=='UBK' || node.title=='U2F'">{{localeDate(node.epoch)}}</td>
<td >
<td class="col-md-3 data-{{node.epoch}}" ng-if="node.title=='TOTP' || node.title=='UBK' || node.title=='U2F'">{{localeDate(node.epoch)}}</td>
<td class="data-{{node.epoch}}">
<span ng-if="node.title=='TOTP' || node.title=='UBK' || node.title=='U2F'" class="link text-danger glyphicon glyphicon-minus-sign" ng-click="delete2FA(node.title, node.epoch)"></span>
<!--
<span ng-if="$last && ( node.title=='TOTP' || node.title=='UBK' || node.title=='U2F' )" class="link text-success glyphicon glyphicon-plus-sign" ng-click="menuClick({title:'newRule'})"></span>

View File

@ -94,9 +94,15 @@ sub params {
$req->param("tab") // '' )
|| "applist";
}
$res{DISPLAY_MODULES} = $self->displayModules($req);
$res{AUTH_ERROR_TYPE} =
$req->error_type( $res{AUTH_ERROR} = $req->menuError );
# Display menu 2fRegisters link only if a 2F device is registered
# $res{SFAManagment} = $self->_sfEngine->display2fRegisters($req, $req->userData) ???
$res{SFAManagment} = $req->userData->{_2fDevices} =~ /\w+/;
$self->logger->debug( "Display 2fRegisters link ? ". $res{SFAManagment} );
return %res;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 547 B

View File

@ -92,9 +92,9 @@
"accountCreationSuccess":"Your account was successfully created.",
"action":"Action",
"anotherInformation":"Another information:",
"areYouSure":"Are you sure ?",
"askToRenew":"This application needs a more recent authentication. Do you want to reauthenticate ?",
"askToUpgrade":"This application needs an higher authentication level. Do you want to reauthenticate ?",
"areYouSure":"Are you sure?",
"askToRenew":"This application needs a more recent authentication. Do you want to reauthenticate?",
"askToUpgrade":"This application needs an higher authentication level. Do you want to reauthenticate?",
"authPortal":"Authentication portal",
"authRemaining":"%s authentications remaining, change your password!",
"autoAccept":"Automatically accept in 30 seconds",

View File

@ -92,9 +92,9 @@
"accountCreationSuccess":"Your account was successfully created.",
"action":"Action",
"anotherInformation":"Another information:",
"areYouSure":"Are you sure ?",
"askToRenew":"This application needs a more recent authentication. Do you want to reauthenticate ?",
"askToUpgrade":"This application needs an higher authentication level. Do you want to reauthenticate ?",
"areYouSure":"Are you sure?",
"askToRenew":"This application needs a more recent authentication. Do you want to reauthenticate?",
"askToUpgrade":"This application needs an higher authentication level. Do you want to reauthenticate?",
"authPortal":"Authentication portal",
"authRemaining":"%s authentications remaining, change your password!",
"autoAccept":"Automatically accept in 30 seconds",

View File

@ -92,9 +92,9 @@
"accountCreationSuccess":"Your account was successfully created.",
"action":"Action",
"anotherInformation":"Another information:",
"areYouSure":"Are you sure ?",
"askToRenew":"This application needs a more recent authentication. Do you want to reauthenticate ?",
"askToUpgrade":"This application needs an higher authentication level. Do you want to reauthenticate ?",
"areYouSure":"Are you sure?",
"askToRenew":"This application needs a more recent authentication. Do you want to reauthenticate?",
"askToUpgrade":"This application needs an higher authentication level. Do you want to reauthenticate?",
"authPortal":"Authentication portal",
"authRemaining":"%s authentications remaining, change your password!",
"autoAccept":"Automatically accept in 30 seconds",

View File

@ -151,7 +151,7 @@
"mail":"Mail",
"mailSent2":"Vi é stato inviato un messaggio via mail",
"maintenanceMode":"Questa applicazione è in manutenzione, prova a connetterti più tardi",
"maxNumberof2FDevicesReached":"Maximum number of 2F devices reached !!!",
"maxNumberof2FDevicesReached":"Maximum number of 2F devices reached!!!",
"name":"Name",
"newMessages":"Nuovo(i) messaggio(i)",
"newPassword":"Nuova password",

View File

@ -92,9 +92,9 @@
"accountCreationSuccess":"Your account was successfully created.",
"action":"Action",
"anotherInformation":"Another information:",
"areYouSure":"Are you sure ?",
"askToRenew":"This application needs a more recent authentication. Do you want to reauthenticate ?",
"askToUpgrade":"This application needs an higher authentication level. Do you want to reauthenticate ?",
"areYouSure":"Are you sure?",
"askToRenew":"This application needs a more recent authentication. Do you want to reauthenticate?",
"askToUpgrade":"This application needs an higher authentication level. Do you want to reauthenticate?",
"authPortal":"Authentication portal",
"authRemaining":"%s authentications remaining, change your password!",
"autoAccept":"Automatically accept in 30 seconds",

View File

@ -74,10 +74,12 @@
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="/2fregisters">
<img src="<TMPL_VAR NAME="STATIC_PREFIX">common/icons/2FManagment.png" width="16" height="16" alt="refresh" />
<span trspan="2FManagment">2FManagment</span>
</a></li>
<TMPL_IF NAME="SFAManagment">
<li><a href="/2fregisters">
<img src="<TMPL_VAR NAME="STATIC_PREFIX">common/icons/2FManagment.png" width="16" height="16" alt="refresh" />
<span trspan="2FManagment">2FManagment</span>
</a></li>
</TMPL_IF>
<li><a href="/refresh">
<img src="<TMPL_VAR NAME="STATIC_PREFIX">common/icons/arrow_refresh.png" width="16" height="16" alt="refresh" />
<span trspan="refreshrights">Refresh</span>