[java-idp-integration-tests] 04/04: Enable attribute query if IdP version is not 3.x

Tom Zeller tzeller at dragonacea.biz
Tue Jan 28 14:23:32 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=be5545cef83b99984e268b9bd2dbbaaa96d2c0ec

commit be5545cef83b99984e268b9bd2dbbaaa96d2c0ec
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Tue Jan 28 13:23:12 2020 -0600

    Enable attribute query if IdP version is not 3.x
    
    https://issues.shibboleth.net/jira/browse/IDP-1526
---
 .../test/saml2/SAML2AttributeQueryIntegrationTest.java    | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/test/java/net/shibboleth/idp/test/saml2/SAML2AttributeQueryIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/saml2/SAML2AttributeQueryIntegrationTest.java
index b9acc28..36180bc 100644
--- a/src/test/java/net/shibboleth/idp/test/saml2/SAML2AttributeQueryIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/saml2/SAML2AttributeQueryIntegrationTest.java
@@ -190,6 +190,17 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
     }
 
     /**
+     * Enable SAML 2 Attribute Query profile.
+     * 
+     * @throws IOException if the configuration file cannot be changed
+     */
+    protected void enableAttributeQueryProfile() throws IOException {
+        final Path pathToRelyingPartyXML = pathToIdPHome.resolve(Paths.get("conf", "relying-party.xml"));
+        final String toUncomment = "<ref bean=\"SAML2.AttributeQuery\" />";
+        uncommentFile(pathToRelyingPartyXML, toUncomment);
+    }
+
+    /**
      * Enable attribute consent during an attribute query.
      * 
      * @throws IOException if the configuration file cannot be changed
@@ -318,6 +329,10 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
 
         enableDirectNameIDMapping();
 
+        if (!idpVersion.startsWith("3")) {
+            enableAttributeQueryProfile();
+        }
+
         startServer();
 
         getAndWaitForTestbedPage();

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


More information about the commits mailing list