I need to support HTTP and HTTPS in my Spring security file and dynamically switch between them at runtime.
So, I'm trying to create a properties file containing one of any / http / https, but this will not parse the XML configuration.
Spring Security Configuration:
<sec:http entry-point-ref="portalEntryPoint"> <sec:anonymous /> <sec:intercept-url pattern = "/portal" access="IS_AUTHENTICATED_ANONYMOUSLY" requires-channel="${user-security.login.channel}" /> </sec:http>
Property File:
user-security.login.channel=https
I get the following error:
Caused by: org.xml.sax.SAXParseException: cvc-enumeration-valid: Value '${user-security.login.channel}' is not facet-valid with respect to enumeration '[http, https, any]'. It must be a value from the enumeration.
I am using Spring 3 and Spring Security 2. Any ideas?
Xorty source share