Skip to content
Snippets Groups Projects
Commit 5c491793 authored by Olav Morken's avatar Olav Morken
Browse files

IdP iframe logout: Statistics for logout.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2172 44740490-163a-0410-bde0-09ae8108e29a
parent 51de63b5
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,16 @@ $state = SimpleSAML_Auth_State::loadState($id, 'core:Logout-IFrame'); ...@@ -9,7 +9,16 @@ $state = SimpleSAML_Auth_State::loadState($id, 'core:Logout-IFrame');
$idp = SimpleSAML_IdP::getByState($state); $idp = SimpleSAML_IdP::getByState($state);
$associations = $idp->getAssociations(); $associations = $idp->getAssociations();
$SPs = $state['core:Logout-IFrame:Associations'];
if (!isset($_REQUEST['cancel'])) {
SimpleSAML_Logger::stats('slo-iframe done');
$SPs = $state['core:Logout-IFrame:Associations'];
} else {
/* User skipped global logout. */
SimpleSAML_Logger::stats('slo-iframe skip');
$SPs = array(); /* No SPs should have been logged out. */
$state['core:Failed'] = TRUE; /* Mark as partial logout. */
}
$globalConfig = SimpleSAML_Configuration::getInstance(); $globalConfig = SimpleSAML_Configuration::getInstance();
$cookiePath = '/' . $globalConfig->getBaseURL(); $cookiePath = '/' . $globalConfig->getBaseURL();
...@@ -42,6 +51,12 @@ foreach ($SPs as $assocId => $sp) { ...@@ -42,6 +51,12 @@ foreach ($SPs as $assocId => $sp) {
$idp->terminateAssociation($assocId); $idp->terminateAssociation($assocId);
} else { } else {
SimpleSAML_Logger::warning('Unable to terminate association with ' . var_export($assocId, TRUE) . '.'); SimpleSAML_Logger::warning('Unable to terminate association with ' . var_export($assocId, TRUE) . '.');
if (isset($sp['saml:entityID'])) {
$spId = $sp['saml:entityID'];
} else {
$spId = $assocId;
}
SimpleSAML_Logger::stats('slo-iframe-fail ' . $spId);
$state['core:Failed'] = TRUE; $state['core:Failed'] = TRUE;
} }
......
...@@ -20,6 +20,10 @@ if (isset($_REQUEST['timeout'])) { ...@@ -20,6 +20,10 @@ if (isset($_REQUEST['timeout'])) {
$timeout = time() + 10; $timeout = time() + 10;
} }
if ($type !== 'embed' && $type !== 'async') {
SimpleSAML_Logger::stats('slo-iframe ' . $type);
}
$state = SimpleSAML_Auth_State::loadState($id, 'core:Logout-IFrame'); $state = SimpleSAML_Auth_State::loadState($id, 'core:Logout-IFrame');
$idp = SimpleSAML_IdP::getByState($state); $idp = SimpleSAML_IdP::getByState($state);
......
...@@ -216,6 +216,22 @@ $config = array ( ...@@ -216,6 +216,22 @@ $config = array (
'config' => 'saml20-sp-remote', 'config' => 'saml20-sp-remote',
), ),
), ),
'slopages' => array(
'name' => 'SLO iframe pages',
'descr' => 'The varioust IFrame SLO pages a user visits',
'action' => 'slo-iframe',
'col' => 6, // Page the user visits.
),
'slofail' => array(
'name' => 'Failed iframe IdP-init SLOs',
'descr' => 'The number of logout failures from various SPs',
'action' => 'slo-iframe-fail',
'col' => 6, // Service Provider EntityID that wasn't logged out.
'fieldPresentation' => array(
'class' => 'statistics:Entity',
'config' => 'saml20-sp-remote',
),
),
), ),
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment