[java-opensaml COMMIT] in /trunk/opensaml-saml-impl/src: main/java/org/opensaml/saml/common/profile/impl/SignAssertio...

noreply at shibboleth.net noreply at shibboleth.net
Mon Oct 10 13:45:26 EDT 2016


Author: scantor
Date: Mon Oct 10 13:45:26 2016
New Revision: 4525

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4525&view=rev
Log:
IDP-1056 - SLO fails with Artifact profile

https://issues.shibboleth.net/jira/browse/IDP-1056

Allow SignAssertions to skip silently when no Response is present.

Modified:
    trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/SignAssertions.java
    trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/profile/impl/SignAssertionsTest.java

Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/SignAssertions.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/SignAssertions.java?rev=4525&r1=4524&r2=4525&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/SignAssertions.java	(original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/SignAssertions.java	Mon Oct 10 13:45:26 2016
@@ -109,6 +109,10 @@
     @Override
     protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
 
+        if (!super.doPreExecute(profileRequestContext)) {
+            return false;
+        }
+        
         response = responseLookupStrategy.apply(profileRequestContext);
         if (response == null) {
             log.debug("{} No SAML Response located in current profile request context", getLogPrefix());
@@ -118,6 +122,7 @@
 
         // Step down into ArtifactResponses.
         if (response instanceof ArtifactResponse) {
+            log.debug("{} Found ArtifactResponse, stepping down into enclosed message", getLogPrefix());
             response = ((ArtifactResponse) response).getMessage();
         }
         
@@ -133,7 +138,6 @@
             }
         } else {
             log.debug("{} Message returned by lookup strategy was not a SAML Response", getLogPrefix());
-            ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_MSG_CTX);
             return false;
         }
 
@@ -150,7 +154,7 @@
             return false;
         }
         
-        return super.doPreExecute(profileRequestContext);
+        return true;
     }
 
     /** {@inheritDoc} */

Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/profile/impl/SignAssertionsTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/profile/impl/SignAssertionsTest.java?rev=4525&r1=4524&r2=4525&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/profile/impl/SignAssertionsTest.java	(original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/profile/impl/SignAssertionsTest.java	Mon Oct 10 13:45:26 2016
@@ -59,7 +59,7 @@
         ActionTestingSupport.assertEvent(prc, EventIds.INVALID_MSG_CTX);
     }
 
-    @Test public void testNoResponse() throws Exception {
+    @Test public void testNoMessage() throws Exception {
         prc.getOutboundMessageContext().setMessage(null);
         
         action.execute(prc);
@@ -70,7 +70,7 @@
         prc.getOutboundMessageContext().setMessage(SAML1ActionTestingSupport.buildAttributeQueryRequest(null));
         
         action.execute(prc);
-        ActionTestingSupport.assertEvent(prc, EventIds.INVALID_MSG_CTX);
+        ActionTestingSupport.assertProceedEvent(prc);
     }
     
     @Test public void testNoSecurityParametersContext() throws Exception {



More information about the commits mailing list