The Shibboleth IdP V4 software will leave support on September 1, 2024.

Moving to Suppliers for accessing HttpServlet Objects

Prior to V5.0 the HttpServletRequest and HttpServletResponse objects for the current request were made available via to https://shibboleth.atlassian.net/wiki/spaces/IDP4/pages/1265631700 called shibboleth.HttpServletResponse and shibboleth.HttpServletResponse. In V4.3 this have been deprecated and using them will cause a warning.

From V4.3 these objects are available via Supplier beans called shibboleth.HttpServletResponseSupplier and shibboleth.HttpServletResponseSupplier.

In order to prepare for V5 all use of the old beans must be replaced by use of the new beans. This is relatively formulaic.

Spring Wiring

All objects which took a p:httpServletRequest property now take a p:httpServletRequestSupplier property hence

<bean id="MyCondition" class="org.opensaml.profile.logic.IPRangePredicate" p:httpServletRequest-ref="shibboleth.HttpServletRequest" p:ranges="#{ '192.168.1.0/24', '192.168.2.0/28' }" />

becomes

<bean id="MyCondition" class="org.opensaml.profile.logic.IPRangePredicate" p:httpServletRequestSupplier-ref="shibboleth.HttpServletRequestSupplier" p:ranges="#{ '192.168.1.0/24', '192.168.2.0/28' }" />

Scripting, Velocity

If the script previously passed shibboleth.HttpServletRequest as the custom parameter it should now have shibboleth.HttpServletRequestSupplier passed instead.

Inside the script the change consists of adding a call to get() in between the original reference to the bean and the servlet method called.

Hence the (contrived) example

<bean id="exampleCondition" parent="shibboleth.Conditions.Scripted" factory-method="inlineScript" p:customObject-ref="shibboleth.HttpServletRequest"> <constructor-arg> <value> <![CDATA[ // Default return value. var result= false; // Make HTTPServletRequest object known as "request". var request = custom; // Check the client's IP address. if (request.remoteAddr.startsWith("192.168.42.")) { activate = true; } result; ]]> </value> </constructor-arg> </bean>

becomes