[java-plugin-shibd-saml] branch main updated: Reuse of more beans via import across flows.

Scott Cantor cantor.2 at osu.edu
Thu Oct 17 15:19:04 UTC 2024


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=e79fc910abcbf5f9f4c954b6c65171653ea3ee06

The following commit(s) were added to refs/heads/main by this push:
     new e79fc91  Reuse of more beans via import across flows.
e79fc91 is described below

commit e79fc910abcbf5f9f4c954b6c65171653ea3ee06
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Oct 17 11:19:02 2024 -0400

    Reuse of more beans via import across flows.
---
 .../idp/flows/sp/consumer/saml2/saml2-beans.xml    |  4 +-
 .../idp/flows/sp/initiator/saml2/saml2-beans.xml   | 46 ++++------------------
 .../shibboleth/idp/flows/sp/saml2-common-beans.xml |  2 +-
 .../flows/saml2/SAML2TokenConsumerFlowTest.java    |  5 ---
 4 files changed, 11 insertions(+), 46 deletions(-)

diff --git a/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/saml2/saml2-beans.xml b/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/saml2/saml2-beans.xml
index 3afa58b..ad7b3ac 100644
--- a/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/saml2/saml2-beans.xml
+++ b/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/consumer/saml2/saml2-beans.xml
@@ -7,7 +7,9 @@
                            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
     default-init-method="initialize" default-destroy-method="destroy">
 
-    <!-- These MAY end up reused for logout, etc. -->
+    <util:constant id="shiibboleth.sp.ProfileId"
+        static-field="net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration.PROFILE_ID" />
+
     <import resource="classpath:/META-INF/net/shibboleth/idp/flows/sp/saml2-common-beans.xml" />
 
     <bean id="InboundEntityIDLookup" parent="shibboleth.Functions.Compose">
diff --git a/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/saml2/saml2-beans.xml b/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/saml2/saml2-beans.xml
index 623253e..5c98607 100644
--- a/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/saml2/saml2-beans.xml
+++ b/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/initiator/saml2/saml2-beans.xml
@@ -7,6 +7,11 @@
                            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
     default-init-method="initialize" default-destroy-method="destroy">
 
+    <util:constant id="shiibboleth.sp.ProfileId"
+        static-field="net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration.PROFILE_ID" />
+
+    <import resource="classpath:/META-INF/net/shibboleth/idp/flows/sp/saml2-common-beans.xml" />
+
     <bean id="ValidateSessionInitiatorRequest"
         class="net.shibboleth.sp.profile.impl.ValidateSessionInitiatorRequest" scope="prototype" />
 
@@ -14,44 +19,6 @@
             class="net.shibboleth.idp.saml.session.impl.PrepareInboundMessageContext" scope="prototype"
             p:relyingPartyLookupStrategy-ref="shibboleth.RelyingPartyIdLookup.Simple" />
 
-    <bean id="WebFlowMessageHandlerAdaptor" abstract="true"
-        class="net.shibboleth.idp.profile.impl.WebFlowMessageHandlerAdaptor" scope="prototype"
-        c:executionDirection="INBOUND" />
-
-    <bean id="SAMLProtocolAndRole" parent="WebFlowMessageHandlerAdaptor">
-        <constructor-arg name="messageHandler">
-            <bean class="org.opensaml.saml.common.binding.impl.SAMLProtocolAndRoleHandler" scope="prototype"
-                p:protocol-ref="shibboleth.MetadataLookup.Protocol"
-                p:role-ref="shibboleth.MetadataLookup.Role" />
-        </constructor-arg>
-    </bean>
-    
-    <util:constant id="shibboleth.MetadataLookup.Protocol"
-        static-field="org.opensaml.saml.common.xml.SAMLConstants.SAML20P_NS" />
-
-    <util:constant id="shibboleth.MetadataLookup.Role"
-        static-field="org.opensaml.saml.saml2.metadata.IDPSSODescriptor.DEFAULT_ELEMENT_NAME" />
-    
-    <bean id="SAMLMetadataLookup" parent="WebFlowMessageHandlerAdaptor">
-        <constructor-arg name="messageHandler">
-            <bean class="org.opensaml.saml.common.binding.impl.SAMLMetadataLookupHandler" scope="prototype">
-                <property name="roleDescriptorResolverLookupStrategy">
-                    <bean class="net.shibboleth.sp.profile.context.navigate.messaging.ApplicationMetadataResolverLookupFunction" />
-                </property>
-            </bean>
-        </constructor-arg>
-    </bean>
-
-    <bean id="InitializeRelyingPartyContextFromSAMLPeer"
-        class="net.shibboleth.idp.saml.profile.impl.InitializeRelyingPartyContextFromSAMLPeer" scope="prototype" />
-
-    <bean id="SelectRelyingPartyConfiguration"
-        class="net.shibboleth.sp.profile.impl.SelectRelyingPartyConfiguration" scope="prototype" />
-
-    <bean id="SelectProfileConfiguration"
-        class="net.shibboleth.idp.profile.impl.SelectProfileConfiguration" scope="prototype"
-        p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}" />
-
     <bean id="InitializeOutboundMessageContext"
         class="net.shibboleth.idp.saml.profile.impl.InitializeOutboundMessageContext" scope="prototype"
         p:selfIdentityLookupStrategy-ref="shibboleth.IssuerLookup.Simple" />
@@ -124,7 +91,8 @@
         </property>
     </bean>
 
-    <bean id="HandleOutboundMessage" parent="WebFlowMessageHandlerAdaptor"
+    <bean id="HandleOutboundMessage"
+            class="net.shibboleth.idp.profile.impl.WebFlowMessageHandlerAdaptor" scope="prototype"
             c:messageHandler-ref="PreEncodeMessageHandler"
             c:executionDirection="OUTBOUND">
         <property name="errorEvent">
diff --git a/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/saml2-common-beans.xml b/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/saml2-common-beans.xml
index cfc5c60..41434c7 100644
--- a/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/saml2-common-beans.xml
+++ b/sp-saml-conf-impl/src/main/resources/META-INF/net/shibboleth/idp/flows/sp/saml2-common-beans.xml
@@ -53,7 +53,7 @@
 
     <bean id="SelectProfileConfiguration"
         class="net.shibboleth.idp.profile.impl.SelectProfileConfiguration" scope="prototype"
-        p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}" />
+        p:profileId-ref="shiibboleth.sp.ProfileId" />
 
     <bean id="PopulateSignatureValidationParameters"
         class="org.opensaml.profile.action.impl.PopulateSignatureValidationParameters" scope="prototype"
diff --git a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java
index ac06e99..b4abad9 100644
--- a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java
+++ b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java
@@ -49,7 +49,6 @@ import org.opensaml.saml.saml2.core.SubjectLocality;
 import org.opensaml.saml.saml2.testing.SAML2ActionTestingSupport;
 import org.opensaml.security.SecurityException;
 import org.opensaml.security.credential.Credential;
-import org.opensaml.storage.StorageService;
 import org.opensaml.xmlsec.SignatureSigningParameters;
 import org.opensaml.xmlsec.signature.SignableXMLObject;
 import org.opensaml.xmlsec.signature.support.SignatureConstants;
@@ -61,7 +60,6 @@ import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.web.WebAppConfiguration;
 import org.springframework.webflow.executor.FlowExecutionResult;
 import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
@@ -72,15 +70,12 @@ import net.shibboleth.shared.codec.DecodingException;
 import net.shibboleth.shared.codec.EncodingException;
 import net.shibboleth.shared.collection.CollectionSupport;
 import net.shibboleth.shared.collection.Pair;
-import net.shibboleth.shared.component.ComponentInitializationException;
 import net.shibboleth.shared.net.URISupport;
 import net.shibboleth.shared.security.IdentifierGenerationStrategy;
 import net.shibboleth.shared.xml.XMLParserException;
 import net.shibboleth.sp.context.AgentRequestContext;
 import net.shibboleth.sp.ddf.DDF;
 import net.shibboleth.sp.flows.AbstractSPFlowTest;
-import net.shibboleth.sp.impl.PassthroughStateTokenManager;
-import net.shibboleth.sp.impl.StorageServiceStateTokenManager;
 import net.shibboleth.sp.messaging.RemotedHttpServletRequest;
 import net.shibboleth.sp.messaging.RemotedHttpServletResponse;
 import net.shibboleth.sp.profile.ConsumerConstants;

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


More information about the commits mailing list