Adjust for new configuration file, and add native eol handling.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 28 May 2010 19:49:42 +0000 (19:49 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 28 May 2010 19:49:42 +0000 (19:49 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@3260 cb58f699-b61c-0410-a6fe-9272a202ed29

configs/security-policy.xml
configs/upgrade.xsl
msi/scripts/shib_edit_config_files.vbs

index c0a5393..fdaba43 100644 (file)
@@ -1,36 +1,36 @@
-<SecurityPolicies xmlns="urn:mace:shibboleth:2.0:native:sp:config">\r
-\r
-    <!-- Each policy defines a set of rules to use to secure messages. -->\r
-\r
-    <!--\r
-    The predefined policy enforces replay/freshness, standard\r
-    condition processing, and permits signing and client TLS.\r
-    -->\r
-    <Policy id="default" validate="false">\r
-        <PolicyRule type="MessageFlow" checkReplay="true" expires="60"/>\r
-        <PolicyRule type="Conditions">\r
-            <PolicyRule type="Audience"/>\r
-            <!-- Enable Delegation rule to permit delegated access. -->\r
-            <!-- <PolicyRule type="Delegation"/> -->\r
-        </PolicyRule>\r
-        <PolicyRule type="ClientCertAuth" errorFatal="true"/>\r
-        <PolicyRule type="XMLSigning" errorFatal="true"/>\r
-        <PolicyRule type="SimpleSigning" errorFatal="true"/>\r
-    </Policy>\r
-\r
-    <!--\r
-    This policy is a place-holder for use of assertions in metadata\r
-    as a way of attaching signed information about particular IdPs.\r
-    -->\r
-    <Policy id="entity-attributes">\r
-        <PolicyRule type="Conditions"/>\r
-        <PolicyRule type="XMLSigning" errorFatal="true"/>\r
-    </Policy>\r
-    \r
-    <!-- Disables known weak algorithms. -->\r
-    <AlgorithmBlacklist>\r
-    http://www.w3.org/2001/04/xmldsig-more#md5\r
-    http://www.w3.org/2001/04/xmldsig-more#rsa-md5\r
-    </AlgorithmBlacklist>\r
-\r
-</SecurityPolicies>\r
+<SecurityPolicies xmlns="urn:mace:shibboleth:2.0:native:sp:config">
+
+    <!-- Each policy defines a set of rules to use to secure messages. -->
+
+    <!--
+    The predefined policy enforces replay/freshness, standard
+    condition processing, and permits signing and client TLS.
+    -->
+    <Policy id="default" validate="false">
+        <PolicyRule type="MessageFlow" checkReplay="true" expires="60"/>
+        <PolicyRule type="Conditions">
+            <PolicyRule type="Audience"/>
+            <!-- Enable Delegation rule to permit delegated access. -->
+            <!-- <PolicyRule type="Delegation"/> -->
+        </PolicyRule>
+        <PolicyRule type="ClientCertAuth" errorFatal="true"/>
+        <PolicyRule type="XMLSigning" errorFatal="true"/>
+        <PolicyRule type="SimpleSigning" errorFatal="true"/>
+    </Policy>
+
+    <!--
+    This policy is a place-holder for use of assertions in metadata
+    as a way of attaching signed information about particular IdPs.
+    -->
+    <Policy id="entity-attributes">
+        <PolicyRule type="Conditions"/>
+        <PolicyRule type="XMLSigning" errorFatal="true"/>
+    </Policy>
+    
+    <!-- Disables known weak algorithms. -->
+    <AlgorithmBlacklist>
+    http://www.w3.org/2001/04/xmldsig-more#md5
+    http://www.w3.org/2001/04/xmldsig-more#rsa-md5
+    </AlgorithmBlacklist>
+
+</SecurityPolicies>
index 842d376..a5d8ad6 100644 (file)
 
             <xsl:text>&#10;&#10;    </xsl:text>
             <xsl:comment>
-                <xsl:text> Each policy defines a set of rules to use to secure messages. </xsl:text>
+                <xsl:text> Policies that determine how to process and authenticate runtime messages. </xsl:text>
             </xsl:comment>
             <xsl:text>&#10;    </xsl:text>
-            <SecurityPolicies>
-                <xsl:text>&#10;        </xsl:text>
-                <xsl:comment>
-                    <xsl:text> The predefined policy enforces replay/freshness and permits signing and client TLS. </xsl:text>
-                </xsl:comment>
-                <xsl:text>&#10;        </xsl:text>
-                <Policy id="default" validate="false">
-                    <xsl:text>&#10;            </xsl:text>
-                    <PolicyRule type="MessageFlow" checkReplay="true" expires="60"/>
-                    <xsl:text>&#10;            </xsl:text>
-                    <PolicyRule type="Conditions">
-                    <xsl:text>&#10;                </xsl:text>
-                        <PolicyRule type="Audience"/>
-                    <xsl:text>&#10;            </xsl:text>
-                    </PolicyRule>
-                    <PolicyRule type="ClientCertAuth" errorFatal="true"/>
-                    <xsl:text>&#10;            </xsl:text>
-                    <PolicyRule type="XMLSigning" errorFatal="true"/>
-                    <xsl:text>&#10;            </xsl:text>
-                    <PolicyRule type="SimpleSigning" errorFatal="true"/>
-                    <xsl:text>&#10;        </xsl:text>
-                </Policy>
-                <xsl:text>&#10;    </xsl:text>
-            </SecurityPolicies>
+            <SecurityPolicyProvider type="XML" validate="true" path="security-policy.xml"/>
             <xsl:text>&#10;&#10;</xsl:text>
         </SPConfig>
     </xsl:template>
index c34dc0b..d9d3816 100644 (file)
@@ -186,6 +186,10 @@ if (Err = 0) then
     FileSystemObj.CopyFile DistDir & "attribute-policy.xml", ConfigDir, false
   End If
 
+  If (NOT FileSystemObj.FileExists(ConfigDir & "security-policy.xml")) then
+    FileSystemObj.CopyFile DistDir & "security-policy.xml", ConfigDir, false
+  End If
+
   ' Finally, fix up schema catalogs.
   
   XMLDir = InstallDir & "\share\xml\xmltooling\"