Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

SEC-1201: PropertyPlaceholderConfigurer does not work for intercept-url attributes #1447

spring-issuemaster opened this Issue Jul 17, 2009 · 3 comments


None yet
1 participant

Marc Rohlfs (Migrated from SEC-1201) said:


I need to define a property placeholder to configure the access for an intercept URL pattern:
<security:intercept-url pattern="/**" access="ROLE_${access.role}" />

As the HttpSecurityBeanDefinitionParser doesn't create BeanDefinitions for any the properties (and sub-properties) that are passed to the FilterSecurityInterceptor, the PropertyPlaceholderConfigurer can't substitute them. This issue looks very equal to SEC-975, but I guess it's a little harder to solve as the pattern-access map resides deeper in the object hierarchy.

Kind regards


Marc Rohlfs said:

BTW: Adding the following bean definitions to the Spring context serves as a workaround for the problem - but it looks a little wired, doesn't it?

David Findlay said:

It doesn't expand parameters in the requires-channel attributed of intercept-url or in form-login either.

        <security:intercept-url pattern="/${web.auth.login_url}" access="ROLE_ANONYMOUS"/>
        <security:intercept-url pattern="/${web.auth.failure_url}" access="ROLE_ANONYMOUS"/>
        <security:intercept-url pattern="/**" access="ROLE_USER" requires-channel='${web.auth.requires.channel}'/>
        <security:form-login login-page='${web.auth.login_url}'

Luke Taylor said:

Should all be fixed in trunk. Please try with a snapshot build.

@spring-issuemaster spring-issuemaster added this to the 3.0.0 RC1 milestone Feb 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment