[java-identity-provider COMMIT] in /trunk/idp-conf/src/main/resources/system/flows/saml/saml2: attribute-query-beans....

noreply at shibboleth.net noreply at shibboleth.net
Mon Apr 21 15:06:37 EDT 2014


Author: scantor
Date: Mon Apr 21 15:06:37 2014
New Revision: 5756

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5756&view=rev
Log:
Copy over error handling changes to SAML 2 query flow

Modified:
    trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-beans.xml
    trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml

Modified: trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-beans.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-beans.xml?rev=5756&r1=5755&r2=5756&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-beans.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-beans.xml Mon Apr 21 15:06:37 2014
@@ -76,6 +76,33 @@
         <property name="recipientLookupStrategy"><null/></property>
     </bean>
 
+    <bean id="InitializeOutboundMessageContextForError"
+            class="net.shibboleth.idp.saml.profile.impl.InitializeOutboundMessageContextForError" scope="prototype">
+        <property name="outboundBinding">
+            <util:constant static-field="org.opensaml.saml.common.xml.SAMLConstants.SAML2_SOAP11_BINDING_URI"/>
+        </property>
+    </bean>
+
+    <bean id="AddStatusToResponse"
+            class="org.opensaml.saml.saml2.profile.impl.AddStatusToResponse" scope="prototype"
+            p:statusMessage="An error occurred.">
+        <property name="detailedErrorsCondition">
+            <bean class="net.shibboleth.idp.profile.config.logic.DetailedErrorsPredicate" />
+        </property>
+        <property name="statusCodes">
+            <util:list>
+                <util:constant static-field="org.opensaml.saml.saml2.core.StatusCode.RESPONDER_URI" />
+            </util:list>
+        </property>
+        <property name="statusCodesLookupStrategy">
+            <bean class="org.opensaml.saml.saml2.profile.impl.AddStatusToResponse.StatusCodeMappingFunction"
+                 c:mappings-ref="shibboleth.SAML2StatusMappings"/>
+        </property>
+        <property name="statusMessageLookupStrategy">
+            <bean class="net.shibboleth.idp.profile.context.navigate.SpringStatusMessageLookupFunction" />
+        </property>
+    </bean>
+
     <bean id="outboundMessageHandlerChain"
             class="org.opensaml.messaging.handler.impl.BasicMessageHandlerChain" scope="prototype">
         <property name="handlers">

Modified: trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml?rev=5756&r1=5755&r2=5756&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml Mon Apr 21 15:06:37 2014
@@ -10,11 +10,16 @@
         <transition on="proceed" to="DecodeMessage" />
     </action-state>
 
-    <!-- This picks up from the parent flow with the transition step. -->
+    <!-- This picks up from the parent flow with the transition step or the error step. -->
     
     <action-state id="DoProfileWork">
         <evaluate expression="true" />
         <transition on="#{true}" to="ResolveAttributes" />
+    </action-state>
+
+    <action-state id="HandleError">
+        <evaluate expression="true" />
+        <transition on="#{true}" to="InitializeOutboundMessageContextForError" />
     </action-state>
 
     <!-- Attribute Resolution -->
@@ -80,6 +85,39 @@
 
     <!-- Outbound message handling completes in the parent flow. -->
 
+    <!-- Error Response Generation -->
+
+    <!-- We need to trap non-proceed transitions in these actions to avoid an infinite loop. -->
+
+    <action-state id="InitializeOutboundMessageContextForError">
+        <evaluate expression="InitializeOutboundMessageContextForError" />
+        <transition on="proceed" to="Error_AddResponseShell" />
+        <transition on="#{true}" to="error" />
+    </action-state>
+
+    <action-state id="Error_AddResponseShell">
+        <evaluate expression="AddResponseShell" />
+        <transition on="proceed" to="Error_AddInResponseToToResponse" />
+        <transition on="#{true}" to="error" />
+    </action-state>
+
+    <action-state id="Error_AddInResponseToToResponse">
+        <evaluate expression="AddInResponseToToResponse" />
+        <transition on="proceed" to="Error_AddStatusToResponse" />
+        <transition on="#{true}" to="error" />
+    </action-state>
+    
+    <action-state id="Error_AddStatusToResponse">
+        <evaluate expression="AddStatusToResponse" />
+        <transition on="proceed" to="CallErrorSubflow" />
+        <transition on="#{true}" to="error" />
+    </action-state>
+

[... 9 lines stripped ...]


More information about the commits mailing list