overridding admin interface beans/flows

Bobby Lawrence robertl at jlab.org
Wed Dec 14 18:54:39 UTC 2022


Hopefully this is my last question related to this.
I cannot seem to find a way to "merge" the shibboleth.DefaultRESTFlows bean into my new shibboleth.RESTFlows bean without simply copying all the list values from the default list (which doesn't seem right).  I don't really do Spring too much but after some searching, I came across some Spring documentation referencing how you can merge collections (https://docs.spring.io/spring-framework/docs/5.3.19/reference/html/core.html#beans-collection-elements-merging) so I ended up with this XML:

<bean id="shibboleth.RESTFlows" parent="shibboleth.DefaultRESTFlows" class="org.springframework.beans.factory.config.ListFactoryBean">
    <property name="sourceList">
        <list merge="true">
            <value>admin/customlockout</value>
        </list>
    </property>
</bean>

However this always results in an error:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'shibboleth.DefaultRESTFlows' available

I've tried putting this XML in my extension's postconfig.xml and global.xml but it results in the same error.
This works of course, but seems "wrong":

<bean id="shibboleth.RESTFlows" class="org.springframework.beans.factory.config.ListFactoryBean">
    <property name="sourceList">
        <list>
	<value>admin/metrics</value>
	<value>admin/lockout</value>
	<value>admin/revocation</value>
	<value>admin/storage</value>
	<value>admin/customlockout</value>
        </list>
    </property>
</bean>

-----Original Message-----
From: Cantor, Scott <cantor.2 at osu.edu> 
Sent: Wednesday, December 14, 2022 12:39 PM
To: Shib Users <users at shibboleth.net>
Cc: Bobby Lawrence <robertl at jlab.org>
Subject: [EXTERNAL] Re: overridding admin interface beans/flows

> I cannot find what I seem to be missing. Somehow SWF cannot route 
> these REST requests properly. I suppose I can change my custom 
> DoLockoutManagerOperation to use query string parameters...

You have to merge in values via shibboleth.RESTFlows (merged into shibboleth.DefaultRESTFlows).

It's a constraint on the support for PathInfo in the whole SWF/servlet mapping layer in Spring.

Probably not documented well, if at all, it hasn't come up, but I allowed it.

-- Scott

(in system file)

    <bean id="shibboleth.DefaultRESTFlows" class="org.springframework.beans.factory.config.ListFactoryBean">
        <property name="sourceList">
            <list>
                <value>admin/metrics</value>
                <value>admin/lockout</value>
                <value>admin/revocation</value>
                <value>admin/storage</value>
            </list>
        </property>
    </bean>




More information about the users mailing list