08dfa74d74847bf8a4c1da0c5001de14aadfae82
[java-idp.git] / resources / conf / attribute-resolver.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <AttributeResolver xmlns="urn:mace:shibboleth:2.0:resolver"
4                    xmlns:resolver="urn:mace:shibboleth:2.0:resolver"
5                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6                    xmlns:pc="urn:mace:shibboleth:2.0:resolver:pc"
7                    xmlns:ad="urn:mace:shibboleth:2.0:resolver:ad"
8                        xmlns:dc="urn:mace:shibboleth:2.0:resolver:dc"
9                    xmlns:enc="urn:mace:shibboleth:2.0:attribute:encoder"
10                        xsi:schemaLocation="urn:mace:shibboleth:2.0:resolver classpath:/schema/shibboleth-2.0-attribute-resolver.xsd
11                                        urn:mace:shibboleth:2.0:resolver:pc classpath:/schema/shibboleth-2.0-attribute-resolver-pc.xsd
12                                        urn:mace:shibboleth:2.0:resolver:ad classpath:/schema/shibboleth-2.0-attribute-resolver-ad.xsd
13                                        urn:mace:shibboleth:2.0:resolver:dc classpath:/schema/shibboleth-2.0-attribute-resolver-dc.xsd
14                                        urn:mace:shibboleth:2.0:attribute:encoder classpath:/schema/shibboleth-2.0-attribute-encoder.xsd">
15
16     <!-- ========================================== -->
17     <!--      Attribute Definitions                 -->
18     <!-- ========================================== -->
19     
20     <!-- Example attribute defintions -->
21     <!--
22     <resolver:AttributeDefinition id="uid" xsi:type="ad:Simple">
23         <resolver:DataConnectorDependency ref="myLDAP" />
24         
25         <resolver:AttributeEncoder xsi:type="enc:SAML2StringNameID" />
26         
27         <resolver:AttributeEncoder xsi:type="enc:SAML1StringNameIdentifier" />
28     </resolver:AttributeDefinition>
29     -->
30     
31     <!--
32     <resolver:AttributeDefinition id="scopedPrimaryAffiliation" xsi:type="ad:Scoped"
33                                   scope="example.org"
34                                   sourceAttributeID="eduPersonPrimaryAffiliation">
35         <resolver:DataConnectorDependency ref="myLDAP" />
36         
37         <resolver:AttributeEncoder xsi:type="enc:SAML1ScopedString"
38                                    name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"/>
39         
40         <resolver:AttributeEncoder xsi:type="enc:SAML2ScopedString"
41                                    name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"/>
42
43     </resolver:AttributeDefinition>
44     -->
45     
46     <!--
47     <resolver:AttributeDefinition id="affiliation" xsi:type="ad:Simple"
48                                    sourceAttribute="eduPersonAffiliation">
49         <resolver:DataConnectorDependency ref="staticAttributes" />
50         <resolver:DataConnectorDependency ref="myLDAP" />
51         
52         <resolver:AttributeEncoder xsi:type="enc:SAML1String"
53                                    name="urn:mace:dir:attribute-def:eduPersondAffiliation"/>
54         
55         <resolver:AttributeEncoder xsi:type="enc:SAML2String"
56                                    name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1"
57                                    friendlyName="eduPersonAffiliation"/>
58     </resolver:AttributeDefinition>
59     -->
60     
61     <!--
62     <resolver:AttributeDefinition id="fullName" xsi:type="Script" >
63         <resolver:DataConnectorDependency ref="myLDAP" />
64         
65         <Script>
66             <![CDATA[
67                 importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);
68                 fullname = new BasicAttribute("fullname");
69                 fullname.getValues().add(givenName.getValues().first() + " " + sn.getValues().first());
70             ]]>
71         </Script>
72     </resolver:AttributeDefinition>
73     -->
74     
75     
76     <!-- ========================================== -->
77     <!--      Data Connectors                       -->
78     <!-- ========================================== -->
79     
80     <!-- Example Static Connector -->
81     <!--
82     <resolver:DataConnector id="staticAttributes" xsi:type="dc:Static">
83         <dc:Attribute id="eduPersonAffiliation">
84             <dc:Value>member</dc:Value>
85         </dc:Attribute>
86         <dc:Attribute id="eduPersonEntitlement">
87             <dc:Value>urn:example.org:entitlement:entitlement1</dc:Value>
88             <dc:Value>urn:mace:dir:entitlement:common-lib-terms</dc:Value>
89         </dc:Attribute>
90     </resolver:DataConnector>
91     -->
92     
93     <!-- Example Relational Database Connector -->
94     <!--
95     <resolver:DataConnector id="mySIS" xsi:type="dc:RelationalDatabase">
96         <dc:ApplicationManagedConnection jdbcDriver="oracle.jdbc.driver.OracleDriver"
97                                          jdbcUrl="jdbc:oracle:thin:@db.example.org:1521:SomeDB"
98                                          jdbcUserName="myid"
99                                          jdbcPassword="mypassword" />
100         <dc:QueryTemplate>
101             <![CDATA[
102                  SELECT * FROM student WHERE gzbtpid = ${principal}
103              ]]>
104         </dc:QueryTemplate>
105     
106         <dc:Column columnName="gzbtpid" attributeID="uid"/>
107         <dc:Column columnName="fqlft" attributeID="gpa" type="Float"/>
108     </resolver:DataConnector>
109     -->
110     
111     <!-- Example LDAP Connector -->
112     <!--
113     <resolver:DataConnector id="myLDAP" xsi:type="LDAPDirectory"
114                             ldapUrl="ldap://ldap.example.org"
115                             baseDN="ou=people,dc=example,dc=org"
116                             principal="uid=myservice,ou=system"
117                             principalCredential="myServicePassword">
118         <dc:FilterTemplate>
119             <![CDATA[
120                 (uid=${principal})
121             ]]>
122         </dc:FilterTemplate>
123     
124     </resolver:DataConnector>
125     -->
126     
127     <!-- ========================================== -->
128     <!--      Principal Connectors                  -->
129     <!-- ========================================== -->
130     <resolver:PrincipalConnector xsi:type="pc:Direct" 
131                                  id="directPC"
132                                  nameIDFormat="urn:oasis:names:tc:SAML:1.0:nameid-format:unspecified" />
133
134 </AttributeResolver>