Name-value pair mapping strategy for attribute resolver

Kim, Allan jak009 at ucsd.edu
Mon May 16 18:43:53 EDT 2016


Long time listener, first time caller ... I'd like to submit the attached ResultMappingStrategy implementation for resolving attributes stored as name-value pairs. When used with a relational database connector this will map any number of attributes in a single operation. For example:

                <resolver:DataConnector id="attributes" xsi:type="dc:RelationalDatabase" mappingStrategyRef="NVPMapping">
                                <resolver:Dependency ref="uid" />
                                <dc:BeanManagedConnection>myDataSource</dc:BeanManagedConnection>
                                <dc:QueryTemplate>
                                <![CDATA[
                                select name as "_NVP_NAME_", value as "_NVP_VALUE_" from mydb.attribute where uid='$uid.get(0)'
                                ]]>
                                </dc:QueryTemplate>
                </resolver:DataConnector>

                <bean id="NVPMapping" class="net.shibboleth.idp.attribute.resolver.dc.rdbms.impl.NameValuePairMappingStrategy" />

Submitted patch is against tag 3.2.1 (r8056). Thanks for your time and consideration!



Allan Kim
(insert IAM-related job title here)
Information Technology Services - IT Security (ITS-ITS)
University of California, San Diego

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20160516/425fa84c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NameValuePairMappingStrategy.patch
Type: application/octet-stream
Size: 8898 bytes
Desc: NameValuePairMappingStrategy.patch
URL: <http://shibboleth.net/pipermail/dev/attachments/20160516/425fa84c/attachment-0001.obj>


More information about the dev mailing list