Page tree

Previous Stable Release

Please note that the V3 release branch is now the previous stable release, with the current stable releases from the V4 branch.
Support for V3 will end on or around Dec 31, 2020.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The RelationalDatabase data connector allows creation of multiple attributes a relational database specified via JDBC.

Schema Name and Location

This element is defined by the urn:mace:shibboleth:2.0:resolver:ad schema, which can be located at http://shibboleth.net/schema/idp/shibboleth-attribute-resolver-dc.xsd.  

Examples

Simple DataConnector
 <resolver:DataConnector id="myDatabase" xsi:type="dc:RelationalDatabase">
   <dc:ApplicationManagedConnection 
       jdbcDriver="org.hsqldb.jdbc.JDBCDriver" jdbcURL="jdbc:hsqldb:mem:RDBMSDataConnectorStore"
       jdbcUserName="SA" jdbcPassword="" />

   <dc:QueryTemplate>
       <![CDATA[
         SELECT * FROM people WHERE userid='%s'
       ]]>
   </dc:QueryTemplate>
 
   <dc:Column columnName="homephone" attributeID="phonenumber" />
       
   <dc:ResultCache elementTimeToLive="PT10S"/>
</resolver:DataConnector>
Simple Data Connector using external beans
<resolver:DataConnector id="myDatabase" xsi:type="dc:RelationalDatabase" mappingStrategy="MappingBeanId">
  <dc:BeanManagedConnection>DataConnectorBeanId</dc:BeanManagedConnection>        
  <dc:ResultCacheBean>ResultCacheBeanId<\dc:ResultCacheBean>
</resolver:DataConnector>

Attributes

Any of the common attributes can be specified. In addition the following attributes may be specified

NameTypeDefaultDescription

noResultIsError

booleanfalseControls whether an empty result set is an error

mappingStrategyRef

bean definition The Id of a Spring bean defining a MappingStrategy <ResultSet >

multipleResultsIsError

booleanfalseControls whether  a result set with more than one result is an error

queryTimeout

XML Duration or number of milliseconds A timeout for the queries made against the data base.
springResource  File definition A file containing Spring definitions suitable for injecting into a RDBMSDataConnector or AbstractSearchDataConnector

templateEngine

bean definition The Id of a Spring bean defining a Velocity Engine

Child Elements

Any of the common child elements can be specified. In addition the following may be specified

NameCardinalityDescription

<ContainerManagedConnection>


0 or 1 (all three elements)

Can only be 0 if the springResource
attribute is supplied

Connects to a database via a JNDI connection.

<ApplicationManagedConnection>

Connects to a database by a JDBC URL

<BeanManagedConnection>

Connects to a database via an externally specified DataSource, the spring bean id of which is supplied as the content of the element.

<QueryTemplate>

0 or 1 

<Column>

0 or more 

<ResultCache>

0 or 1 (both elements

A ResultCache definition.

<ResultCacheBean>

The id of an externally defined bean which specifies a Guava cache of type com.google.common.cache.Cache<String,Map<String,IdPAttribute>>

Notes

tbd

 

 

  • No labels