- NEW FILE: php/metadata/saml20-sp-hosted.php, contains:
And I made the following tweaks to the default 1.8.2 tarball on the SP
installation:
- MODIFIED FILE: simplesamlphp/config/config.php, changed:
< 'secretsalt' => 'defaultsecretsalt',
---
> 'secretsalt' => '0oih0nduvekcpzbdcwwcup48r0eu4bs5',
< 'enable.saml20-idp' => false,
---
> 'enable.saml20-idp' => true,
- MODIFIED FILE: metadata/saml20-idp-remote.php, added:
$metadata['https://idp.my.domain:34443'] = array(
Comel,
Thank you very much for taking the time to read my question and
prepare a reply with suggestions.
Unfortunately the recommended changes do not seem to resolve my issue.
As per your message, I made the following changes in idp.my.domain
SimpleSAMLphp configuration:
- Discard metadata/saml20-idp-remote.php
- Modify medadata/saml20-idp-hosted.php, add:
$metadata['https://idp.my.domain:34443'] = array(
'name' => array(
'en' => 'My Test Server'
),
'description' => 'Login with test credentials.',
'SingleSignOnService' => 'https://idp.my.domain:34443/simplesaml/
saml2/idp/SSOService.php',
'SingleLogoutService' => 'https://idp.my.domain:34443/simplesaml/
saml2/idp/SingleLogoutService.php',
'certFingerprint' => 'AF:E7:1C:28:EF:74:0B:C8:74:25:BE:
13:A2:26:3D:37:97:1D:A1:F9'
);
Unfortunately, when I navigate to "Test Authentication Sources" in the
admin UI on sp.my.domain
and select "default-sp" I get the following Exception:
SimpleSAML_Error_MetadataNotFound: METADATANOTFOUND('ENTITYID' =>
'\'https://idp.my.domain:34443\'') in /var/simplesamlphp-1.8.2/lib/
SimpleSAML/Metadata/MetaDataStorageHandler.php on line 293
Are you sharing the config between the IdP and SP hostnames? Generally,
I would expect you to test the SP from the SP hostname
> But I still get the same Exception when I navigate to the "Federation"
> page (https://idp.my.domain:34443/simplesaml/module.php/core/
> frontpage_federation.php)
>
> Exception: Could not find any default metadata entities in set [saml20-
> sp-hosted] for host [idp.my.domain : idp.my.domain/simplesaml] in /var/
> simplesamlphp-1.8.2/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
> on line 230
Do you have a stack trace for this exception?
> I would not expect such generic configs for an IdP to cause Exceptions
> when browsing the admin UI.
>
> Also, I'm also not sure why (on the Federation page) I even see an
> item called "SAML 2.0 SP Metadata" with:
>
> Entity ID: https://idp.my.domain:34443/simplesaml/module.php/saml/sp/metadata.php/default-sp
> default-sp
> [ Show metadata ] (link looks OK, shows XML from the above URL)
This happens when you have the default-sp authentication source enabled
on the IdP.
At this point I am uncertain about exactly how your setup is
configured. I tried to read through this email thread, but I just
became more confused :)
Could you give a summary of what you have configured in:
- config/authsources.php (for both the IdP and SP)
- metadata/saml20-sp-remote.php (at the IdP)
- metadata/saml20-idp-hosted.php (at the IdP)
- metadata/saml20-idp-remote.php (at the SP)
Best regards,
Olav Morken
UNINETT / Feide
This error happens inside a try-catch block that discards this
exception. (The exception in this location is expected when you are not
using the old SP code, which is only available for backwards
compatibility.)
Do you by any chance have a debug extension installed that aborts the
script as soon as an exception is thrown?
This entry does not appear to be in use, and should probably be removed.
(Alternatively, you can change the entityID of your IdP to be
'https://idp.my.domain:34443', and remove the other entry.)
> > $metadata['https://idp.my.domain:34443/simplesaml/saml2/idp/metadata.php'] = array(
> > 'name' => array(
> > 'en' => 'My Test Server'
> > ),
> > 'description' => 'Login with test credentials.',
> > 'SingleSignOnService' => 'https://idp.my.domain:34443/simplesaml/saml2/idp/SSOService.php',
> > 'SingleLogoutService' => 'https://idp.my.domain:34443/simplesaml/saml2/idp/SingleLogoutService.php',
> > 'certFingerprint' => 'AF:E7:1C:28:EF:74:0B:C8:74:25:BE:13:A2:26:3D:37:97:1D:A1:F9'
> > );
> >
>
> ON THE IDP SIDE: (idp.my.domain:34443)
> ======================================
> diff --recursive tmp/simplesamlphp-1.8.2/config/authsources.php
> simplesamlphp/config/authsources.php
> 25c25
> < 'idp' => NULL,
> ---
> > 'idp' => 'https://idp.my.domain:34443/simplesaml/saml2/idp/metadata.php',
This change is not necessary on the IdP - the default-sp entry is only
used on the SP.
> 52d51
> < /*
> 64d62
> < */
> Only in simplesamlphp/config: config-sanitycheck.php
> diff --recursive tmp/simplesamlphp-1.8.2/metadata/saml20-sp-remote.php
> simplesamlphp/metadata/saml20-sp-remote.php
> 27a28,35
> >
> > /*
> > * Peter's Test Example simpleSAMLphp SAML 2.0 SP
> > */
> > $metadata['https://sp.my.domain:2443/simplesaml/module.php/saml/sp/metadata.php/default-sp'] = array(
> > 'AssertionConsumerService' => 'https://sp.my.domain:2443/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp',
> > 'SingleLogoutService' => 'https://sp.my.domain:2443/simplesaml/module.php/saml/sp/saml2-logout.php/default-sp',
> > );
> Only in simplesamlphp/modules/exampleauth: enable
The rest looks correct.