Problem reading MetaData from URL

Peter Schober peter.schober at univie.ac.at
Mon Nov 14 08:58:26 EST 2016


* Priyanshu Bhalotia <priyanshu.bhalotia at wooqer.com> [2016-11-14 14:36]:
> I am encountering the folllowing issue when i am trying to use
> HTTPMetadataResolver to read my federation metadata from http url.
> 
> My logs are showing -
> *ERROR [org.opensaml.saml.metadata.resolver.impl.HTTPMetadataResolver:239]
> - Non-ok status code 500 returned from remote metadata source*

Well, if the web server returns HTTP 500 what do you expect the IDP to
be able to do about that?

> But if i copy the contents of the xml from the url and copy paste it
> into a file and then use FileBackedHTTPMetadataResolver or
> FileSystemMetadataResolver, the redirect from SP to IdP is
> successful which should mean that the metadata file content is
> correct.

Maybe the server the IDP runs at does not have direct access to the
URL you're trying to load metadata from? Maybe you'll need to use a
proxy for outgoing http?

> <MetadataProvider
> id="HTTPMetadata"
> xsi:type="FileBackedHTTPMetadataProvider"
> failFastInitialization="true"
> disregardTLSCertificate="true"
> xmlns="urn:mace:shibboleth:2.0:metadata"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:mace:shibboleth:2.0:metadata
> http://shibboleth.net/schema/idp/shibboleth-metadata.xsd"
> backingFile="%{idp.home}/metadata/example.xml" metadataURL="
> http://xyz.example.com/metadata" >
> </MetadataProvider>

Make sure there's no whitespace around the metadataURL value.
Above it looks like there's whitespace within the quoted string.

Also note that there's NO security whatsoever in what you're doing
above: You're instructing the IDP to load a plain text file over the
Internet, without verifying XML signatures or using/checking TLS, and
blindly trusting the content of that plain text file, incl
cryprographic keys etc.
Anyone able to manipulate DNS for the IDP (including affecting systems
fully outside the IDP) would be able to inject arbitrary metadata into
your running IDP, impersonating/taking over other services, etc.
-peter


More information about the users mailing list