Improve wiring of Spring MVC's CORS-handling feature

Description

Currently we support wiring of Spring CorsConfigurations via optional global bean shibboleth.CorsConfigurations: it’s a static map of CorsConfigurations keyed with the locations under the <context>/profile URL space.

At minimum, we should allow wiring of custom CorsConfigurationSource implementation to enable more dynamic means for CORS configurations. That need has been identified for instance by .

Environment

None

Activity

Scott CantorMarch 25, 2025 at 2:02 PM

I wired up the “existing” support using the actual CorsConfigurationSource and settings that it would use internally via the original setter, that seems to work. So it conditionally will check for shibboleth.CorsConfigurationSource now and fall back to the current support via the list bean, and it works if that bean is absent.

We need to test with the plugin on 5.2.0-SNAPSHOT but this should open up the options at least.

Scott CantorMarch 24, 2025 at 7:55 PM

Of course the two setters are mutually exclusive, so we’ll have to essentially install our own CorsConfigurationSource backed by the map so we can call just the one setter.

Done

Details

Assignee

Reporter

Fix versions

Created October 17, 2024 at 4:32 PM
Updated March 25, 2025 at 2:02 PM
Resolved March 25, 2025 at 2:02 PM