spring-projects / spring-security

Spring Security
http://spring.io/projects/spring-security
Apache License 2.0
8.71k stars 5.85k forks source link

relying-party-registration doesn't allow placeholders in xml #14645

Open abhishek-bafna-amdhan opened 6 months ago

abhishek-bafna-amdhan commented 6 months ago

Using Spring Security 6.0.8

I use XML based configuration for most security setup as I have customisations that need to be dynamically processed.

Using <security:relying-party-registration... Everything works fine if I hardcode the metadata-location and assertion-consumer-service-location but using a propertyConfigurer the values aren't used.

I have this setup for the propertyConfigurer

<context:property-placeholder location="file:${application.properties}"/>

application.properties contains these values:

relying-party-registration.metadata-location=*****
relying-party-registration.assertion-location=*****
relying-party-registration.logout-location=*****

relying-party-registrations is setup like this:

<security:relying-party-registrations>
        <security:relying-party-registration registration-id="example123"
                                             metadata-location="${relying-party-registration.metadata-location}"
                                             single-logout-service-location="${relying-party-registration.logout-location}"
                                             entity-id="some:entity:id"
                                             assertion-consumer-service-location="${relying-party-registration.assertion-location}">
        </security:relying-party-registration>
</security:relying-party-registrations>

Values are not propagated in the relying-party-registration.

dcdinesh1 commented 5 months ago

I am also facing the same issue, upgrade of spring security work is stuck because of it.