[java-idp-integration-tests] branch main updated: Set full endpoint path instead of only the port for attribute queries
Tom Zeller
tzeller at dragonacea.biz
Tue Jul 2 22:05:41 UTC 2024
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch main
in repository java-idp-integration-tests.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=528741595e4c36fb2b6810646ae1749ea6a10a2f
The following commit(s) were added to refs/heads/main by this push:
new 5287415 Set full endpoint path instead of only the port for attribute queries
5287415 is described below
commit 528741595e4c36fb2b6810646ae1749ea6a10a2f
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Tue Jul 2 17:05:26 2024 -0500
Set full endpoint path instead of only the port for attribute queries
To support hosts other than the default localhost.
---
.../saml2/SAML2AttributeQueryIntegrationTest.java | 36 ++++++++--------------
1 file changed, 13 insertions(+), 23 deletions(-)
diff --git a/src/test/java/net/shibboleth/idp/integration/tests/saml2/SAML2AttributeQueryIntegrationTest.java b/src/test/java/net/shibboleth/idp/integration/tests/saml2/SAML2AttributeQueryIntegrationTest.java
index 61a1315..658f694 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/saml2/SAML2AttributeQueryIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/saml2/SAML2AttributeQueryIntegrationTest.java
@@ -19,7 +19,6 @@ package net.shibboleth.idp.integration.tests.saml2;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -53,7 +52,6 @@ import net.shibboleth.idp.test.flows.saml2.SAML2TestStatusResponseTypeValidator;
import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.net.IPRange;
-import net.shibboleth.shared.net.URLBuilder;
import net.shibboleth.shared.xml.XMLParserException;
/** SAML 2 AttributeQuery test. */
@@ -187,21 +185,6 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
responsePageURLPath = "/sp/SAML2/POST/ACS";
}
- /**
- * Change endpoint port from the default to whatever is in use.
- *
- * @throws MalformedURLException ...
- */
- protected void adjustEndpointPort() throws MalformedURLException {
- final WebElement endpointInput = driver.findElement(By.id("saml2-attribute-query-endpoint"));
- final String oldEndpoint = endpointInput.getAttribute("value");
- final URLBuilder urlBuilder = new URLBuilder(oldEndpoint);
- urlBuilder.setPort(backchannelPort);
- final String newEndpoint = urlBuilder.buildURL();
- endpointInput.clear();
- endpointInput.sendKeys(newEndpoint);
- }
-
/**
* Enable SAML 2 Attribute Query profile.
*
@@ -249,6 +232,13 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
uncommentFile(pathToSubjectC14nXML, toUncomment);
}
+ /**
+ * Set IdP attribute query endpoint to the secure base URL followed by the default profile path.
+ */
+ protected void setAttributeQueryEndpoint() {
+ setParameter("saml2-attribute-query-endpoint", getBaseURL(true) + "/idp/profile/SAML2/SOAP/AttributeQuery");
+ }
+
/**
* Set path to client signing certificate resource. A <code>null</code> path clears the request parameter.
*
@@ -350,7 +340,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
getAndWaitForTestbedPage();
- adjustEndpointPort();
+ setAttributeQueryEndpoint();
}
@Test(dataProvider = "sauceOnDemandBrowserDataProvider")
@@ -516,7 +506,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
getAndWaitForTestbedPage();
- adjustEndpointPort();
+ setAttributeQueryEndpoint();
submitAttributeQueryForm();
@@ -582,7 +572,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
getAndWaitForTestbedPage();
- adjustEndpointPort();
+ setAttributeQueryEndpoint();
submitAttributeQueryForm();
@@ -632,7 +622,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
getAndWaitForTestbedPage();
- adjustEndpointPort();
+ setAttributeQueryEndpoint();
submitAttributeQueryForm();
@@ -682,7 +672,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
getAndWaitForTestbedPage();
- adjustEndpointPort();
+ setAttributeQueryEndpoint();
submitAttributeQueryForm();
@@ -740,7 +730,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
getAndWaitForTestbedPage();
- adjustEndpointPort();
+ setAttributeQueryEndpoint();
submitAttributeQueryForm();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list