Porting changes from 1.2 branch
[shibboleth/cpp-sp.git] / configs / shibboleth.xml.in
1 <ShibbolethTargetConfig xmlns="urn:mace:shibboleth:target:config:1.0"
2         logger="@-PKGSYSCONFDIR-@/shibboleth.logger" clockSkew="180">
3
4     <Extensions>
5         <Library path="@-LIBEXECDIR-@/xmlproviders.so" fatal="true"/>
6     </Extensions>
7
8     <SHAR logger="@-PKGSYSCONFDIR-@/shar.logger">
9                 
10                 <!--
11         <Extensions>
12             <Library path="@-LIBEXECDIR-@/shib-mysql-ccache.so" fatal="false"/>
13         </Extensions>
14         -->
15     
16         <!-- only one listener can be defined. -->
17         <UnixListener address="/tmp/shar-socket"/>
18
19         <!-- <TCPListener address="127.0.0.1" port="12345" acl="127.0.0.1"/> -->
20         
21         <!--
22         See deploy guide for details, but:
23                 cacheTimeout - how long before expired sessions are purged from the cache
24                 AATimeout - how long to wait for an AA to respond
25                 AAConnectTimeout - how long to wait while connecting to an AA
26                 defaultLifetime - if attributes come back without guidance, how long should they last?
27                 strictValidity - if we have expired attrs, and can't get new ones, keep using them?
28                 propagateErrors - suppress errors while getting attrs or let user see them?
29                 retryInterval - if propagateErrors is false and query fails, how long to wait before trying again
30         -->
31         <MemorySessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
32             defaultLifetime="1800" retryInterval="300" strictValidity="false" propagateErrors="true"/>
33         <!--
34         <MySQLSessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
35                defaultLifetime="1800" retryInterval="300" strictValidity="false" propagateErrors="true"
36                mysqlTimeout="14400">
37             <Argument>&#x2D;&#x2D;language=@-PREFIX-@/share/english</Argument>
38             <Argument>&#x2D;&#x2D;datadir=@-PREFIX-@/data</Argument>
39         </MySQLSessionCache>
40         -->
41     </SHAR>
42     
43     <SHIRE logger="@-PKGSYSCONFDIR-@/shire.logger">
44         <!--
45         To customize behavior, map hostnames and path components to applicationId and other settings.
46         Can be either a pointer to an external file or an inline configuration.
47         -->
48         <!--
49         <RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"
50             uri="@-PKGSYSCONFDIR-@/applications.xml"/>
51         -->
52
53         <RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap">
54             <RequestMap applicationId="default">
55                 <!--
56                 This requires a session for documents in /secure on the containing host with http and
57                 https on the default ports. Note that the name and port in the <Host> elements MUST match
58                 Apache's ServerName and Port directives or the IIS Site mapping in the <ISAPI> element
59                 below.
60                 -->
61                 <Host name="localhost">
62                     <Path name="secure" requireSession="true" exportAssertion="true">
63                         <!-- Example shows a subfolder on the SSL port assigned to a separate <Application> -->
64                             <Path name="admin" applicationId="foo-admin"/>
65                         </Path>
66                 </Host>
67             </RequestMap>
68         </RequestMapProvider>
69         
70         <Implementation>
71             <ISAPI normalizeRequest="true">
72                 <!--
73                 Maps IIS IID values to the host scheme/name/port. The name is required so that
74                 the proper <Host> in the request map above is found without having to cover every
75                 possible DNS/IP combination the user might enter. The port and scheme can
76                 usually be omitted, so the HTTP request's port and scheme will be used.
77                 -->
78                 <Site id="1" name="localhost"/>
79             </ISAPI>
80         </Implementation>
81     </SHIRE>
82
83     <Applications xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
84         id="default" providerId="https://example.org/shibboleth/target">
85
86         <!--
87         Controls session lifetimes, address checks, cookie handling, WAYF, and the SHIRE location.
88         You MUST supply a unique shireURL value (and a wayfURL that can be the same) for each of your
89         applications. The value can be a relative path, a URL with no hostname (https:///path) or a
90         full URL. The system will compute the value that applies based on the resource. Using
91         shireSSL="true" will force the protocol to be https. You should also add a cookieProps
92         setting of "; secure" in that case. The default wayfURL is the InQueue federation's service.
93         Change to https://localhost/shibboleth/HS for internal testing against your own origin.
94         -->
95         <Sessions lifetime="7200" timeout="3600" checkAddress="true"
96                 wayfURL="https://wayf.internet2.edu/InQueue/WAYF"
97             shireURL="/Shibboleth.shire" shireSSL="false"/>
98
99         <!--
100         You should customize these pages! You can add attributes with values that can be plugged
101         into your templates.
102         -->
103         <Errors shire="@-PKGSYSCONFDIR-@/shireError.html"
104             rm="@-PKGSYSCONFDIR-@/rmError.html"
105             access="@-PKGSYSCONFDIR-@/accessError.html"
106             supportContact="root@localhost"
107             logoLocation="/shibtarget/logo.jpg"
108             styleSheet="/shibtarget/main.css"/>
109
110                 <!-- Indicates what credentials to use when communicating -->
111         <CredentialUse TLS="defcreds" Signing="defcreds">
112             <!-- RelyingParty elements customize credentials for specific origins or federations -->
113             <!--
114             <RelyingParty Name="urn:mace:inqueue" TLS="inqueuecreds" Signing="inqueuecreds"/>
115             -->
116         </CredentialUse>
117             
118         <!-- Use designators to request specific attributes or none to ask for all -->
119         <!--
120         <saml:AttributeDesignator AttributeName="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"
121             AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri"/>
122         <saml:AttributeDesignator AttributeName="urn:mace:dir:attribute-def:eduPersonTargetedID"
123             AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri"/>
124         -->
125
126         <!-- AAP can be inline or in a separate file -->
127         <AAPProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP" uri="@-PKGSYSCONFDIR-@/AAP.xml"/>
128         <!--
129         <AAPProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP"
130             <AttributeAcceptancePolicy xmlns="urn:mace:shibboleth:aap:1.0">
131                 <AttributeRule Name="urn:mace:dir:attribute-def:eduPersonPrincipalName" Header="REMOTE_USER" Alias="user">
132                     <AnySite>
133                         <AnyValue/>
134                     </AnySite>
135                 </AttributeRule>
136             </AttributeAcceptancePolicy>
137         </AAPProvider>
138         -->
139         
140         <!-- Metadata consists of site/operational metadata, trust, revocation providers. Can be external or inline. -->
141         <FederationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata"
142             uri="@-PKGSYSCONFDIR-@/IQ-sites.xml"/>
143         <FederationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata">
144                         <SiteGroup Name="https://example.org/shibboleth" xmlns="urn:mace:shibboleth:1.0">
145                                 <OriginSite Name="https://example.org/shibboleth/origin">
146                                         <Alias>Localhost Test Deployment</Alias>
147                                         <Contact Type="technical" Name="Your Name Here" Email="root@localhost"/>
148                                         <HandleService Location="https://localhost/shibboleth/HS" Name="CN=localhost, O=Shibboleth Project, C=US"/>
149                                         <AttributeAuthority Location="https://localhost/shibboleth/AA" Name="CN=localhost, O=Shibboleth Project, C=US"/>
150                                         <Domain>localhost</Domain>
151                                 </OriginSite>
152                         </SiteGroup>
153         </FederationProvider>
154         
155         <TrustProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust"
156             uri="@-PKGSYSCONFDIR-@/IQ-trust.xml"/>
157
158                 <!--
159                 Revocation using X.509 CRLs is an optional feature in some trust metadata or you may
160                 supply your own revocation information locally.
161                 -->
162         <!--
163         <RevocationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLRevocation"
164             uri="@-PKGSYSCONFDIR-@/IQ-trust.xml"/>
165         -->
166                     
167         <!-- zero or more SAML Audience condition matches -->
168         <saml:Audience>urn:mace:inqueue</saml:Audience>
169         
170         <!--
171         You can customize behavior of specific applications here. You must supply a complete <Sessions>
172         element to inidicate a distinct shireURL and wayfURL for this application, along with any other
173         non-default settings you require. None will be inherited. The wayfURL can be the same as the
174         default above, but the shireURL MUST be different and MUST map to this application in the
175         RequestMap. The default elements inside the outer <Applications> element generally have to be
176         overridden in an all or nothing fashion. That is, if you supply an <Errors> override, you MUST
177         include all attributes you want to apply, as they will not be inherited. Similarly, if you
178         specify an element such as <FederationProvider>, it is not additive with the defaults, but
179         replaces them.
180         
181         The example below shows a special application that requires use of SSL when establishing
182         sessions, restricts the session cookie to SSL and a specific folder, and inherits most other
183         behavior except that it requests only EPPN from the origin instead of asking for all attributes.
184         -->
185         <!-- 
186         <Application id="foo-admin">
187                 <Sessions lifetime="7200" timeout="3600" checkAddress="true"
188                     shireURL="/secure/admin/Shibboleth.shire" shireSSL="true" cookieProps="; path=/secure/admin; secure"
189                     wayfURL="https://wayf.internet2.edu/InQueue/WAYF"/>
190             <saml:AttributeDesignator AttributeName="urn:mace:dir:attribute-def:eduPersonPrincipalName"
191                 AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri"/> 
192         </Application>
193         -->
194
195     </Applications>
196     
197     <!-- Define all the private keys and certificates here that you reference from <CredentialUse>. -->
198     <CredentialsProvider type="edu.internet2.middleware.shibboleth.common.Credentials">
199         <Credentials xmlns="urn:mace:shibboleth:credentials:1.0">
200             <FileResolver Id="defcreds">
201                 <Key format="PEM">
202                     <Path>@-PKGSYSCONFDIR-@/shar.key</Path>
203                 </Key>
204                 <Certificate format="PEM">
205                     <Path>@-PKGSYSCONFDIR-@/shar.crt</Path>
206                 </Certificate>
207             </FileResolver>
208             
209             <!--
210             <FileResolver Id="inqueuecreds">
211                 <Key format="PEM" password="handsoff">
212                     <Path>@-PKGSYSCONFDIR-@/inqueue.key</Path>
213                 </Key>
214                 <Certificate format="PEM">
215                     <Path>@-PKGSYSCONFDIR-@/inqueue.crt</Path>
216                 </Certificate>
217             </FileResolver>
218             -->
219         </Credentials>
220     </CredentialsProvider>
221
222 </ShibbolethTargetConfig>
223