[java-idp-integration-tests] 01/02: Enable SAML 1 profiles if IdP version is not 3.x
Tom Zeller
tzeller at dragonacea.biz
Wed Jan 29 13:31:53 EST 2020
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch master
in repository java-idp-integration-tests.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=fea45c4c2550f99b9a498e81a6968c8c52a69474
commit fea45c4c2550f99b9a498e81a6968c8c52a69474
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Wed Jan 29 12:30:46 2020 -0600
Enable SAML 1 profiles if IdP version is not 3.x
https://issues.shibboleth.net/jira/browse/IDP-1526
---
.../test/saml1/AbstractSAML1IntegrationTest.java | 34 ++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1IntegrationTest.java b/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1IntegrationTest.java
index c2feed7..c7670ea 100644
--- a/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1IntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1IntegrationTest.java
@@ -20,6 +20,8 @@ package net.shibboleth.idp.test.saml1;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -90,6 +92,34 @@ public class AbstractSAML1IntegrationTest extends BaseIntegrationTest {
}
/**
+ * Enable SAML 1 AttributeQuery, ArtifactResolution, and Shibboleth.SSO profiles.
+ *
+ * @throws IOException if the configuration file cannot be changed
+ */
+ protected void enableSAML1Profiles() throws IOException {
+ final Path pathToRelyingPartyXML = pathToIdPHome.resolve(Paths.get("conf", "relying-party.xml"));
+
+ // Uncomment disabled by default AttributeQuery profile
+ final StringBuilder toUncomment = new StringBuilder();
+ toUncomment.append("\\<\\!--\\s+");
+ toUncomment.append("<bean parent=\"Shibboleth.SSO\" p:postAuthenticationFlows=\"attribute-release\" />");
+ toUncomment.append("\\s+");
+ toUncomment.append("<ref bean=\"SAML1.AttributeQuery\" />");
+ toUncomment.append("\\s+");
+ toUncomment.append("<ref bean=\"SAML1.ArtifactResolution\" />");
+ toUncomment.append("\\s+--\\>");
+
+ final StringBuilder commented = new StringBuilder();
+ commented.append("<bean parent=\"Shibboleth.SSO\" p:postAuthenticationFlows=\"attribute-release\" />");
+ commented.append(System.lineSeparator());
+ commented.append("<ref bean=\"SAML1.AttributeQuery\" />");
+ commented.append(System.lineSeparator());
+ commented.append("<ref bean=\"SAML1.ArtifactResolution\" />");
+
+ replaceFile(pathToRelyingPartyXML, toUncomment.toString(), commented.toString());
+ }
+
+ /**
* Test SAML 1 SSO.
*
* @param browserData browser/os/version triplet provided by data provider
@@ -99,6 +129,10 @@ public class AbstractSAML1IntegrationTest extends BaseIntegrationTest {
startSeleniumClient(browserData);
+ if (!idpVersion.startsWith("3")) {
+ enableSAML1Profiles();
+ }
+
enableCustomRelyingPartyConfiguration();
startServer();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list