First pass to clean up config and fix multi serivce instance bug
[java-idp.git] / resources / conf / service.xml
index 4088485..b5d256c 100644 (file)
@@ -1,39 +1,58 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<IdPConfig xmlns="urn:mace:shibboleth:2.0:idp:services" xmlns:service="urn:mace:shibboleth:2.0:services"
-    xmlns:profile="urn:mace:shibboleth:2.0:idp:profile-handler" xmlns:relyingParty="urn:mace:shibboleth:2.0:relying-party"
-    xmlns:resolver="urn:mace:shibboleth:2.0:resolver" xmlns:afp="urn:mace:shibboleth:2.0:afp"
-    xmlns:resource="urn:mace:shibboleth:2.0:resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="urn:mace:shibboleth:2.0:idp:services classpath:/schema/shibboleth-2.0-idp-service.xsd
-                        urn:mace:shibboleth:2.0:services classpath:/schema/shibboleth-2.0-services.xsd
-                        urn:mace:shibboleth:2.0:idp:profile-handler classpath:/schema/shibboleth-2.0-idp-profile-handler.xsd
-                        urn:mace:shibboleth:2.0:relying-party classpath:/schema/shibboleth-2.0-relying-party.xsd
-                        urn:mace:shibboleth:2.0:resolver classpath:/schema/shibboleth-2.0-attribute-resolver.xsd
-                        urn:mace:shibboleth:2.0:afp classpath:/schema/shibboleth-2.0-afp.xsd 
-                        urn:mace:shibboleth:2.0:resource classpath:/schema/shibboleth-2.0-resource.xsd">
+<Services xmlns="urn:mace:shibboleth:2.0:services"
+          xmlns:attribute-afp="urn:mace:shibboleth:2.0:afp"
+          xmlns:attribute-authority="urn:mace:shibboleth:2.0:attribute:authority"
+          xmlns:attribute-resolver="urn:mace:shibboleth:2.0:resolver"
+          xmlns:profile="urn:mace:shibboleth:2.0:idp:profile-handler"
+          xmlns:relyingParty="urn:mace:shibboleth:2.0:relying-party"
+          xmlns:resource="urn:mace:shibboleth:2.0:resource" 
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="urn:mace:shibboleth:2.0:services classpath:/schema/shibboleth-2.0-services.xsd
+                              urn:mace:shibboleth:2.0:afp classpath:/schema/shibboleth-2.0-afp.xsd
+                              urn:mace:shibboleth:2.0:attribute:authority classpath:/schema/shibboleth-2.0-attribute-authority.xsd
+                              urn:mace:shibboleth:2.0:resolver classpath:/schema/shibboleth-2.0-attribute-resolver.xsd
+                              urn:mace:shibboleth:2.0:idp:profile-handler classpath:/schema/shibboleth-2.0-idp-profile-handler.xsd
+                              urn:mace:shibboleth:2.0:relying-party classpath:/schema/shibboleth-2.0-relying-party.xsd
+                              urn:mace:shibboleth:2.0:resource classpath:/schema/shibboleth-2.0-resource.xsd">
 
     <Service id="shibboleth.AttributeResolver"
-             xmlns="urn:mace:shibboleth:2.0:services"
-             xsi:type="resolver:ShibbolethAttributeResolver">
+             xsi:type="attribute-resolver:ShibbolethAttributeResolver">
         <ConfigurationResource file="$IDP_HOME$/conf/attribute-resolver.xml" xsi:type="resource:FilesystemResource" />
     </Service>
 
     <Service id="shibboleth.AttributeFilterEngine"
-             xmlns="urn:mace:shibboleth:2.0:services"
-             xsi:type="afp:ShibbolethAttributeFilteringEngine">
+             xsi:type="attribute-afp:ShibbolethAttributeFilteringEngine">
         <ConfigurationResource file="$IDP_HOME$/conf/attribute-filter.xml" xsi:type="resource:FilesystemResource" />
     </Service>
-
-    <Service id="shibboleth.HandlerManager"
-             xmlns="urn:mace:shibboleth:2.0:services"
-             xsi:type="profile:IdPProfileHandlerManager">
-        <ConfigurationResource file="$IDP_HOME$/conf/handler.xml" xsi:type="resource:FilesystemResource" />
-    </Service>
+    
+    <Service id="shibboleth.SAML1AttributeAuthority"
+             xsi:type="attribute-authority:SAML1AttributeAuthority"
+             depends-on="shibboleth.AttributeResolver shibboleth.AttributeFilterEngine" />
+             
+    <Service id="shibboleth.SAML2AttributeAuthority"
+             xsi:type="attribute-authority:SAML2AttributeAuthority"
+             depends-on="shibboleth.AttributeResolver shibboleth.AttributeFilterEngine" />
 
     <Service id="shibboleth.RelyingPartyConfigurationManager"
-             xmlns="urn:mace:shibboleth:2.0:services"
-             xsi:type="relyingParty:SAMLMDRelyingPartyConfigurationManager">
+             xsi:type="relyingParty:SAMLMDRelyingPartyConfigurationManager"
+             depends-on="shibboleth.SAML1AttributeAuthority shibboleth.SAML2AttributeAuthority">
         <ConfigurationResource file="$IDP_HOME$/conf/relying-party.xml" xsi:type="resource:FilesystemResource" />
     </Service>
 
-</IdPConfig>
\ No newline at end of file
+    <Service id="shibboleth.HandlerManager"
+             depends-on="shibboleth.RelyingPartyConfigurationManager"
+             xsi:type="relyingParty:SAMLMDRelyingPartyConfigurationManager">
+        <ConfigurationResource file="$IDP_HOME$/conf/handler.xml" xsi:type="resource:FilesystemResource" />
+    </Service>
+    
+    <!-- 
+        A special service that exports all services upon which it depends into the ServletContext as an attribute 
+        with the same name as the service's ID.
+    -->
+    <Service id="shibboleth.ServiceServletContextAttributeExporter"
+             depends-on="shibboleth.AttributeResolver shibboleth.AttributeFilterEngine
+                         shibboleth.SAML1AttributeAuthority shibboleth.SAML2AttributeAuthority 
+                         shibboleth.RelyingPartyConfigurationManager shibboleth.HandlerManager"
+             xsi:type="ServletContextAttributeExporter" />
+</Services>
\ No newline at end of file