[java-identity-provider] branch main updated: IDP-1652 - Support easier integration into configuration by plugins

Scott Cantor cantor.2 at osu.edu
Mon Sep 21 20:18:06 UTC 2020


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=957f17d217460a009d49fd93963e1901681dd1c5

The following commit(s) were added to refs/heads/main by this push:
       new  957f17d21 IDP-1652 - Support easier integration into configuration by plugins
957f17d21 is described below

commit 957f17d217460a009d49fd93963e1901681dd1c5
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Sep 21 16:18:02 2020 -0400

    IDP-1652 - Support easier integration into configuration by plugins
    
    https://issues.shibboleth.net/jira/browse/IDP-1652
    
    Auto-wire logout propagation descriptors.
    Remove original list from conf.
---
 .../shibboleth/idp/conf/session-manager-system.xml | 16 +++++--
 .../src/main/resources/conf/session-manager.xml    |  6 ---
 .../LogoutPropagationFlowDescriptorManager.java    | 49 ++++++++++++++++++++++
 3 files changed, 61 insertions(+), 10 deletions(-)

diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/session-manager-system.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/session-manager-system.xml
index 12594c5e7..ff0de2094 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/session-manager-system.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/session-manager-system.xml
@@ -76,19 +76,27 @@
             p:IDGenerator-ref="shibboleth.SessionIDGenerator"
             p:SPSessionSerializerRegistry="#{getObject('shibboleth.SPSessionSerializerRegistry') ?: getObject('shibboleth.DefaultSPSessionSerializerRegistry')}" />
 
+    <!-- Management bean to collect and expose LogoutPropagationFlowDescriptors. -->
+    
+    <bean id="shibboleth.LogoutPropagationFlowDescriptorManager"
+        class="net.shibboleth.idp.session.impl.LogoutPropagationFlowDescriptorManager"
+        p:components="#{getObject('shibboleth.LogoutPropagationFlows')}" />
+
     <!-- Built-in logout propagation flows. -->
 
+    <!-- These bean IDs have to be set (vs. just p:id) because the original config ref'd them. -->
+
     <bean id="logoutprop/cas" class="net.shibboleth.idp.session.LogoutPropagationFlowDescriptor"
-          c:_0="#{ T(net.shibboleth.idp.cas.session.impl.CASSPSession) }" />
+          c:_0="net.shibboleth.idp.cas.session.impl.CASSPSession" />
 
     <bean id="logoutprop/saml2" class="net.shibboleth.idp.session.LogoutPropagationFlowDescriptor"
-          c:_0="#{ T(net.shibboleth.idp.saml.session.SAML2SPSession) }" />
+          c:_0="net.shibboleth.idp.saml.session.SAML2SPSession" />
 
     <!-- Selector function used in logout-propagation UI and logout-propagation driver flow -->
 
-    <bean id="shibboleth.LogoutPropagationFlowSelector"
+    <bean id="shibboleth.LogoutPropagationFlowSelector" depends-on="shibboleth.LogoutPropagationFlowDescriptorManager"
           class="net.shibboleth.idp.session.logic.LogoutPropagationFlowDescriptorSelector"
-          c:flows-ref="shibboleth.LogoutPropagationFlows" />
+          c:flows="#{@'shibboleth.LogoutPropagationFlowDescriptorManager'.getComponents()}" />
 
     <!-- The import is at the bottom to avoid a depends-on in a user-editable file. -->
     <import resource="${idp.home}/conf/session-manager.xml" />
diff --git a/idp-conf/src/main/resources/conf/session-manager.xml b/idp-conf/src/main/resources/conf/session-manager.xml
index 737202971..e79624436 100644
--- a/idp-conf/src/main/resources/conf/session-manager.xml
+++ b/idp-conf/src/main/resources/conf/session-manager.xml
@@ -10,12 +10,6 @@
     default-init-method="initialize"
     default-destroy-method="destroy">
 
-    <!-- Flows that propagate logout to additional services using supported protocols. -->
-    <util:list id="shibboleth.LogoutPropagationFlows">
-        <ref bean="logoutprop/cas" />
-        <ref bean="logoutprop/saml2" />
-    </util:list>
-        
     <!--
     List of client-side storage service plugins. If you use server-side storage and don't need these
     services, you can remove or comment out the <ref> elements, but don't remove the list bean or
diff --git a/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/LogoutPropagationFlowDescriptorManager.java b/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/LogoutPropagationFlowDescriptorManager.java
new file mode 100644
index 000000000..f830f260b
--- /dev/null
+++ b/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/LogoutPropagationFlowDescriptorManager.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.idp.session.impl;
+
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+import net.shibboleth.ext.spring.util.IdentifiedComponentManager;
+import net.shibboleth.idp.session.LogoutPropagationFlowDescriptor;
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
+
+/**
+ * Manager of {@link LogoutPropagationFlowDescriptor} objects.
+ * 
+ * @since 4.1.0
+ */
+public class LogoutPropagationFlowDescriptorManager
+        extends IdentifiedComponentManager<LogoutPropagationFlowDescriptor> {
+
+    /**
+     * Constructor.
+     *
+     * @param freeObjects  free-standing objects
+     */
+    @Autowired
+    public LogoutPropagationFlowDescriptorManager(
+            @Nullable @NonnullElements final List<LogoutPropagationFlowDescriptor> freeObjects) {
+        super(freeObjects);
+    }
+
+}
\ No newline at end of file

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


More information about the commits mailing list