[java-identity-provider] branch main updated: Factor out RelyingPartyConfiguration into interface.

Scott Cantor cantor.2 at osu.edu
Mon Mar 6 20:00:44 UTC 2023


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

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=acfc58d2defefaa38bcc649c924ba71ad093f9c6

The following commit(s) were added to refs/heads/main by this push:
     new acfc58d2d Factor out RelyingPartyConfiguration into interface.
acfc58d2d is described below

commit acfc58d2defefaa38bcc649c924ba71ad093f9c6
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Mar 6 15:00:39 2023 -0500

    Factor out RelyingPartyConfiguration into interface.
---
 .../net/shibboleth/idp/conf/relying-party-system.xml        |  2 +-
 .../net/shibboleth/idp/test/flows/SetupForResolver.java     |  4 ++--
 .../profile/impl/SelectRelyingPartyConfigurationTest.java   |  5 +++--
 .../impl/tests/RelyingPartyConfigurationResolverTest.java   | 13 +++++++------
 .../saml/saml1/profile/impl/SAML1ActionTestingSupport.java  |  3 ++-
 .../idp/saml/saml2/profile/impl/AddAuthnRequestTest.java    |  4 ++--
 .../saml/saml2/profile/impl/SAML2ActionTestingSupport.java  |  3 ++-
 .../idp/profile/testing/RequestContextBuilder.java          |  3 ++-
 8 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-system.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-system.xml
index 3993260a2..bd4cca62d 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-system.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-system.xml
@@ -38,7 +38,7 @@
     </bean>
 
     <!-- Parent bean for generic RelyingParty overrides that establishes defaults. -->
-    <bean id="RelyingParty" abstract="true" class="net.shibboleth.profile.relyingparty.RelyingPartyConfiguration"
+    <bean id="RelyingParty" abstract="true" class="net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration"
         p:issuer="#{getObject('entityID')}"
         p:detailedErrorsPredicate="%{idp.errors.detailed:false}" />
 
diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/SetupForResolver.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/SetupForResolver.java
index 01e39386a..9ee2783bc 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/SetupForResolver.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/SetupForResolver.java
@@ -23,7 +23,7 @@ import net.shibboleth.idp.authn.context.SubjectContext;
 import net.shibboleth.idp.profile.AbstractProfileAction;
 import net.shibboleth.idp.profile.IdPEventIds;
 import net.shibboleth.profile.context.RelyingPartyContext;
-import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
+import net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration;
 import net.shibboleth.shared.component.ComponentInitializationException;
 
 import org.opensaml.profile.action.ActionSupport;
@@ -43,7 +43,7 @@ public class SetupForResolver extends AbstractProfileAction {
         final RelyingPartyContext rpContext = profileRequestContext.getOrCreateSubcontext(RelyingPartyContext.class);
         rpContext.setRelyingPartyId(AbstractFlowTest.SP_ENTITY_ID);
         
-        final RelyingPartyConfiguration config = new RelyingPartyConfiguration();
+        final BasicRelyingPartyConfiguration config = new BasicRelyingPartyConfiguration();
         config.setId("test");
         config.setIssuer(AbstractFlowTest.IDP_ENTITY_ID);
         try {
diff --git a/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/SelectRelyingPartyConfigurationTest.java b/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/SelectRelyingPartyConfigurationTest.java
index dd84051ee..e68aa9ca5 100644
--- a/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/SelectRelyingPartyConfigurationTest.java
+++ b/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/SelectRelyingPartyConfigurationTest.java
@@ -36,6 +36,7 @@ import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileR
 import net.shibboleth.idp.profile.testing.ActionTestingSupport;
 import net.shibboleth.idp.profile.testing.RequestContextBuilder;
 import net.shibboleth.profile.context.RelyingPartyContext;
+import net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfigurationResolver;
 import net.shibboleth.shared.collection.CollectionSupport;
@@ -115,7 +116,7 @@ public class SelectRelyingPartyConfigurationTest {
         assert rpCtx != null;
         rpCtx.setConfiguration(null);
 
-        final var config = new net.shibboleth.profile.relyingparty.RelyingPartyConfiguration();
+        final var config = new BasicRelyingPartyConfiguration();
         config.setId("foo");
         config.setIssuer("http://idp.example.org");
         config.setDetailedErrors(true);
@@ -143,7 +144,7 @@ public class SelectRelyingPartyConfigurationTest {
         assert rpCtx != null;
         rpCtx.setConfiguration(null);
 
-        final var config = new net.shibboleth.profile.relyingparty.RelyingPartyConfiguration();
+        final var config = new BasicRelyingPartyConfiguration();
         config.setId("foo");
         config.setIssuer("http://idp.example.org");
         config.setDetailedErrors(true);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/relyingparty/impl/tests/RelyingPartyConfigurationResolverTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/relyingparty/impl/tests/RelyingPartyConfigurationResolverTest.java
index e027b0db7..e1544e3a4 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/relyingparty/impl/tests/RelyingPartyConfigurationResolverTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/relyingparty/impl/tests/RelyingPartyConfigurationResolverTest.java
@@ -42,6 +42,7 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
+import net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfigurationResolver;
 import net.shibboleth.profile.relyingparty.VerifiedProfileCriterion;
@@ -56,23 +57,23 @@ import net.shibboleth.shared.resolver.ResolverException;
 @SuppressWarnings("javadoc")
 public class RelyingPartyConfigurationResolverTest extends XMLObjectBaseTestCase {
     
-    private RelyingPartyConfiguration anonRP, defaultRP; 
+    private BasicRelyingPartyConfiguration anonRP, defaultRP; 
     
-    private RelyingPartyConfiguration oneByName, twoByName, threeByName;
-    private RelyingPartyConfiguration oneByGroup, twoByGroup;
-    private RelyingPartyConfiguration oneByTag, twoByTag;
+    private BasicRelyingPartyConfiguration oneByName, twoByName, threeByName;
+    private BasicRelyingPartyConfiguration oneByGroup, twoByGroup;
+    private BasicRelyingPartyConfiguration oneByTag, twoByTag;
     
     private DefaultRelyingPartyConfigurationResolver resolver;
         
     @BeforeMethod
     public void setup() throws Exception {
-        anonRP = new RelyingPartyConfiguration();
+        anonRP = new BasicRelyingPartyConfiguration();
         anonRP.setId("anonRPId");
         anonRP.setIssuer("anonRPResp");
         anonRP.setDetailedErrors(true);
         anonRP.initialize();
         
-        defaultRP = new RelyingPartyConfiguration();
+        defaultRP = new BasicRelyingPartyConfiguration();
         defaultRP.setId("defaultRPId");
         defaultRP.setIssuer("defaultRPResp");
         defaultRP.setDetailedErrors(true);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionTestingSupport.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionTestingSupport.java
index 5afa46a59..188173850 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionTestingSupport.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionTestingSupport.java
@@ -25,6 +25,7 @@ import javax.annotation.Nullable;
 
 import net.shibboleth.profile.config.ProfileConfiguration;
 import net.shibboleth.profile.context.RelyingPartyContext;
+import net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
 import net.shibboleth.idp.profile.testing.ActionTestingSupport;
 import net.shibboleth.idp.saml.saml1.profile.config.impl.ArtifactResolutionProfileConfiguration;
@@ -67,7 +68,7 @@ public final class SAML1ActionTestingSupport extends org.opensaml.saml.saml1.tes
             id = ActionTestingSupport.INBOUND_MSG_ISSUER;
         }
 
-        final RelyingPartyConfiguration rpConfig = new RelyingPartyConfiguration();
+        final BasicRelyingPartyConfiguration rpConfig = new BasicRelyingPartyConfiguration();
         rpConfig.setId(id);
         rpConfig.setIssuer(ActionTestingSupport.OUTBOUND_MSG_ISSUER);
         rpConfig.setDetailedErrors(true);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
index e92f9127e..1c2fc3e24 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
@@ -38,7 +38,7 @@ import net.shibboleth.idp.saml.authn.principal.AuthnContextClassRefPrincipal;
 import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
 import net.shibboleth.profile.context.RelyingPartyContext;
 import net.shibboleth.profile.context.navigate.IssuerLookupFunction;
-import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
+import net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration;
 import net.shibboleth.shared.collection.CollectionSupport;
 import net.shibboleth.shared.component.ComponentInitializationException;
 
@@ -90,7 +90,7 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         
         rpc = prc2.getOrCreateSubcontext(RelyingPartyContext.class);
         rpc.setRelyingPartyId(ActionTestingSupport.INBOUND_MSG_ISSUER);
-        final RelyingPartyConfiguration rp = new RelyingPartyConfiguration();
+        final BasicRelyingPartyConfiguration rp = new BasicRelyingPartyConfiguration();
         rp.setId("mock");
         rp.setIssuer(ActionTestingSupport.OUTBOUND_MSG_ISSUER);
         rp.setDetailedErrors(true);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionTestingSupport.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionTestingSupport.java
index 9552b864d..4bc3d7eb1 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionTestingSupport.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionTestingSupport.java
@@ -25,6 +25,7 @@ import javax.annotation.Nullable;
 
 import net.shibboleth.profile.config.ProfileConfiguration;
 import net.shibboleth.profile.context.RelyingPartyContext;
+import net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
 import net.shibboleth.idp.profile.testing.ActionTestingSupport;
 import net.shibboleth.idp.saml.saml2.profile.config.impl.ArtifactResolutionProfileConfiguration;
@@ -67,7 +68,7 @@ public final class SAML2ActionTestingSupport extends org.opensaml.saml.saml2.tes
             id = ActionTestingSupport.INBOUND_MSG_ISSUER;
         }
 
-        final RelyingPartyConfiguration rpConfig = new RelyingPartyConfiguration();
+        final BasicRelyingPartyConfiguration rpConfig = new BasicRelyingPartyConfiguration();
         rpConfig.setId(id);
         rpConfig.setIssuer(ActionTestingSupport.OUTBOUND_MSG_ISSUER);
         rpConfig.setDetailedErrors(true);
diff --git a/idp-testing/src/main/java/net/shibboleth/idp/profile/testing/RequestContextBuilder.java b/idp-testing/src/main/java/net/shibboleth/idp/profile/testing/RequestContextBuilder.java
index 68895edaf..e10bfdece 100644
--- a/idp-testing/src/main/java/net/shibboleth/idp/profile/testing/RequestContextBuilder.java
+++ b/idp-testing/src/main/java/net/shibboleth/idp/profile/testing/RequestContextBuilder.java
@@ -33,6 +33,7 @@ import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 import net.shibboleth.profile.config.ProfileConfiguration;
 import net.shibboleth.profile.context.RelyingPartyContext;
+import net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
 import net.shibboleth.shared.component.ComponentInitializationException;
 
@@ -450,7 +451,7 @@ public class RequestContextBuilder {
             profileConfigs.add(new MockProfileConfiguration("mock"));
         }
 
-        RelyingPartyConfiguration rp = new RelyingPartyConfiguration();
+        BasicRelyingPartyConfiguration rp = new BasicRelyingPartyConfiguration();
         rp.setId("mock");
         rp.setIssuer(responderId);
         rp.setDetailedErrors(true);

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


More information about the commits mailing list