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

@ -3004,19 +3004,19 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'default' => 0, 'default' => 0,
'select' => [ 'select' => [
{ {
'k' => '0', 'k' => 0,
'v' => 'unsecuredCookie' 'v' => 'unsecuredCookie'
}, },
{ {
'k' => '1', 'k' => 1,
'v' => 'securedCookie' 'v' => 'securedCookie'
}, },
{ {
'k' => '2', 'k' => 2,
'v' => 'doubleCookie' 'v' => 'doubleCookie'
}, },
{ {
'k' => '3', 'k' => 3,
'v' => 'doubleCookieForSingleSession' 'v' => 'doubleCookieForSingleSession'
} }
], ],

View File

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

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript 1.9.3 // Generated by CoffeeScript 1.9.3
/* /*
* Session explorer * Sessions explorer
*/ */
(function() { (function() {
@ -277,6 +277,8 @@
}); });
delete session[attr]; delete session[attr];
} }
} else {
delete session[attr];
} }
} }
if (subres.length > 0) { 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", "restConfigServer":"REST configuration server",
"restore":"Restore", "restore":"Restore",
"restoreConf":"Restore configuration", "restoreConf":"Restore configuration",
"rest2f":"REST Second Factor", "rest2f":"REST second factor",
"rest2fActivation":"Activation", "rest2fActivation":"Activation",
"rest2fAuthnLevel":"Authentication level", "rest2fAuthnLevel":"Authentication level",
"rest2fInitArgs":"Init Arguments", "rest2fInitArgs":"Init Arguments",

View File

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

View File

@ -12,7 +12,7 @@
<div class="navbar navbar-default"> <div class="navbar navbar-default">
<div class="navbar-collapse"> <div class="navbar-collapse">
<ul class="nav navbar-nav" role="grid"> <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"> <form name="filterForm">
<div class="form-check ">&nbsp;&nbsp;&nbsp; <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()"/> <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> </table>
</div> </div>
<div ng-if="!node.nodes" > <div ng-if="!node.nodes" >
<th ng-if="node.title!='UBK' && node.title!='TOTP' && node.title!='U2F'">{{translate(node.title)}}</th> <th class="col-md-3" 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> <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> <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> <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 class="col-md-3 data-{{node.epoch}}" ng-if="node.title=='TOTP' || node.title=='UBK' || node.title=='U2F'">{{localeDate(node.epoch)}}</td>
<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="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> <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,10 +94,16 @@ sub params {
$req->param("tab") // '' ) $req->param("tab") // '' )
|| "applist"; || "applist";
} }
$res{DISPLAY_MODULES} = $self->displayModules($req); $res{DISPLAY_MODULES} = $self->displayModules($req);
$res{AUTH_ERROR_TYPE} = $res{AUTH_ERROR_TYPE} =
$req->error_type( $res{AUTH_ERROR} = $req->menuError ); $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; 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.", "accountCreationSuccess":"Your account was successfully created.",
"action":"Action", "action":"Action",
"anotherInformation":"Another information:", "anotherInformation":"Another information:",
"areYouSure":"Are you sure ?", "areYouSure":"Are you sure?",
"askToRenew":"This application needs a more recent authentication. Do you want to reauthenticate ?", "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 ?", "askToUpgrade":"This application needs an higher authentication level. Do you want to reauthenticate?",
"authPortal":"Authentication portal", "authPortal":"Authentication portal",
"authRemaining":"%s authentications remaining, change your password!", "authRemaining":"%s authentications remaining, change your password!",
"autoAccept":"Automatically accept in 30 seconds", "autoAccept":"Automatically accept in 30 seconds",

View File

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

View File

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

View File

@ -151,7 +151,7 @@
"mail":"Mail", "mail":"Mail",
"mailSent2":"Vi é stato inviato un messaggio via mail", "mailSent2":"Vi é stato inviato un messaggio via mail",
"maintenanceMode":"Questa applicazione è in manutenzione, prova a connetterti più tardi", "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", "name":"Name",
"newMessages":"Nuovo(i) messaggio(i)", "newMessages":"Nuovo(i) messaggio(i)",
"newPassword":"Nuova password", "newPassword":"Nuova password",

View File

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

View File

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