[java-plugin-shibd-saml] branch main updated: Fix initiatpr tests.
Scott Cantor
cantor.2 at osu.edu
Fri Apr 11 17:35:24 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=45c555c6a886c6c37decfa475de2d14493f12d17
The following commit(s) were added to refs/heads/main by this push:
new 45c555c Fix initiatpr tests.
45c555c is described below
commit 45c555c6a886c6c37decfa475de2d14493f12d17
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Apr 11 13:35:18 2025 -0400
Fix initiatpr tests.
---
.../saml/flows/saml2/SAML2SessionInitiatorFlowTest.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
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 759ce18..5e680b7 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
@@ -71,6 +71,9 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
/** Flow ID. */
@Nonnull public static final String FLOW_ID = "sp/session-initiator";
+ /** Resource URL. */
+ @Nonnull public static final byte[] RESOURCE_URL = "https://sp.example.org/secure".getBytes(StandardCharsets.UTF_8);
+
/** ACS URL. */
@Nonnull public static final String RESPONSE_URL = "https://sp.example.org/Shibboleth.sso/ACS";
@@ -97,6 +100,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
setApplicationRequest("no-metadata", input);
final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
@@ -117,6 +121,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
setApplicationRequest("no-profile", input);
final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
@@ -137,6 +142,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
setApplicationRequest("no-endpoint", input);
final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
@@ -157,6 +163,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
setApplicationRequest(APPLICATION_ID, input);
final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
@@ -218,6 +225,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
final DDF endpoints = input.addmember(InitiatorConstants.RESPONSE_URL).list();
endpoints.add(new DDF("POST").string(POST_RESPONSE_URL));
endpoints.add(new DDF("Artifact").string(ARTIFACT_RESPONSE_URL));
@@ -250,6 +258,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
final DDF endpoints = input.addmember(InitiatorConstants.RESPONSE_URL).list();
endpoints.add(new DDF("POST").string(POST_RESPONSE_URL));
endpoints.add(new DDF("Artifact").string(ARTIFACT_RESPONSE_URL));
@@ -282,6 +291,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
final DDF endpoints = input.addmember(InitiatorConstants.RESPONSE_URL).list();
endpoints.add(new DDF("POST").string(POST_RESPONSE_URL));
endpoints.add(new DDF("NoMatch").string(ARTIFACT_RESPONSE_URL));
@@ -339,6 +349,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
input.addmember(SAML2InitiatorConstants.FORCE_AUTHN).integer(1);
setApplicationRequest(APPLICATION_ID, input);
@@ -368,6 +379,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
input.addmember(SAML2InitiatorConstants.FORCE_AUTHN).integer(1);
setApplicationRequest("feature-blocking", input);
@@ -397,6 +409,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
input.addmember(SAML2InitiatorConstants.IS_PASSIVE).integer(1);
setApplicationRequest(APPLICATION_ID, input);
@@ -426,6 +439,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
input.addmember(SAML2InitiatorConstants.NAMEID_FORMAT).string(NameIDType.EMAIL);
setApplicationRequest(APPLICATION_ID, input);
@@ -455,6 +469,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
input.addmember(SAML2InitiatorConstants.NAMEID_FORMAT).string(NameIDType.EMAIL);
setApplicationRequest("feature-blocking", input);
@@ -484,6 +499,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
final DDF aclist = input.addmember(SAML2InitiatorConstants.AUTHN_CONTEXT_CLASS_REF).list();
aclist.add(new DDF(null).string(AuthnContext.X509_AUTHN_CTX));
aclist.add(new DDF(null).string(AuthnContext.TIME_SYNC_TOKEN_AUTHN_CTX));
@@ -522,6 +538,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final DDF input = new DDF(null).structure();
input.addmember(RemotedHttpServletRequest.STRUCTURE_NAME).structure();
input.addmember(InitiatorConstants.RESPONSE_URL).string(RESPONSE_URL);
+ input.addmember(SPConstants.TARGET).unsafe_string(RESOURCE_URL);
final DDF aclist = input.addmember(SAML2InitiatorConstants.AUTHN_CONTEXT_CLASS_REF).list();
aclist.add(new DDF(null).string(AuthnContext.X509_AUTHN_CTX));
aclist.add(new DDF(null).string(AuthnContext.TIME_SYNC_TOKEN_AUTHN_CTX));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list