[java-plugin-shibd-saml] branch main updated: Tweaks to response endpoint handling.

Scott Cantor cantor.2 at osu.edu
Mon Feb 10 21:37:18 UTC 2025


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-plugin-shibd-saml.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd-saml.git;a=commit;h=6a630a8fb0135c96b088379e0c837d1902f508c8

The following commit(s) were added to refs/heads/main by this push:
     new 6a630a8  Tweaks to response endpoint handling.
6a630a8 is described below

commit 6a630a8fb0135c96b088379e0c837d1902f508c8
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Feb 10 16:37:12 2025 -0500

    Tweaks to response endpoint handling.
---
 .../saml/flows/saml2/SAML2SessionInitiatorFlowTest.java | 17 ++++++++++++++---
 .../sp/saml/saml2/profile/impl/AddAuthnRequest.java     |  1 -
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2SessionInitiatorFlowTest.java b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2SessionInitiatorFlowTest.java
index cc4ec2c..d5be9fe 100644
--- a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2SessionInitiatorFlowTest.java
+++ b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2SessionInitiatorFlowTest.java
@@ -142,12 +142,13 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
     }
 
     /**
-     * Test flow without proper input.
+     * Test flow without response URL.
      * 
      * @throws IOException 
+     * @throws MessageDecodingException 
      */
     @Test
-    public void testNoResponseURL() throws IOException {
+    public void testNoResponseURL() throws IOException, MessageDecodingException {
         setDefaultAuth();
 
         setApplicationRequest(APPLICATION_ID, null);
@@ -155,7 +156,17 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
         final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
         assertFlowExecutionResult(result, FLOW_ID);
         assertFlowExecutionOutcome(result.getOutcome());
-        assertOutputMessageEvent(result, AuthnEventIds.NO_POTENTIAL_FLOW);
+        
+        assertOutputMessageSuccess(result);
+        
+        final AuthnRequest req = validateOutputMessage(result, null);
+        Assert.assertEquals(req.getProtocolBinding(), SAMLConstants.SAML2_POST_BINDING_URI);
+        Assert.assertNull(req.getAssertionConsumerServiceURL());
+        Assert.assertNull(req.getSubject());
+        Assert.assertNull(req.getRequestedAuthnContext());
+        Assert.assertNull(req.getScoping());
+        assertFalse(req.isForceAuthn());
+        assertFalse(req.isPassive());
     }
     
     /**
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/AddAuthnRequest.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/AddAuthnRequest.java
index c659cfa..c44a58f 100644
--- a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/AddAuthnRequest.java
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/AddAuthnRequest.java
@@ -389,7 +389,6 @@ public class AddAuthnRequest extends AbstractApplicationAction {
             // We have no means of determining which of multiple endpoints would match the intended binding,
             // or no specific binding is required, so we have to just pick the first endpoint.
             authnRequest.setAssertionConsumerServiceURL(endpoints.get(0).string());
-            authnRequest.setProtocolBinding(null);
             return true;
         }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list