From 02344033f386a97ae959f1e8c8353632d140913b Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 26 May 2016 16:41:58 +0200 Subject: [PATCH] Saml login fixed --- pandora_console/include/constants.php | 13 +++++++------ pandora_console/index.php | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 4c886e5a03..7cfc90e221 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -464,12 +464,13 @@ define("OPTION_CUSTOM_INPUT", 8); define("OPTION_AGENT_AUTOCOMPLETE", 9); /* SAML attributes constants */ -define("SAML_ROLE", "urn:mace:rediris.es:entitlement:monitoring:role"); -define("SAML_TAG", "urn:mace:rediris.es:entitlement:monitoring:tag"); -define("SAML_USER_DESC", "commonName"); -define("SAML_ID_USER_IN_PANDORA", "eduPersonTargetedId"); -define("SAML_GROUP_IN_PANDORA", "schacHomeOrganization"); -define("SAML_MAIL_IN_PANDORA", "mail"); + +define("SAML_ROLE_AND_TAG", "eduPersonEntitlement"); +define("SAML_USER_DESC", "commonName"); +define("SAML_ID_USER_IN_PANDORA", "eduPersonTargetedId"); +define("SAML_GROUP_IN_PANDORA", "schacHomeOrganization"); +define("SAML_MAIL_IN_PANDORA", "mail"); +define("SAML_DEFAULT_PROFILES_AND_TAGS_FORM", "urn:mace:rediris.es:entitlement:monitoring:"); /* Other constants */ define("STATUS_OK", 0); diff --git a/pandora_console/index.php b/pandora_console/index.php index 9a8bfa9b87..f26bbdd5d9 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -294,7 +294,7 @@ if (! isset ($config['id_user'])) { $nick_in_db = $saml_user_id; if (!$nick_in_db) { require_once('/opt/simplesamlphp/lib/_autoload.php'); - $as = new SimpleSAML_Auth_Simple('example-userpass'); + $as = new SimpleSAML_Auth_Simple('PandoraFMS'); $as->logout(); } } @@ -508,7 +508,7 @@ if (isset ($_GET["bye"])) { unset($iduser); if ($config['auth'] == 'saml') { require_once('/opt/simplesamlphp/lib/_autoload.php'); - $as = new SimpleSAML_Auth_Simple('example-userpass'); + $as = new SimpleSAML_Auth_Simple('PandoraFMS'); $as->logout(); } while (@ob_end_flush ());