Skip to content
Snippets Groups Projects
Commit 1426d4e3 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Check schema version on LDAP in ldapstatus

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1556 44740490-163a-0410-bde0-09ae8108e29a
parent d13e41bb
No related branches found
No related tags found
No related merge requests found
......@@ -238,6 +238,18 @@ class sspmod_ldapstatus_Auth_Backend_Test_StandardLDAPTest extends sspmod_feide_
$result['getTestOrg'] = array(TRUE,$tester->tack('getTestOrg'));
$result['getTestOrg']['time'] = $tester->tack('getTestOrg', FALSE);
if (array_key_exists('eduPersonOrgDN:norEduOrgSchemaVersion', $attributes)) {
if ($attributes['eduPersonOrgDN:norEduOrgSchemaVersion'][0] == '1.4') {
$result['schema'] = array(TRUE, 'Version: ' . $attributes['eduPersonOrgDN:norEduOrgSchemaVersion'][0]);
} else {
$result['schema'] = array(FALSE, 'Version: ' . $attributes['eduPersonOrgDN:norEduOrgSchemaVersion'][0]);
}
}
$result['getTestOrg'] = array(TRUE,$tester->tack('getTestOrg'));
$result['getTestOrg']['time'] = $tester->tack('getTestOrg', FALSE);
} catch(Exception $e) {
$tester->log('LDAP Test user attributes failed: ' . $e->getMessage());
$result['getTestOrg'] = array(FALSE,$e->getMessage());
......
......@@ -165,6 +165,7 @@ presentRes('ldapSearchTestUser', 'Search for test user', 'Search LDAP for the DN
presentRes('ldapBindTestUser', 'Test user bind()', 'Trying to bind() as the DN found when searching for the test user');
presentRes('getTestOrg', 'Get organization attributes', 'Getting attributes from referred eduOrgDN and eduOrgUnitDN (from test user)');
presentRes('configMeta', 'Contact information registered', 'Checking for additional contact addresss in configuration.');
presentRes('schema', 'Schema version', 'Checking if most recent version of the LDAP schema is used.');
?>
</div><!-- end ldap status -->
......
......@@ -41,6 +41,7 @@ $this->includeAtTemplateBase('includes/header.php');
<th><a href="?sort=ldapBindTestUser">T-bind()</a></th>
<th><a href="?sort=getTestOrg">Org-info</a></th>
<th><a href="?sort=configMeta">Meta</a></th>
<th><a href="?sort=schema">Schema</a></th>
<th><a href="?sort=time">Time</a></th>
</tr>
......@@ -114,6 +115,7 @@ foreach($this->data['sortedOrgIndex'] as $orgkey) {
showRes('ldapBindTestUser', $res, $this);
showRes('getTestOrg', $res, $this);
showRes('configMeta', $res, $this);
showRes('schema', $res, $this);
if ($res['time'] > 2.0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment