1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
3 xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
4 xmlns:oldconf="urn:mace:shibboleth:target:config:1.0"
5 xmlns:cred="urn:mace:shibboleth:credentials:1.0"
6 xmlns="urn:mace:shibboleth:2.0:native:sp:config"
7 xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion"
8 xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
9 xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
10 exclude-result-prefixes="oldconf cred saml1">
12 <!-- Add a comment to the start of the output file. -->
13 <xsl:template match="/">
15 <xsl:text> Generated by upgrade utility: check carefully before deploying. </xsl:text>
17 <xsl:apply-templates/>
20 <!--Force UTF-8 encoding for the output.-->
21 <xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>
23 <xsl:template match="oldconf:SPConfig">
24 <SPConfig logger="{@logger}" clockSkew="{@clockSkew}">
25 <xsl:text> </xsl:text>
26 <xsl:apply-templates select="oldconf:Global"/>
27 <xsl:text> </xsl:text>
28 <xsl:apply-templates select="oldconf:Local"/>
29 <xsl:text> </xsl:text>
30 <xsl:apply-templates select="oldconf:Global/oldconf:UnixListener"/>
31 <xsl:apply-templates select="oldconf:Global/oldconf:TCPListener"/>
32 <xsl:text> </xsl:text>
34 <xsl:text> This set of components stores sessions and other persistent data in daemon memory. </xsl:text>
36  <StorageService type="Memory" id="mem" cleanupInterval="900"/>
37  <SessionCache type="StorageService" StorageService="mem" cacheTimeout="{oldconf:Global/oldconf:MemorySessionCache/@cacheTimeout}" inprocTimeout="900" cleanupInterval="900"/>
38  <ReplayCache StorageService="mem"/>
39  <ArtifactMap artifactTTL="180"/>
40 <xsl:text> </xsl:text>
42 <xsl:text> This set of components stores sessions and other persistent data in an ODBC database. </xsl:text>
46  <StorageService type="ODBC" id="db" cleanupInterval="900">
47  <ConnectionString>DRIVER=drivername;SERVER=dbserver;UID=shibboleth;PWD=password;DATABASE=shibboleth;APP=Shibboleth</ConnectionString>
48  </StorageService>
49  <SessionCache type="StorageService" StorageService="db" cacheTimeout="3600" inprocTimeout="900" cleanupInterval="900"/>
50  <ReplayCache StorageService="db"/>
51  <ArtifactMap StorageService="db" artifactTTL="180"/>
54 <xsl:text> </xsl:text>
55 <xsl:apply-templates select="oldconf:Local/oldconf:RequestMapProvider"/>
56 <xsl:text> </xsl:text>
57 <xsl:apply-templates select="oldconf:Applications"/>
61 <!-- Turn <Global> into <OutOfProcess> with the ODBC extension commented out. -->
62 <xsl:template match="oldconf:Global">
63  <OutOfProcess logger="{@logger}">
66  <Extensions>
67  <Library path="odbc-store.so" fatal="true"/>
74 <xsl:template match="oldconf:Local">
75  <InProcess logger="{@logger}">
80 <xsl:template match="oldconf:Global/oldconf:UnixListener">
81  <UnixListener address="shibd.sock"/>
84 <xsl:template match="oldconf:Global/oldconf:TCPListener">
85  <TCPListener address="{@address}" port="{@port}" acl="{@acl}"/>
88 <!-- Transplant old RequestMap into the new namespace, but just copy all the settings. -->
89 <xsl:template match="oldconf:RequestMapProvider">
90  <RequestMapper type="Native">
91 <xsl:apply-templates select="oldconf:RequestMap"/>
92  </RequestMapper>
94 <xsl:template match="oldconf:RequestMap">
96 <xsl:apply-templates select="@*"/>
97 <xsl:for-each select="oldconf:Host">
99 <xsl:apply-templates select="@*"/>
100 <xsl:apply-templates select="oldconf:Path"/>
105 <xsl:template match="oldconf:Path">
107 <xsl:apply-templates select="@*"/>
108 <xsl:apply-templates select="oldconf:Path"/>
112 <xsl:template match="oldconf:Applications">
113  <ApplicationDefaults>
114 <!-- Step up and pull in credentials from the top level. -->
115 <xsl:apply-templates select="../oldconf:CredentialsProvider"/>
116  </ApplicationDefaults>
119 <!-- Map legacy <FileResolver> elements to CredentialResolver plugins. -->
120 <xsl:template match="oldconf:CredentialsProvider">
121 <xsl:apply-templates select="//cred:FileResolver"/>
123 <xsl:template match="cred:FileResolver">
124  <CredentialResolver type="File" key="{cred:Key/cred:Path/text()}" certificate="{cred:Certificate/cred:Path/text()}" keyName="{@Id}"/>
127 <xsl:template match="@*">
128 <xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
131 <xsl:template match="text()"/>