Custom metadata provider

Rod Widdowson rdw at steadingsoftware.com
Wed Dec 9 11:49:10 EST 2015


>  Please advise on the pieces to be implemented for a (custom) Database
metadata provider that fetches metadata from the DB.  

There's a lot of work involved.  Most of the code which might help you
"impl" which means it will change without warning.

Basically you will need to build something that implements
org.opensaml.saml.metadata.resolver.RefreshableMetadataResolver.

I'd start by looking at
org.opensaml.saml.metadata.resolver.impl.FilesystemMetadataResolver (but
remember that many of the objects it inherits from are in the impl tree)

Then for configuration it up you will want to extend
net.shibboleth.idp.profile.spring.relyingparty.metadata.AbstractMetadataProv
iderParser in the "usual way for Spring". 

Alternatively you could do this in native spring by summoning up your bean
and putting it in to a
net.shibboleth.idp.saml.metadata.RelyingPartyMetadataProvider.  Then put
that SpringFile which defines the those beans into the lisyt beal called
"shibboleth.MetadataResolverResources".

That’s a lot of work.

Were it feasibly, a much better solution would be to build something which
implements org.springframework.core.io.Resource and/or
net.shibboleth.utilities.java.support.resource.Resource and plug that into a
org.opensaml.saml.metadata.resolver.impl.ResourceBackedMetadataResolver 

However that is also in impl and you would not be safe to use it, further
you'd still have all the issues around parsing.

So....  I'd listen to a RFE which asked that the
"ResourceBackedMetadataProvider" be extended to have a "beanRef" which would
be a bean which implemented Resource.

Rod



More information about the dev mailing list