Renamed Applications/Application tags.
authorScott Cantor <cantor.2@osu.edu>
Wed, 23 Jan 2008 03:33:56 +0000 (03:33 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 23 Jan 2008 03:33:56 +0000 (03:33 +0000)
configs/shibboleth2.xml.in
schemas/shibboleth-2.0-native-sp-config.xsd
shibsp/impl/XMLServiceProvider.cpp

index 844dad5..1bf9bb3 100644 (file)
     </RequestMapper>
 
     <!--
-    The Applications element is where most of Shibboleth's SAML bits are defined.
+    The ApplicationDefaults element is where most of Shibboleth's SAML bits are defined.
     Resource requests are mapped by the RequestMapper to an applicationId that
     points into to this section.
     -->
-    <Applications id="default" policyId="default" entityID="https://sp.example.org/shibboleth"
+    <ApplicationDefaults id="default" policyId="default" entityID="https://sp.example.org/shibboleth"
         homeURL="https://sp.example.org/index.html"
         REMOTE_USER="eppn persistent-id targeted-id"
         localLogout="@-PKGSYSCONFDIR-@/localLogout.html"
             </Certificate>
         </CredentialResolver>
 
-        <!-- Advanced resolver allowing for multiple keypairs. -->
-        <!--
-        <CredentialResolver type="Chaining">
-            <CredentialResolver type="File">
-                <Key>
-                    <Name>DefaultKey</Name>
-                    <Path>@-PKGSYSCONFDIR-@/sp-example.key</Path>
-                </Key>
-                <Certificate>
-                    <Path>@-PKGSYSCONFDIR-@/sp-example.crt</Path>
-                </Certificate>
-            </CredentialResolver>
-            <CredentialResolver type="File">
-                <Key>
-                    <Name>SpecialKey</Name>
-                    <Path>@-PKGSYSCONFDIR-@/special.key</Path>
-                </Key>
-                <Certificate>
-                    <Path>@-PKGSYSCONFDIR-@/special.crt</Path>
-                </Certificate>
-            </CredentialResolver>
-        </CredentialResolver>
-        -->
-        
     </Applications>
     
     <!-- Each policy defines a set of rules to use to secure messages. -->
index 54d9b3a..2fed592 100644 (file)
                </complexType>\r
        </element>\r
        \r
-       <element name="Applications">\r
+       <element name="ApplicationDefaults">\r
                <annotation>\r
-                       <documentation>Container for global settings and application-specific overrides</documentation>\r
+                       <documentation>Container for default settings and application-specific overrides</documentation>\r
                </annotation>\r
                <complexType>\r
                        <sequence>\r
                                <element name="AttributeResolver" type="conf:PluggableType" minOccurs="0"/>\r
                                <element name="AttributeFilter" type="conf:PluggableType" minOccurs="0"/>\r
                                <element name="CredentialResolver" type="conf:PluggableType" minOccurs="0"/>\r
-                               <element ref="conf:Application" minOccurs="0" maxOccurs="unbounded"/>\r
+                               <element ref="conf:ApplicationOverride" minOccurs="0" maxOccurs="unbounded"/>\r
                        </sequence>\r
                        <attribute name="id" type="conf:string" fixed="default"/>\r
                        <attribute name="entityID" type="anyURI" use="required"/>\r
                </complexType>\r
        </element>\r
        \r
-       <element name="Application">\r
+       <element name="ApplicationOverride">\r
                <annotation>\r
                        <documentation>Container for application-specific overrides</documentation>\r
                </annotation>\r
index 5c6c4cf..132e2f2 100644 (file)
@@ -380,8 +380,8 @@ namespace {
     #pragma warning( pop )
 #endif
 
-    static const XMLCh _Application[] =         UNICODE_LITERAL_11(A,p,p,l,i,c,a,t,i,o,n);
-    static const XMLCh Applications[] =         UNICODE_LITERAL_12(A,p,p,l,i,c,a,t,i,o,n,s);
+    static const XMLCh ApplicationOverride[] =  UNICODE_LITERAL_19(A,p,p,l,i,c,a,t,i,o,n,O,v,e,r,r,i,d,e);
+    static const XMLCh ApplicationDefaults[] =  UNICODE_LITERAL_19(A,p,p,l,i,c,a,t,i,o,n,D,e,f,a,u,l,t,s);
     static const XMLCh _ArtifactMap[] =         UNICODE_LITERAL_11(A,r,t,i,f,a,c,t,M,a,p);
     static const XMLCh _AttributeExtractor[] =  UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,E,x,t,r,a,c,t,o,r);
     static const XMLCh _AttributeFilter[] =     UNICODE_LITERAL_15(A,t,t,r,i,b,u,t,e,F,i,l,t,e,r);
@@ -923,7 +923,7 @@ void XMLApplication::cleanup()
 short XMLApplication::acceptNode(const DOMNode* node) const
 {
     const XMLCh* name=node->getLocalName();
-    if (XMLString::equals(name,_Application) ||
+    if (XMLString::equals(name,ApplicationOverride) ||
         XMLString::equals(name,_Audience) ||
         XMLString::equals(name,Notify) ||
         XMLString::equals(name,_Handler) ||
@@ -1119,7 +1119,7 @@ short XMLConfigImpl::acceptNode(const DOMNode* node) const
     if (!XMLString::equals(node->getNamespaceURI(),shibspconstants::SHIB2SPCONFIG_NS))
         return FILTER_ACCEPT;
     const XMLCh* name=node->getLocalName();
-    if (XMLString::equals(name,Applications) ||
+    if (XMLString::equals(name,ApplicationDefaults) ||
         XMLString::equals(name,_ArtifactMap) ||
         XMLString::equals(name,_Extensions) ||
         XMLString::equals(name,Listener) ||
@@ -1385,24 +1385,24 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, const XMLConfig* o
 #endif
 
         // Load the default application. This actually has a fixed ID of "default". ;-)
-        child=XMLHelper::getLastChildElement(e,Applications);
+        child=XMLHelper::getLastChildElement(e,ApplicationDefaults);
         if (!child) {
-            log.fatal("can't build default Application object, missing conf:Applications element?");
-            throw ConfigurationException("can't build default Application object, missing conf:Applications element?");
+            log.fatal("can't build default Application object, missing conf:ApplicationDefaults element?");
+            throw ConfigurationException("can't build default Application object, missing conf:ApplicationDefaults element?");
         }
         XMLApplication* defapp=new XMLApplication(m_outer,child);
         m_appmap[defapp->getId()]=defapp;
         
         // Load any overrides.
-        child = XMLHelper::getFirstChildElement(child,_Application);
+        child = XMLHelper::getFirstChildElement(child,ApplicationOverride);
         while (child) {
             auto_ptr<XMLApplication> iapp(new XMLApplication(m_outer,child,defapp));
             if (m_appmap.count(iapp->getId()))
-                log.crit("found conf:Application element with duplicate id attribute (%s), skipping it", iapp->getId());
+                log.crit("found conf:ApplicationOverride element with duplicate id attribute (%s), skipping it", iapp->getId());
             else
                 m_appmap[iapp->getId()]=iapp.release();
 
-            child = XMLHelper::getNextSiblingElement(child,_Application);
+            child = XMLHelper::getNextSiblingElement(child,ApplicationOverride);
         }
     }
     catch (exception&) {