Data connector defined in native Spring
Petr Medek (DHL IT Services)
Petr.Medek at dhl.com
Tue Mar 8 10:16:07 EST 2016
Hello
I have developed custom data connector for some Idp attributes. I use my own parser and definition in attribute-resolver.xml through resolver:DataConnector and it works fine.
Now I want to extend this connector and inject some Spring beans into the connector. According to documentation at https://wiki.shibboleth.net/confluence/display/IDP30/3.+Developing+Attribute+Resolver+Extensions#id-3.DevelopingAttributeResolverExtensions-NativeSpringConfiguration it should be possible to define the connector as spring bean and use it in attribute-resolver.xml.
So I removed my resolver:DataConnector element from attribute-resolver.xml and configured spring bean with the same name in global.xml.
The attribute using this data connector is defined like:
<resolver:AttributeDefinition xsi:type="ad:Simple" id="action" sourceAttributeID="umAction">
<resolver:Dependency ref="umConn" />
<resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:1.3.6.1.4.1.5923.1.5.1.1" friendlyName="action" encodeType="false" />
</resolver:AttributeDefinition>
and my spring bean is:
<bean id="umConn" class="com.dhl.shibboleth.dc.UmRolesDataConnector">
...
</bean>
However when Shibboleth starts the attribute definition is wrong with message in idp-warning.log:
2016-03-08 15:14:59,635 - ERROR [net.shibboleth.utilities.java.support.service.AbstractReloadableService:181] - Service 'shibboleth.AttributeResolverService': Initial load failed
net.shibboleth.utilities.java.support.service.ServiceException: Failed to load [file [/opt/shibboleth-idp/conf/attribute-resolver.xml]]
at net.shibboleth.ext.spring.service.ReloadableSpringService.doReload(ReloadableSpringService.java:344)
Caused by: net.shibboleth.utilities.java.support.service.ServiceException: Unable to initialize attribute resolver for ApplicationContext:shibboleth.AttributeResolverService
at net.shibboleth.idp.attribute.resolver.spring.AttributeResolverServiceStrategy.apply(AttributeResolverServiceStrategy.java:73)
Caused by: net.shibboleth.utilities.java.support.component.ComponentInitializationException: Attribute Resolver 'ShibbolethAttributeResolver': Plugin 'action' has a dependency on plugin 'umConn' which doesn't exist
at net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl.checkPlugInDependencies(AttributeResolverImpl.java:479)
2016-03-08 15:15:01,016 - ERROR [net.shibboleth.idp.saml.metadata.impl.AttributeMappingNodeProcessor:144] - Requested Attributes Mapper: Invalid Attribute resolver configuration.
So what I missed from the wiki page? Do I need to use different file than global.xml or this native spring definition works in some other way?
I'm using IDP 3.1.1.
Thanks for any hint
Petr
This message is from DHL Information Services (Europe) s.r.o. and may contain confidential business information. It is intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient please contact the sender and delete this message and any attachment from your system. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its attachments is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20160308/e324ef86/attachment-0001.html>
More information about the dev
mailing list