SEC-1309: Namespace configurations should support Spring EL #1553

Closed
spring-issuemaster opened this Issue Nov 27, 2009 · 2 comments

1 participant

@spring-issuemaster

AngerClown (Migrated from SEC-1309) said:

The security namespace is very useful for default configurations, but I would also like to be able to abstract it a little more and do something like the following:


<intercept-url pattern="#{ systemProperties['image.dir'] + '/**' }" filters="none" />
<intercept-url pattern="#{ systemProperties['css.dir'] + '/**' }" filters="none" />
<intercept-url pattern="#{ systemProperties['js.dir'] + '/**' }" filters="none" />

<intercept-url pattern="#{ '/' + systemProperties['login.page'] }" access="IS_AUTHENTICATED_ANONYMOUSLY" requires-channel="https" />
<form-login login-page="#{ '/' + systemProperties['login.page'] }" />

<port-mappings>
  <port-mapping http=#{ systemProperties['http.port'] }"  https=#{ systemProperties['https.port'] }" /> </port-mappings>

<logout />

In other words, I would like to be able to configure some of this through properties referenced via Spring EL.

Right now this doesn't work at all and I am forced to hand configure the required beans. This is not a major issue since I can get this to work, but long term, it makes maintenance harder since someone has to understand more about the underlying mechanics to be able to create the correct bean definitions.

@spring-issuemaster

AngerClown said:

I realized I can use org.springframework.beans.factory.config.PropertyPlaceholderConfigurer to accomplish what I needed.

However, I am wondering if Spring EL would still be generally useful for the configuration.

@spring-issuemaster

Luke Taylor said:

As far as I can see, the reason EL configuration in URL paths was failing was due to the conversion of the path to lower case. I've removed the code that does this and added some tests.

@spring-issuemaster spring-issuemaster added this to the 3.0.0.RC2 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment