update
i have installed and configured an SSP SP and im trying to get the authentication status of a user by using the API
as described in the docs
however im always getting SimpleSAML_Auth_Simple->isAuthenticated = false even after a successful login on the IDP side
my entry point is
http://idp.local.net/simplesaml/saml2/idp/SSOService.php?spentityid=http://sp.local.net
it takes me to the idp login form where i enter i authenticate againist our db and then i see a POST request from the idp back to the sp
using the SAML tracer extension i see
in the http tab
POST
http://idp.local.net/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp HTTP/1.1
Host:
idp.local.net...
Referer:
http://idp.local.net/simplesaml/module.php/core/loginuserpass.php?
Cookie: PHPSESSID=[..];
SimpleSAMLAuthToken=_[...]
Content-Type: application/x-www-form-urlencoded
Content-Length: 14573
HTTP/?.? 303 See Other
Date: Wed, 04 Dec 2013 12:25:36 GMT
...
Set-Cookie: SimpleSAMLAuthToken=_same as SimpleSAMLAuthToken; path=/
Location:
http://sp.local.netContent-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 403
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: text/html
in the Parameters tab
POST
SAMLResponse: along with a long string of chars
in the SAML tab
the response in xml format containinng
<saml:AttributeStatement> nodes that hold the attributes im expecting to see
in the logs/simplesamlphp.log
Dec 04 13:14:53 simplesamlphp INFO [e35f806b8e] SAML2.0 - IdP.SSOService: Accessing SAML 2.0 IdP endpoint SSOService
Dec 04 13:14:53 simplesamlphp INFO [e35f806b8e] SAML2.0 - IdP.SSOService: IdP initiated authentication: '
http://sp.local.net'
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Session: Valid session found with 'my-auth-source'.
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Session: Valid session found with 'my-auth-source'.
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Session: Valid session found with 'my-auth-source'.
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Filter config for
http://idp.local.net/simplesaml/saml2/idp/metadata.php->
http://sp.local.net: array ( 0 => sspmod_core_Auth_Process_LanguageAdaptor::__set_state(array( 'langattr' => 'preferredLanguage', 'priority' => 30, )), 1 => sspmod_core_Auth_Process_StatisticsWithAttribute::__set_state(array( 'attribute' => 'realm', 'typeTag' => 'saml20-idp-SSO', 'priority' => 45, )), 2 => sspmod_core_Auth_Process_AttributeLimit::__set_state(array( 'allowedAttributes' => array ( ), 'isDefault' => false, 'priority' => 50, )), 3 => sspmod_core_Auth_Process_LanguageAdaptor::__set_state(array( 'langattr' => 'preferredLanguage', 'priority' => 99, )), 4 => sspmod_core_Auth_Process_AttributeMap::__set_state(array( 'map' => array ( 'aRecord' => 'urn:oid:0.9.2342.19200300.100.1.26', 'aliasedEntryName' => 'urn:oid:2.5.4.1', 'aliasedObjectName' => 'urn:oid:2.5.4.1', 'associatedDomain' => 'urn:oid:0.9.2342.19200300.100.1.37', 'associatedName' => 'urn:oid:0.9.2342.19200300.100.1.38', 'audio' => 'urn:oid:0.9.2342.19200300.100.1.55', 'authorityRevocationList' => 'urn:oid:2.5.4.38', 'buildingName' => 'urn:oid:0.9.2342.19200300.100.1.48', 'businessCategory' => 'urn:oid:2.5.4.15', 'c' => 'urn:oid:2.5.4.6', 'cACertificate' => 'urn:oid:2.5.4.37', 'cNAMERecord' => 'urn:oid:0.9.2342.19200300.100.1.31', 'carLicense' => 'urn:oid:2.16.840.1.113730.3.1.1', 'certificateRevocationList' => 'urn:oid:2.5.4.39', 'cn' => 'urn:oid:2.5.4.3', 'co' => 'urn:oid:0.9.2342.19200300.100.1.43', 'commonName' => 'urn:oid:2.5.4.3', 'countryName' => 'urn:oid:2.5.4.6', 'crossCertificatePair' => 'urn:oid:2.5.4.40', 'dITRedirect' => 'urn:oid:0.9.2342.19200300.100.1.54', 'dSAQuality' => 'urn:oid:0.9.2342.19200300.100.1.49', 'dc' => 'urn:oid:0.9.2342.19200300.100.1.25', 'deltaRevocationList' => 'urn:oid:2.5.4.53', 'departmentNumber' => 'urn:oid:2.16.840.1.113730.3.1.2', 'description' => 'urn:oid:2.5.4.13', 'destinationIndicator' => 'urn:oid:2.5.4.27', 'displayName' => 'urn:oid:2.16.840.1.113730.3.1.241', 'distinguishedName' => 'urn:oid:2.5.4.49', 'dmdName' => 'urn:oid:2.5.4.54', 'dnQualifier' => 'urn:oid:2.5.4.46', 'documentAuthor' => 'urn:oid:0.9.2342.19200300.100.1.14', 'documentIdentifier' => 'urn:oid:0.9.2342.19200300.100.1.11', 'documentLocation' => 'urn:oid:0.9.2342.19200300.100.1.15', 'documentPublisher' => 'urn:oid:0.9.2342.19200300.100.1.56', 'documentTitle' => 'urn:oid:0.9.2342.19200300.100.1.12', 'documentVersion' => 'urn:oid:0.9.2342.19200300.100.1.13', 'domainComponent' => 'urn:oid:0.9.2342.19200300.100.1.25', 'drink' => 'urn:oid:0.9.2342.19200300.100.1.5', 'eduOrgHomePageURI' => 'urn:oid:1.3.6.1.4.1.5923.1.2.1.2', 'eduOrgIdentityAuthNPolicyURI' => 'urn:oid:1.3.6.1.4.1.5923.1.2.1.3', 'eduOrgLegalName' => 'urn:oid:1.3.6.1.4.1.5923.1.2.1.4', 'eduOrgSuperiorURI' => 'urn:oid:1.3.6.1.4.1.5923.1.2.1.5', 'eduOrgWhitePagesURI' => 'urn:oid:1.3.6.1.4.1.5923.1.2.1.6', 'eduPersonAffiliation' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.1', 'eduPersonEntitlement' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.7', 'eduPersonNickname' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.2', 'eduPersonOrgDN' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.3', 'eduPersonOrgUnitDN' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.4', 'eduPersonPrimaryAffiliation' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.5', 'eduPersonPrimaryOrgUnitDN' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.8', 'eduPersonPrincipalName' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.6', 'eduPersonScopedAffiliation' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.9', 'eduPersonTargetedID' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.10', 'email' => 'urn:oid:1.2.840.113549.1.9.1', 'emailAddress' => 'urn:oid:1.2.840.113549.1.9.1', 'employeeNumber' => 'urn:oid:2.16.840.1.113730.3.1.3', 'employeeType' => 'urn:oid:2.16.840.1.113730.3.1.4', 'enhancedSearchGuide' => 'urn:oid:2.5.4.47', 'facsimileTelephoneNumber' => 'urn:oid:2.5.4.23', 'favouriteDrink' => 'urn:oid:0.9.2342.19200300.100.1.5', 'fax' => 'urn:oid:2.5.4.23', 'federationFeideSchemaVersion' => 'urn:oid:1.3.6.1.4.1.2428.90.1.9', 'friendlyCountryName' => 'urn:oid:0.9.2342.19200300.100.1.43', 'generationQualifier' => 'urn:oid:2.5.4.44', 'givenName' => 'urn:oid:2.5.4.42', 'gn' => 'urn:oid:2.5.4.42', 'homePhone' => 'urn:oid:0.9.2342.19200300.100.1.20', 'homePostalAddress' => 'urn:oid:0.9.2342.19200300.100.1.39', 'homeTelephoneNumber' => 'urn:oid:0.9.2342.19200300.100.1.20', 'host' => 'urn:oid:0.9.2342.19200300.100.1.9', 'houseIdentifier' => 'urn:oid:2.5.4.51', 'info' => 'urn:oid:0.9.2342.19200300.100.1.4', 'initials' => 'urn:oid:2.5.4.43', 'internationaliSDNNumber' => 'urn:oid:2.5.4.25', 'isMemberOf' => 'urn:oid:1.3.6.1.4.1.5923.1.5.1.1', 'janetMailbox' => 'urn:oid:0.9.2342.19200300.100.1.46', 'jpegPhoto' => 'urn:oid:0.9.2342.19200300.100.1.60', 'knowledgeInformation' => 'urn:oid:2.5.4.2', 'l' => 'urn:oid:2.5.4.7', 'labeledURI' => 'urn:oid:1.3.6.1.4.1.250.1.57', 'localityName' => 'urn:oid:2.5.4.7', 'mDRecord' => 'urn:oid:0.9.2342.19200300.100.1.27', 'mXRecord' => 'urn:oid:0.9.2342.19200300.100.1.28', 'mail' => 'urn:oid:0.9.2342.19200300.100.1.3', 'mailPreferenceOption' => 'urn:oid:0.9.2342.19200300.100.1.47', 'manager' => 'urn:oid:0.9.2342.19200300.100.1.10', 'member' => 'urn:oid:2.5.4.31', 'mobile' => 'urn:oid:0.9.2342.19200300.100.1.41', 'mobileTelephoneNumber' => 'urn:oid:0.9.2342.19200300.100.1.41', 'nSRecord' => 'urn:oid:0.9.2342.19200300.100.1.29', 'name' => 'urn:oid:2.5.4.41', 'norEduOrgAcronym' => 'urn:oid:1.3.6.1.4.1.2428.90.1.6', 'norEduOrgNIN' => 'urn:oid:1.3.6.1.4.1.2428.90.1.12', 'norEduOrgSchemaVersion' => 'urn:oid:1.3.6.1.4.1.2428.90.1.11', 'norEduOrgUniqueIdentifier' => 'urn:oid:1.3.6.1.4.1.2428.90.1.7', 'norEduOrgUniqueNumber' => 'urn:oid:1.3.6.1.4.1.2428.90.1.1', 'norEduOrgUnitUniqueIdentifier' => 'urn:oid:1.3.6.1.4.1.2428.90.1.8', 'norEduOrgUnitUniqueNumber' => 'urn:oid:1.3.6.1.4.1.2428.90.1.2', 'norEduPersonBirthDate' => 'urn:oid:1.3.6.1.4.1.2428.90.1.3', 'norEduPersonLIN' => 'urn:oid:1.3.6.1.4.1.2428.90.1.4', 'norEduPersonNIN' => 'urn:oid:1.3.6.1.4.1.2428.90.1.5', 'o' => 'urn:oid:2.5.4.10', 'objectClass' => 'urn:oid:2.5.4.0', 'organizationName' => 'urn:oid:2.5.4.10', 'organizationalStatus' => 'urn:oid:0.9.2342.19200300.100.1.45', 'organizationalUnitName' => 'urn:oid:2.5.4.11', 'otherMailbox' => 'urn:oid:0.9.2342.19200300.100.1.22', 'ou' => 'urn:oid:2.5.4.11', 'owner' => 'urn:oid:2.5.4.32', 'pager' => 'urn:oid:0.9.2342.19200300.100.1.42', 'pagerTelephoneNumber' => 'urn:oid:0.9.2342.19200300.100.1.42', 'personalSignature' => 'urn:oid:0.9.2342.19200300.100.1.53', 'personalTitle' => 'urn:oid:0.9.2342.19200300.100.1.40', 'photo' => 'urn:oid:0.9.2342.19200300.100.1.7', 'physicalDeliveryOfficeName' => 'urn:oid:2.5.4.19', 'pkcs9email' => 'urn:oid:1.2.840.113549.1.9.1', 'postOfficeBox' => 'urn:oid:2.5.4.18', 'postalAddress' => 'urn:oid:2.5.4.16', 'postalCode' => 'urn:oid:2.5.4.17', 'preferredDeliveryMethod' => 'urn:oid:2.5.4.28', 'preferredLanguage' => 'urn:oid:2.16.840.1.113730.3.1.39', 'presentationAddress' => 'urn:oid:2.5.4.29', 'protocolInformation' => 'urn:oid:2.5.4.48', 'pseudonym' => 'urn:oid:2.5.4.65', 'registeredAddress' => 'urn:oid:2.5.4.26', 'rfc822Mailbox' => 'urn:oid:0.9.2342.19200300.100.1.3', 'roleOccupant' => 'urn:oid:2.5.4.33', 'roomNumber' => 'urn:oid:0.9.2342.19200300.100.1.6', 'sOARecord' => 'urn:oid:0.9.2342.19200300.100.1.30', 'searchGuide' => 'urn:oid:2.5.4.14', 'secretary' => 'urn:oid:0.9.2342.19200300.100.1.21', 'seeAlso' => 'urn:oid:2.5.4.34', 'serialNumber' => 'urn:oid:2.5.4.5', 'singleLevelQuality' => 'urn:oid:0.9.2342.19200300.100.1.50', 'sn' => 'urn:oid:2.5.4.4', 'st' => 'urn:oid:2.5.4.8', 'stateOrProvinceName' => 'urn:oid:2.5.4.8', 'street' => 'urn:oid:2.5.4.9', 'streetAddress' => 'urn:oid:2.5.4.9', 'subtreeMaximumQuality' => 'urn:oid:0.9.2342.19200300.100.1.52', 'subtreeMinimumQuality' => 'urn:oid:0.9.2342.19200300.100.1.51', 'supportedAlgorithms' => 'urn:oid:2.5.4.52', 'supportedApplicationContext' => 'urn:oid:2.5.4.30', 'surname' => 'urn:oid:2.5.4.4', 'telephoneNumber' => 'urn:oid:2.5.4.20', 'teletexTerminalIdentifier' => 'urn:oid:2.5.4.22', 'telexNumber' => 'urn:oid:2.5.4.21', 'textEncodedORAddress' => 'urn:oid:0.9.2342.19200300.100.1.2', 'title' => 'urn:oid:2.5.4.12', 'uid' => 'urn:oid:0.9.2342.19200300.100.1.1', 'uniqueIdentifier' => 'urn:oid:0.9.2342.19200300.100.1.44', 'uniqueMember' => 'urn:oid:2.5.4.50', 'userCertificate' => 'urn:oid:2.5.4.36', 'userClass' => 'urn:oid:0.9.2342.19200300.100.1.8', 'userPKCS12' => 'urn:oid:2.16.840.1.113730.3.1.216', 'userPassword' => 'urn:oid:2.5.4.35', 'userSMIMECertificate' => 'urn:oid:2.16.840.1.113730.3.1.40', 'userid' => 'urn:oid:0.9.2342.19200300.100.1.1', 'x121Address' => 'urn:oid:2.5.4.24', 'x500UniqueIdentifier' => 'urn:oid:2.5.4.45', 'schacHomeOrganization' => 'urn:oid:1.3.6.1.4.1.25178.1.2.9', 'schacPersonalUniqueCode' => 'urn:oid:1.3.6.1.4.1.25178.1.2.14', ), 'duplicate' => false, 'priority' => 100, )),)
Dec 04 13:14:53 simplesamlphp NOTICE STAT [e35f806b8e] saml20-idp-SSO
http://sp.local.net http://idp.local.net/simplesaml/saml2/idp/metadata.php NA
Dec 04 13:14:53 simplesamlphp INFO [e35f806b8e] Sending SAML 2.0 Response to '
http://sp.local.net'
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Sending message:
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] <samlp:Response>
...xml response is here
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] </samlp:Response>
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Received message:
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_833c654014a1b965e1fe98dc95bec5b6ac4a8fec22" Version="2.0" IssueInstant="2013-12-04T12:14:53Z" Destination="
http://idp.local.net/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp">
...xml response is here
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] </samlp:Response>
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Received SAML2 Response from '
http://idp.local.net/simplesaml/saml2/idp/metadata.php'.
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Has 1 candidate keys for validation.
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Validation with key #0 succeeded.
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Has 1 candidate keys for validation.
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Validation with key #0 succeeded.
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Filter config for
http://idp.local.net/simplesaml/saml2/idp/metadata.php->
http://sp.local.net: array ( 0 => sspmod_core_Auth_Process_GenerateGroups::__set_state(array( 'generateGroupsFrom' => array ( 0 => 'eduPersonAffiliation', ), 'priority' => 60, )), 1 => sspmod_core_Auth_Process_AttributeAdd::__set_state(array( 'replace' => false, 'attributes' => array ( 'groups' => array ( 0 => 'users', 1 => 'members', ), ), 'priority' => 61, )), 2 => sspmod_core_Auth_Process_LanguageAdaptor::__set_state(array( 'langattr' => 'preferredLanguage', 'priority' => 90, )),)
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] GenerateGroups - attribute 'eduPersonAffiliation' not found.
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Session: doLogin("default-sp")
Dec 04 13:14:53 simplesamlphp DEBUG [e35f806b8e] Session: doLogout('default-sp')