Added example configuration file for JDBC Data Connector.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 25 Aug 2003 21:16:07 +0000 (21:16 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 25 Aug 2003 21:16:07 +0000 (21:16 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@745 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/conf/resolver.jdbc.xml [new file with mode: 0644]

diff --git a/src/conf/resolver.jdbc.xml b/src/conf/resolver.jdbc.xml
new file mode 100644 (file)
index 0000000..7459cbd
--- /dev/null
@@ -0,0 +1,47 @@
+<AttributeResolver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:resolver:1.0" xsi:schemaLocation="urn:mace:shibboleth:resolver:1.0 shibboleth-resolver-1.0.xsd">
+       
+       <!-- Simple example JDBC Connector setup with a query based on principal name -->
+       
+       <SimpleAttributeDefinition id="urn:mace:dir:attribute-def:eduPersonEntitlement" sourceName="entitlement">
+               <DataConnectorDependency requires="db1"/>
+       </SimpleAttributeDefinition>
+
+       <JDBCDataConnector id="db1" 
+               dbURL="jdbc:postgresql://test.example.edu/test?user=postgres&amp;password=test" 
+               dbDriver="org.postgresql.Driver"
+               maxActive="10"
+               maxIdle="5">
+               <Query>select entitlement from foo where name = ?</Query>
+       </JDBCDataConnector>
+
+
+
+
+       <!-- A more complicated example, where a query is constructed based on dependencies
+               on another Data Connector and an Attribute Definition -->
+               
+       <SimpleAttributeDefinition id="urn:mace:dir:attribute-def:eduPersonAffiliation">
+               <DataConnectorDependency requires="echo"/>
+       </SimpleAttributeDefinition>
+
+       <SimpleAttributeDefinition id="urn:x-mace:shibboleth:date">
+               <DataConnectorDependency requires="db2"/>
+       </SimpleAttributeDefinition>
+       
+       <JDBCDataConnector id="db2" 
+               dbURL="jdbc:postgresql://test.example.edu/test?user=postgres&amp;password=test" 
+               dbDriver="org.postgresql.Driver"
+               maxActive="10" 
+               maxIdle="5">
+               <DataConnectorDependency requires="echo"/>
+               <AttributeDependency requires="urn:mace:dir:attribute-def:eduPersonEntitlement"/>
+               <Query>select date from foo where principalName = ? and entitlement = ?</Query>
+               <StatementCreator class="edu.internet2.middleware.shibboleth.aa.attrresolv.provider.DependencyStatementCreator">
+                       <Parameter type="String" attributeName="eduPersonPrincipalName" connectorId="echo" nullMissing="false"></Parameter>
+                       <Parameter type="String" attributeName="urn:mace:dir:attribute-def:eduPersonEntitlement" nullMissing="false"></Parameter>
+               </StatementCreator>
+       </JDBCDataConnector>
+       
+       <CustomDataConnector id="echo" class="edu.internet2.middleware.shibboleth.aa.attrresolv.provider.SampleConnector"/>
+       
+</AttributeResolver>