Commit 99ddfbfe authored by Xavier Guimard's avatar Xavier Guimard

Rename _startTime and _updateTime (#1169)

parent 1f24e2e6
......@@ -45,9 +45,9 @@ sub init {
my $now = time;
my $ts = strftime "%Y%m%d%H%M%S", localtime;
print F '{"updateTime":"'
print F '{"_updateTime":"'
. $ts
. '","_timezone":"1","_session_kind":"SSO","_passwordDB":"Demo","startTime":"'
. '","_timezone":"1","_session_kind":"SSO","_passwordDB":"Demo","_startTime":"'
. $ts
. '","ipAddr":"127.0.0.1","UA":"Mozilla/5.0 (X11; VAX4000; rv:43.0) Gecko/20100101 Firefox/143.0 Iceweasel/143.0.1","_user":"dwho","_userDB":"Demo","_lastAuthnUTime":'
. $now
......
......@@ -33,7 +33,7 @@ schemes =
(t,v,q) ->
q.replace(/\&groupBy.*$/, '') + "&_whatToTrace=#{v}"
]
startTime: [
_startTime: [
(t,v) ->
"groupBy=substr(#{t},8)"
(t,v) ->
......@@ -75,7 +75,7 @@ hiddenAttributes = '_password'
# Attributes to group in session display
categories =
dateTitle: ['_utime', 'startTime', 'updateTime', '_lastAuthnUTime', '_lastSeen']
dateTitle: ['_utime', '_startTime', '_updateTime', '_lastAuthnUTime', '_lastSeen']
connectionTitle: ['ipAddr', '_timezone', '_url']
authenticationTitle:['_session_id', '_user', '_password', 'authenticationLevel']
modulesTitle: ['_auth', '_userDB', '_passwordDB', '_issuerDB', '_authChoice', '_authMulti', '_userDBMulti']
......@@ -194,7 +194,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
session[key] = '********'
else if key.match /^(_utime|_lastAuthnUTime|_lastSeen|notification)$/
session[key] = $scope.localeDate value
else if key.match /^(startTime|updateTime)$/
else if key.match /^(_startTime|_updateTime)$/
session[key] = _stToStr value
res = []
......@@ -301,9 +301,9 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
scheme = if schemes[$scope.type]
schemes[$scope.type]
# - updateTime must be displayed as startDate
else if $scope.type == 'updateTime'
schemes.startTime
# - _updateTime must be displayed as startDate
else if $scope.type == '_updateTime'
schemes._startTime
# - default to _whatToTrace scheme
else
......
......@@ -43,7 +43,7 @@
return q.replace(/\&groupBy.*$/, '') + ("&_whatToTrace=" + v);
}
],
startTime: [
_startTime: [
function(t, v) {
return "groupBy=substr(" + t + ",8)";
}, function(t, v) {
......@@ -92,7 +92,7 @@
hiddenAttributes = '_password';
categories = {
dateTitle: ['_utime', 'startTime', 'updateTime', '_lastAuthnUTime', '_lastSeen'],
dateTitle: ['_utime', '_startTime', '_updateTime', '_lastAuthnUTime', '_lastSeen'],
connectionTitle: ['ipAddr', '_timezone', '_url'],
authenticationTitle: ['_session_id', '_user', '_password', 'authenticationLevel'],
modulesTitle: ['_auth', '_userDB', '_passwordDB', '_issuerDB', '_authChoice', '_authMulti', '_userDBMulti'],
......@@ -225,7 +225,7 @@
session[key] = '********';
} else if (key.match(/^(_utime|_lastAuthnUTime|_lastSeen|notification)$/)) {
session[key] = $scope.localeDate(value);
} else if (key.match(/^(startTime|updateTime)$/)) {
} else if (key.match(/^(_startTime|_updateTime)$/)) {
session[key] = _stToStr(value);
}
}
......@@ -351,7 +351,7 @@
$scope.updateTree = function(value, node, level, over, currentQuery, count) {
var query, scheme, tmp;
$scope.waiting = true;
scheme = schemes[$scope.type] ? schemes[$scope.type] : $scope.type === 'updateTime' ? schemes.startTime : schemes._whatToTrace;
scheme = schemes[$scope.type] ? schemes[$scope.type] : $scope.type === '_updateTime' ? schemes._startTime : schemes._whatToTrace;
query = scheme[level]($scope.type, value, currentQuery);
if (count > max && overScheme[$scope.type]) {
if (tmp = overScheme[$scope.type]($scope.type, value, level, over, currentQuery)) {
......
......@@ -17,7 +17,9 @@
"_passwordDB": "Password",
"_samlToken": "SAML token",
"_session_id": "Session identifier",
"_startTime": "Creation date",
"_timezone": "Time zone",
"_updateTime": "Update date",
"_user": "Login",
"_userDB": "User",
"_userDBMulti": "User (multi)",
......@@ -636,7 +638,6 @@
"sslParams": "SSL parameters",
"SSLVar": "Extracted certificate field",
"SSLVarIf": "Conditional extracted certificate field",
"startTime": "Creation date",
"stayConnected": "Persistent connections",
"successfullySaved": "Successfully saved",
"storePassword": "Store user password in session datas",
......@@ -668,7 +669,6 @@
"unknownKey": "Unknown key",
"unsecuredCookie": "Unsecured cookie",
"up": "Move up",
"updateTime": "Update date",
"uploadDenied": "Upload denied",
"uri": "URI",
"url": "URL",
......
......@@ -17,7 +17,9 @@
"_passwordDB": "Mot de passe",
"_samlToken": " Jeton SAML ",
"_session_id": "Identifiant de session",
"_startTime": "Date de création",
"_timezone": "Zone horaire",
"_updateTime": "Date de mise à jour",
"_user": "Identifiant",
"_userDB": "Utilisateur",
"_userDBMulti": "Utilisateur (multi)",
......@@ -636,7 +638,6 @@
"sslParams": "Paramètres SSL",
"SSLVar": "Champ extrait du certificat",
"SSLVarIf": "Champ conditionnel extrait du certificat",
"startTime": "Date de création",
"stayConnected": "Connexions persistantes",
"successfullySaved": "Sauvegarde effectuée",
"storePassword": "Stocke le mot de passe de l'utilisateur en session",
......@@ -668,7 +669,6 @@
"unknownKey": "Clef inconnue",
"unsecuredCookie": "Cookie non sécurisé",
"up": "Monter",
"updateTime": "Date de mise à jour",
"uploadDenied": "Téléchargement refusé",
"uri": "URI",
"url": "URL",
......
......@@ -19,8 +19,8 @@
<li><a id="a-ip" href="#/ipAddr"><i class="glyphicon glyphicon-sort-by-order"></i> {{translate('ipAddresses')}}</a></li>
<li><a id="a-multi" href="#/doubleIp"><i class="glyphicon glyphicon-exclamation-sign"></i> {{translate('multiIp')}}</a></li>
<li><a id="a-multi" href="#/persistent"><i class="glyphicon glyphicon-exclamation-sign"></i> {{translate('persistent')}}</a></li>
<li><a id="a-starttime" href="#/startTime"><i class="glyphicon glyphicon-hourglass"></i> {{translate('startTime')}}</a></li>
<li><a id="a-updatetime" href="#/updateTime"><i class="glyphicon glyphicon-hourglass"></i> {{translate('updateTime')}}</a></li>
<li><a id="a-starttime" href="#/_startTime"><i class="glyphicon glyphicon-hourglass"></i> {{translate('_startTime')}}</a></li>
<li><a id="a-updatetime" href="#/_updateTime"><i class="glyphicon glyphicon-hourglass"></i> {{translate('_updateTime')}}</a></li>
</ul>
</div>
</div>
......
......@@ -306,12 +306,12 @@ sub setSessionInfo {
# Date and time
if ( $self->conf->{updateSession} ) {
$req->{sessionInfo}->{updateTime} =
$req->{sessionInfo}->{_updateTime} =
strftime( "%Y%m%d%H%M%S", localtime() );
}
else {
$req->{sessionInfo}->{_utime} ||= time();
$req->{sessionInfo}->{startTime} =
$req->{sessionInfo}->{_startTime} =
strftime( "%Y%m%d%H%M%S", localtime() );
$req->{sessionInfo}->{_lastSeen} = time()
if $self->conf->{timeoutActivity};
......
......@@ -440,8 +440,8 @@ sub updateSession {
$infos->{$_};
}
# Update session in global storage with updateTime
$infos->{updateTime} = strftime( "%Y%m%d%H%M%S", localtime() );
# Update session in global storage with _updateTime
$infos->{_updateTime} = strftime( "%Y%m%d%H%M%S", localtime() );
if ( my $apacheSession =
$self->getApacheSession( $id, info => $infos ) )
{
......
......@@ -66,7 +66,7 @@ has exportedAttr => (
else {
my @attributes = (
'authenticationLevel', 'groups',
'ipAddr', 'startTime',
'ipAddr', '_startTime',
'_utime', '_lastSeen',
'_session_id',
);
......
......@@ -39,7 +39,7 @@ has exportedAttr => (
else {
my @attributes = (
'authenticationLevel', 'groups',
'ipAddr', 'startTime',
'ipAddr', '_startTime',
'_utime', '_lastSeen',
'_session_id',
);
......
{"authenticationLevel":0,"_auth":"Demo","_whatToTrace":"dwho","_session_kind":"SSO","_user":"dwho","hGroups":{},"cn":"Doctor Who","_lastAuthnUTime":1464295296,"_session_id":"6e30af4ffa5689b3e49a104d1b160d316db2b2161a0f45776994eed19dbdc101","_passwordDB":"Demo","_issuerDB":"Null","updateTime":"20160526224136","UA":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0","uid":"dwho","groups":"","_utime":1464295296,"_timezone":"2","_url":"http://manager.example.com:19876/","loginHistory":{"successLogin":[{"ipAddr":"127.0.0.1","_utime":1464295296}]},"ipAddr":"127.0.0.1","mail":"dwho@badwolf.org","startTime":"20160526224136","_userDB":"Demo"}
\ No newline at end of file
{"authenticationLevel":0,"_auth":"Demo","_whatToTrace":"dwho","_session_kind":"SSO","_user":"dwho","hGroups":{},"cn":"Doctor Who","_lastAuthnUTime":1464295296,"_session_id":"6e30af4ffa5689b3e49a104d1b160d316db2b2161a0f45776994eed19dbdc101","_passwordDB":"Demo","_issuerDB":"Null","_updateTime":"20160526224136","UA":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0","uid":"dwho","groups":"","_utime":1464295296,"_timezone":"2","_url":"http://manager.example.com:19876/","loginHistory":{"successLogin":[{"ipAddr":"127.0.0.1","_utime":1464295296}]},"ipAddr":"127.0.0.1","mail":"dwho@badwolf.org","_startTime":"20160526224136","_userDB":"Demo"}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment