Re: SimpleSAML_Error_MetadataNotFound: METADATANOTFOUND('%ENTITYID%' => '\'http://my-domain.com/simplesaml/module.php/saml/sp/metadata.php/techworks-sp\'')

2,968 views
Skip to first unread message

Olav Morken

unread,
Nov 2, 2012, 8:07:09 AM11/2/12
to simple...@googlegroups.com
On Wed, Oct 31, 2012 at 11:38:00 -0700, Burak Coskun wrote:
> Hi,
>
> I basically created my IdP and SP instances on the same SimpleSAMLphp and
> whenever I go to Federation page I can see both of them:
>
> SAML 2.0 SP Metadata
>
> Entity ID:
> http://my-domain.com/simplesaml/module.php/saml/sp/metadata.php/techworks-sp
> *MyWork SP*
> [ Show metadata<http://techworksdev.fmr.com/simplesaml/module.php/saml/sp/metadata.php/techworks-sp?output=xhtml>
> ]
> SAML 2.0 IdP Metadata
>
> Entity ID: my-domain.com
> *MyWork IdP*
> [ Show metadata<http://techworksdev.fmr.com/simplesaml/saml2/idp/metadata.php?output=xhtml>
> ]
>
> (But only IdP is in SAML 2.0 IdP Metadata (Trusted) fieldset.)
>
> It looks like there is something wrong with my SP but if I click on "Show
> Metadata" I can see it and convert it on "XML to simpleSAMLphp metadata
> converter" without any error.
>
> If I go to "Authentication" and test my current SP, I get this error:
>
> SimpleSAML_Error_MetadataNotFound: METADATANOTFOUND('%ENTITYID%' =>
> '\'http://my-domain.com/simplesaml/module.php/saml/sp/metadata.php/mywork-sp\'')
>
> Backtrace:
> 3 /var/www/tw-drupal/simplesamlphp/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php:293 (SimpleSAML_Metadata_MetaDataStorageHandler::getMetaData)
> 2 /var/www/tw-drupal/simplesamlphp/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php:310 (SimpleSAML_Metadata_MetaDataStorageHandler::getMetaDataConfig)
> 1 /var/www/tw-drupal/simplesamlphp/modules/saml/lib/IdP/SAML2.php:296 (sspmod_saml_IdP_SAML2::receiveAuthnRequest)
> 0 /var/www/tw-drupal/simplesamlphp/www/saml2/idp/SSOService.php:19 (N/A)
>
> But if I go to that URL from browser, it finds the metadata and downloads
> XML automatically. If I open up this XML file and copy-paste it to XML to
> SAMLphp Converter it converts without any error.
>
> I'm lost, I appreciate for any kind of help for this issue.

You need to actively register the SP metadata on your IdP, even if they
are on the same installation. See "Adding SPs to the IdP":

http://simplesamlphp.org/docs/stable/simplesamlphp-idp#section_6

Best regards,
Olav Morken
UNINETT / Feide

Burak Coskun

unread,
Nov 2, 2012, 11:29:53 AM11/2/12
to simple...@googlegroups.com
Thanks for the answer Olav but I did exactly the same thing in my saml20-idp-remote file.

    
    'name' => array(
    'en'  => 'MyWork IdP',
    ),
    
);

Burak Coskun

unread,
Nov 2, 2012, 11:33:44 AM11/2/12
to simple...@googlegroups.com
Oh OK I found out my mistake. I was saving this in idp-remote, it should've been in sp-remote! That fixed the issue, thanks Olav!
Reply all
Reply to author
Forward
0 new messages