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