浏览代码

SEC-1584: Added namespace support for injecting custom HttpFirewall instance into FilterChainProxy.

Luke Taylor 15 年之前
父节点
当前提交
8e68fa1334

+ 2 - 2
config/convert_schema.sh

@@ -3,9 +3,9 @@
 pushd src/main/resources/org/springframework/security/config/
 pushd src/main/resources/org/springframework/security/config/
 
 
 echo "Converting rnc file to xsd ..."
 echo "Converting rnc file to xsd ..."
-java -jar ~/bin/trang.jar spring-security-3.0.3.rnc spring-security-3.0.3.xsd
+java -jar ~/bin/trang.jar spring-security-3.0.4.rnc spring-security-3.0.4.xsd
 
 
 echo "Applying XSL transformation to xsd ..."
 echo "Applying XSL transformation to xsd ..."
-xsltproc --output spring-security-3.0.3.xsd spring-security.xsl spring-security-3.0.3.xsd
+xsltproc --output spring-security-3.0.4.xsd spring-security.xsl spring-security-3.0.4.xsd
 
 
 popd
 popd

+ 1 - 0
config/src/main/java/org/springframework/security/config/Elements.java

@@ -50,4 +50,5 @@ public abstract class Elements {
     @Deprecated
     @Deprecated
     public static final String FILTER_INVOCATION_DEFINITION_SOURCE = "filter-invocation-definition-source";
     public static final String FILTER_INVOCATION_DEFINITION_SOURCE = "filter-invocation-definition-source";
     public static final String LDAP_PASSWORD_COMPARE = "password-compare";
     public static final String LDAP_PASSWORD_COMPARE = "password-compare";
+    public static final String HTTP_FIREWALL = "http-firewall";
 }
 }

+ 2 - 0
config/src/main/java/org/springframework/security/config/SecurityNamespaceHandler.java

@@ -15,6 +15,7 @@ import org.springframework.security.config.authentication.JdbcUserServiceBeanDef
 import org.springframework.security.config.authentication.UserServiceBeanDefinitionParser;
 import org.springframework.security.config.authentication.UserServiceBeanDefinitionParser;
 import org.springframework.security.config.http.FilterChainMapBeanDefinitionDecorator;
 import org.springframework.security.config.http.FilterChainMapBeanDefinitionDecorator;
 import org.springframework.security.config.http.FilterInvocationSecurityMetadataSourceParser;
 import org.springframework.security.config.http.FilterInvocationSecurityMetadataSourceParser;
+import org.springframework.security.config.http.HttpFirewallBeanDefinitionParser;
 import org.springframework.security.config.http.HttpSecurityBeanDefinitionParser;
 import org.springframework.security.config.http.HttpSecurityBeanDefinitionParser;
 import org.springframework.security.config.ldap.LdapProviderBeanDefinitionParser;
 import org.springframework.security.config.ldap.LdapProviderBeanDefinitionParser;
 import org.springframework.security.config.ldap.LdapServerBeanDefinitionParser;
 import org.springframework.security.config.ldap.LdapServerBeanDefinitionParser;
@@ -119,6 +120,7 @@ public final class SecurityNamespaceHandler implements NamespaceHandler {
         // Only load the web-namespace parsers if the web classes are available
         // Only load the web-namespace parsers if the web classes are available
         if (ClassUtils.isPresent("org.springframework.security.web.FilterChainProxy", getClass().getClassLoader())) {
         if (ClassUtils.isPresent("org.springframework.security.web.FilterChainProxy", getClass().getClassLoader())) {
             parsers.put(Elements.HTTP, new HttpSecurityBeanDefinitionParser());
             parsers.put(Elements.HTTP, new HttpSecurityBeanDefinitionParser());
+            parsers.put(Elements.HTTP_FIREWALL, new HttpFirewallBeanDefinitionParser());
             parsers.put(Elements.FILTER_INVOCATION_DEFINITION_SOURCE, new FilterInvocationSecurityMetadataSourceParser());
             parsers.put(Elements.FILTER_INVOCATION_DEFINITION_SOURCE, new FilterInvocationSecurityMetadataSourceParser());
             parsers.put(Elements.FILTER_SECURITY_METADATA_SOURCE, new FilterInvocationSecurityMetadataSourceParser());
             parsers.put(Elements.FILTER_SECURITY_METADATA_SOURCE, new FilterInvocationSecurityMetadataSourceParser());
             filterChainMapBDD = new FilterChainMapBeanDefinitionDecorator();
             filterChainMapBDD = new FilterChainMapBeanDefinitionDecorator();

+ 39 - 0
config/src/main/java/org/springframework/security/config/http/HttpFirewallBeanDefinitionParser.java

@@ -0,0 +1,39 @@
+package org.springframework.security.config.http;
+
+import org.springframework.beans.BeanMetadataElement;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.config.RuntimeBeanReference;
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.springframework.beans.factory.support.ManagedMap;
+import org.springframework.beans.factory.support.RootBeanDefinition;
+import org.springframework.beans.factory.xml.BeanDefinitionParser;
+import org.springframework.beans.factory.xml.ParserContext;
+import org.springframework.security.config.BeanIds;
+import org.springframework.util.StringUtils;
+import org.w3c.dom.Element;
+
+import java.util.*;
+
+/**
+ * Injects the supplied {@code HttpFirewall} bean reference into the {@code FilterChainProxy}.
+ *
+ * @author Luke Taylor
+ */
+public class HttpFirewallBeanDefinitionParser implements BeanDefinitionParser {
+
+    @Override
+    public BeanDefinition parse(Element element, ParserContext pc) {
+        String ref = element.getAttribute("ref");
+
+        if (!StringUtils.hasText(ref)) {
+            pc.getReaderContext().error("ref attribute is required", pc.extractSource(element));
+        }
+
+        BeanDefinitionBuilder injector = BeanDefinitionBuilder.rootBeanDefinition(HttpFirewallInjectionBeanPostProcessor.class);
+        injector.addConstructorArgValue(ref);
+
+        pc.getReaderContext().registerWithGeneratedName(injector.getBeanDefinition());
+
+        return null;
+    }
+}

+ 40 - 0
config/src/main/java/org/springframework/security/config/http/HttpFirewallInjectionBeanPostProcessor.java

@@ -0,0 +1,40 @@
+package org.springframework.security.config.http;
+
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.BeanFactoryAware;
+import org.springframework.beans.factory.config.BeanPostProcessor;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.security.config.BeanIds;
+import org.springframework.security.web.FilterChainProxy;
+import org.springframework.security.web.firewall.HttpFirewall;
+
+/**
+ * @author Luke Taylor
+ */
+public class HttpFirewallInjectionBeanPostProcessor implements BeanPostProcessor, BeanFactoryAware {
+    private ConfigurableListableBeanFactory beanFactory;
+    private String ref;
+
+    public HttpFirewallInjectionBeanPostProcessor(String ref) {
+        this.ref = ref;
+    }
+
+    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
+        if (BeanIds.FILTER_CHAIN_PROXY.equals(beanName)) {
+            HttpFirewall fw = (HttpFirewall) beanFactory.getBean(ref);
+            ((FilterChainProxy)bean).setFirewall(fw);
+        }
+
+        return bean;
+    }
+
+    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
+        return bean;
+    }
+
+
+    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
+        this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
+    }
+}

+ 2 - 1
config/src/main/resources/META-INF/spring.schemas

@@ -1,5 +1,6 @@
-http\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-3.0.3.xsd
+http\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-3.0.4.xsd
 http\://www.springframework.org/schema/security/spring-security-3.0.xsd=org/springframework/security/config/spring-security-3.0.xsd
 http\://www.springframework.org/schema/security/spring-security-3.0.xsd=org/springframework/security/config/spring-security-3.0.xsd
+http\://www.springframework.org/schema/security/spring-security-3.0.4.xsd=org/springframework/security/config/spring-security-3.0.4.xsd
 http\://www.springframework.org/schema/security/spring-security-3.0.3.xsd=org/springframework/security/config/spring-security-3.0.3.xsd
 http\://www.springframework.org/schema/security/spring-security-3.0.3.xsd=org/springframework/security/config/spring-security-3.0.3.xsd
 http\://www.springframework.org/schema/security/spring-security-2.0.xsd=org/springframework/security/config/spring-security-2.0.xsd
 http\://www.springframework.org/schema/security/spring-security-2.0.xsd=org/springframework/security/config/spring-security-2.0.xsd
 http\://www.springframework.org/schema/security/spring-security-2.0.1.xsd=org/springframework/security/config/spring-security-2.0.1.xsd
 http\://www.springframework.org/schema/security/spring-security-2.0.1.xsd=org/springframework/security/config/spring-security-2.0.1.xsd

+ 16 - 15
config/src/main/resources/org/springframework/security/config/spring-security-3.0.3.rnc → config/src/main/resources/org/springframework/security/config/spring-security-3.0.4.rnc

@@ -187,7 +187,7 @@ protect.attlist &=
 
 
 global-method-security =
 global-method-security =
     ## Provides method security for all beans registered in the Spring application context. Specifically, beans will be scanned for matches with the ordered list of "protect-pointcut" sub-elements, Spring Security annotations and/or. Where there is a match, the beans will automatically be proxied and security authorization applied to the methods accordingly. If you use and enable all four sources of method security metadata (ie "protect-pointcut" declarations, expression annotations, @Secured and also JSR250 security annotations), the metadata sources will be queried in that order. In practical terms, this enables you to use XML to override method security metadata expressed in annotations. If using annotations, the order of precedence is EL-based (@PreAuthorize etc.), @Secured and finally JSR-250.
     ## Provides method security for all beans registered in the Spring application context. Specifically, beans will be scanned for matches with the ordered list of "protect-pointcut" sub-elements, Spring Security annotations and/or. Where there is a match, the beans will automatically be proxied and security authorization applied to the methods accordingly. If you use and enable all four sources of method security metadata (ie "protect-pointcut" declarations, expression annotations, @Secured and also JSR250 security annotations), the metadata sources will be queried in that order. In practical terms, this enables you to use XML to override method security metadata expressed in annotations. If using annotations, the order of precedence is EL-based (@PreAuthorize etc.), @Secured and finally JSR-250.
-	element global-method-security {global-method-security.attlist, (pre-post-annotation-handling | expression-handler)?, protect-pointcut*, after-invocation-provider*}
+    element global-method-security {global-method-security.attlist, (pre-post-annotation-handling | expression-handler)?, protect-pointcut*, after-invocation-provider*}
 global-method-security.attlist &=
 global-method-security.attlist &=
     ## Specifies whether the use of Spring Security's pre and post invocation annotations (@PreFilter, @PreAuthorize, @PostFilter, @PostAuthorize) should be enabled for this application context. Defaults to "disabled".
     ## Specifies whether the use of Spring Security's pre and post invocation annotations (@PreFilter, @PreAuthorize, @PostFilter, @PostAuthorize) should be enabled for this application context. Defaults to "disabled".
     attribute pre-post-annotations {"disabled" | "enabled" }?
     attribute pre-post-annotations {"disabled" | "enabled" }?
@@ -245,6 +245,9 @@ protect-pointcut.attlist &=
     ## Access configuration attributes list that applies to all methods matching the pointcut, e.g. "ROLE_A,ROLE_B"
     ## Access configuration attributes list that applies to all methods matching the pointcut, e.g. "ROLE_A,ROLE_B"
     attribute access {xsd:token}
     attribute access {xsd:token}
 
 
+http-firewall =
+    ## Allows a custom instance of HttpFirewall to be injected into the FilterChainProxy created by the namespace.
+    element http-firewall {ref}
 
 
 http =
 http =
     ## Container element for HTTP security configuration
     ## Container element for HTTP security configuration
@@ -319,16 +322,16 @@ intercept-url.attlist &=
     attribute requires-channel {xsd:token}?
     attribute requires-channel {xsd:token}?
 
 
 logout =
 logout =
-	## Incorporates a logout processing filter. Most web applications require a logout filter, although you may not require one if you write a controller to provider similar logic.
+    ## Incorporates a logout processing filter. Most web applications require a logout filter, although you may not require one if you write a controller to provider similar logic.
     element logout {logout.attlist, empty}
     element logout {logout.attlist, empty}
 logout.attlist &=
 logout.attlist &=
-	## Specifies the URL that will cause a logout. Spring Security will initialize a filter that responds to this particular URL. Defaults to /j_spring_security_logout if unspecified.
+    ## Specifies the URL that will cause a logout. Spring Security will initialize a filter that responds to this particular URL. Defaults to /j_spring_security_logout if unspecified.
     attribute logout-url {xsd:token}?
     attribute logout-url {xsd:token}?
 logout.attlist &=
 logout.attlist &=
-	## Specifies the URL to display once the user has logged out. If not specified, defaults to /.
+    ## Specifies the URL to display once the user has logged out. If not specified, defaults to /.
     attribute logout-success-url {xsd:token}?
     attribute logout-success-url {xsd:token}?
 logout.attlist &=
 logout.attlist &=
-	## Specifies whether a logout also causes HttpSession invalidation, which is generally desirable. If unspecified, defaults to true.
+    ## Specifies whether a logout also causes HttpSession invalidation, which is generally desirable. If unspecified, defaults to true.
     attribute invalidate-session {boolean}?
     attribute invalidate-session {boolean}?
 logout.attlist &=
 logout.attlist &=
     ## A reference to a LogoutSuccessHandler implementation which will be used to determine the destination to which the user is taken after logging out.
     ## A reference to a LogoutSuccessHandler implementation which will be used to determine the destination to which the user is taken after logging out.
@@ -565,29 +568,29 @@ properties-file =
     attribute properties {xsd:token}?
     attribute properties {xsd:token}?
 
 
 user =
 user =
-	  ## Represents a user in the application.
+      ## Represents a user in the application.
     element user {user.attlist, empty}
     element user {user.attlist, empty}
 user.attlist &=
 user.attlist &=
-	  ## The username assigned to the user.
+      ## The username assigned to the user.
     attribute name {xsd:token}
     attribute name {xsd:token}
 user.attlist &=
 user.attlist &=
-	  ## The password assigned to the user. This may be hashed if the corresponding authentication provider supports hashing (remember to set the "hash" attribute of the "user-service" element). This attribute be omitted in the case where the data will not be used for authentication, but only for accessing authorities. If omitted, the namespace will generate a random value, preventing its accidental use for authentication. Cannot be empty.
+      ## The password assigned to the user. This may be hashed if the corresponding authentication provider supports hashing (remember to set the "hash" attribute of the "user-service" element). This attribute be omitted in the case where the data will not be used for authentication, but only for accessing authorities. If omitted, the namespace will generate a random value, preventing its accidental use for authentication. Cannot be empty.
     attribute password {xsd:string}?
     attribute password {xsd:string}?
 user.attlist &=
 user.attlist &=
-	  ## One of more authorities granted to the user. Separate authorities with a comma (but no space). For example, "ROLE_USER,ROLE_ADMINISTRATOR"
+      ## One of more authorities granted to the user. Separate authorities with a comma (but no space). For example, "ROLE_USER,ROLE_ADMINISTRATOR"
     attribute authorities {xsd:token}
     attribute authorities {xsd:token}
 user.attlist &=
 user.attlist &=
-	  ## Can be set to "true" to mark an account as locked and unusable.
+      ## Can be set to "true" to mark an account as locked and unusable.
     attribute locked {boolean}?
     attribute locked {boolean}?
 user.attlist &=
 user.attlist &=
-	  ## Can be set to "true" to mark an account as disabled and unusable.
+      ## Can be set to "true" to mark an account as disabled and unusable.
     attribute disabled {boolean}?
     attribute disabled {boolean}?
 
 
 jdbc-user-service =
 jdbc-user-service =
-	  ## Causes creation of a JDBC-based UserDetailsService.
+      ## Causes creation of a JDBC-based UserDetailsService.
     element jdbc-user-service {id? & jdbc-user-service.attlist}
     element jdbc-user-service {id? & jdbc-user-service.attlist}
 jdbc-user-service.attlist &=
 jdbc-user-service.attlist &=
-	  ## The bean ID of the DataSource which provides the required tables.
+      ## The bean ID of the DataSource which provides the required tables.
     attribute data-source-ref {xsd:token}
     attribute data-source-ref {xsd:token}
 jdbc-user-service.attlist &=
 jdbc-user-service.attlist &=
     cache-ref?
     cache-ref?
@@ -628,5 +631,3 @@ position =
 
 
 
 
 named-security-filter = "FIRST" | "CHANNEL_FILTER" | "CONCURRENT_SESSION_FILTER" | "SECURITY_CONTEXT_FILTER" | "LOGOUT_FILTER" | "X509_FILTER" | "PRE_AUTH_FILTER" | "CAS_FILTER" | "FORM_LOGIN_FILTER" | "OPENID_FILTER" |"BASIC_AUTH_FILTER" | "SERVLET_API_SUPPORT_FILTER" | "REMEMBER_ME_FILTER" | "ANONYMOUS_FILTER" | "EXCEPTION_TRANSLATION_FILTER" | "SESSION_MANAGEMENT_FILTER" | "FILTER_SECURITY_INTERCEPTOR" | "SWITCH_USER_FILTER" | "LAST"
 named-security-filter = "FIRST" | "CHANNEL_FILTER" | "CONCURRENT_SESSION_FILTER" | "SECURITY_CONTEXT_FILTER" | "LOGOUT_FILTER" | "X509_FILTER" | "PRE_AUTH_FILTER" | "CAS_FILTER" | "FORM_LOGIN_FILTER" | "OPENID_FILTER" |"BASIC_AUTH_FILTER" | "SERVLET_API_SUPPORT_FILTER" | "REMEMBER_ME_FILTER" | "ANONYMOUS_FILTER" | "EXCEPTION_TRANSLATION_FILTER" | "SESSION_MANAGEMENT_FILTER" | "FILTER_SECURITY_INTERCEPTOR" | "SWITCH_USER_FILTER" | "LAST"
-
-

+ 1386 - 0
config/src/main/resources/org/springframework/security/config/spring-security-3.0.4.xsd

@@ -0,0 +1,1386 @@
+<?xml version="1.0"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:security="http://www.springframework.org/schema/security" elementFormDefault="qualified" targetNamespace="http://www.springframework.org/schema/security">
+  <xs:attributeGroup name="hash">
+    <xs:attribute name="hash" use="required">
+      <xs:annotation>
+        <xs:documentation>Defines the hashing algorithm used on user passwords. We recommend strongly against using MD4, as it is a very weak hashing algorithm.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="plaintext"/>
+          <xs:enumeration value="sha"/>
+          <xs:enumeration value="sha-256"/>
+          <xs:enumeration value="md5"/>
+          <xs:enumeration value="md4"/>
+          <xs:enumeration value="{sha}"/>
+          <xs:enumeration value="{ssha}"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="base64">
+    <xs:attribute name="base64" use="required">
+      <xs:annotation>
+        <xs:documentation>Whether a string should be base64 encoded</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="true"/>
+          <xs:enumeration value="false"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="path-type">
+    <xs:attribute name="path-type" use="required">
+      <xs:annotation>
+        <xs:documentation>Defines the type of pattern used to specify URL paths (either JDK 1.4-compatible regular expressions, or Apache Ant expressions). Defaults to "ant" if unspecified.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="ant"/>
+          <xs:enumeration value="regex"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="port">
+    <xs:attribute name="port" use="required" type="xs:positiveInteger">
+      <xs:annotation>
+        <xs:documentation>Specifies an IP port number. Used to configure an embedded LDAP server, for example.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="url">
+    <xs:attribute name="url" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Specifies a URL.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="id">
+    <xs:attribute name="id" use="required" type="xs:ID">
+      <xs:annotation>
+        <xs:documentation>A bean identifier, used for referring to the bean elsewhere in the context.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="ref">
+    <xs:attribute name="ref" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Defines a reference to a Spring bean Id.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="cache-ref">
+    <xs:attribute name="cache-ref" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Defines a reference to a cache for use with a UserDetailsService.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="user-service-ref">
+    <xs:attribute name="user-service-ref" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A reference to a user-service (or UserDetailsService bean) Id</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="data-source-ref">
+    <xs:attribute name="data-source-ref" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A reference to a DataSource bean</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="password-encoder.attlist">
+    <xs:attribute name="ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Defines a reference to a Spring bean Id.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="hash">
+      <xs:annotation>
+        <xs:documentation>Defines the hashing algorithm used on user passwords. We recommend strongly against using MD4, as it is a very weak hashing algorithm.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="plaintext"/>
+          <xs:enumeration value="sha"/>
+          <xs:enumeration value="sha-256"/>
+          <xs:enumeration value="md5"/>
+          <xs:enumeration value="md4"/>
+          <xs:enumeration value="{sha}"/>
+          <xs:enumeration value="{ssha}"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="base64">
+      <xs:annotation>
+        <xs:documentation>Whether a string should be base64 encoded</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="true"/>
+          <xs:enumeration value="false"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="user-property">
+    <xs:attribute name="user-property" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A property of the UserDetails object which will be used as salt by a password encoder. Typically something like "username" might be used.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="system-wide">
+    <xs:attribute name="system-wide" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A single value that will be used as the salt for a password encoder.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:simpleType name="boolean">
+    <xs:restriction base="xs:token">
+      <xs:enumeration value="true"/>
+      <xs:enumeration value="false"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:attributeGroup name="role-prefix">
+    <xs:attribute name="role-prefix" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A non-empty string prefix that will be added to role strings loaded from persistent storage (e.g. "ROLE_"). Use the value "none" for no prefix in cases where the default is non-empty.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="use-expressions">
+    <xs:attribute name="use-expressions" use="required" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Enables the use of expressions in the 'access' attributes in &lt;intercept-url&gt; elements rather than the traditional list of configuration attributes. Defaults to 'false'. If enabled, each attribute should contain a single boolean expression. If the expression evaluates to 'true', access will be granted.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="ldap-server"><xs:annotation>
+      <xs:documentation>Defines an LDAP server location or starts an embedded server. The url indicates the location of a remote server. If no url is given, an embedded server will be started, listening on the supplied port number. The port is optional and defaults to 33389. A Spring LDAP ContextSource bean will be registered for the server with the id supplied.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:ldap-server.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="ldap-server.attlist">
+    <xs:attribute name="id" type="xs:ID">
+      <xs:annotation>
+        <xs:documentation>A bean identifier, used for referring to the bean elsewhere in the context.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="url" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Specifies a URL.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="port" type="xs:positiveInteger">
+      <xs:annotation>
+        <xs:documentation>Specifies an IP port number. Used to configure an embedded LDAP server, for example.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="manager-dn" type="xs:string">
+      <xs:annotation>
+        <xs:documentation>Username (DN) of the "manager" user identity which will be used to authenticate to a (non-embedded) LDAP server. If omitted, anonymous access will be used.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="manager-password" type="xs:string">
+      <xs:annotation>
+        <xs:documentation>The password for the manager DN.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="ldif" type="xs:string">
+      <xs:annotation>
+        <xs:documentation>Explicitly specifies an ldif file resource to load into an embedded LDAP server</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="root" type="xs:string">
+      <xs:annotation>
+        <xs:documentation>Optional root suffix for the embedded LDAP server. Default is "dc=springframework,dc=org"</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="ldap-server-ref-attribute">
+    <xs:attribute name="server-ref" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The optional server to use. If omitted, and a default LDAP server is registered (using &lt;ldap-server&gt; with no Id), that server will be used.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="group-search-filter-attribute">
+    <xs:attribute name="group-search-filter" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Group search filter. Defaults to (uniqueMember={0}). The substituted parameter is the DN of the user.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="group-search-base-attribute">
+    <xs:attribute name="group-search-base" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Search base for group membership searches. Defaults to "" (searching from the root).</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="user-search-filter-attribute">
+    <xs:attribute name="user-search-filter" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The LDAP filter used to search for users (optional). For example "(uid={0})". The substituted parameter is the user's login name.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="user-search-base-attribute">
+    <xs:attribute name="user-search-base" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Search base for user searches. Defaults to "". Only used with a 'user-search-filter'.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="group-role-attribute-attribute">
+    <xs:attribute name="group-role-attribute" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The LDAP attribute name which contains the role name which will be used within Spring Security. Defaults to "cn".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="user-details-class-attribute">
+    <xs:attribute name="user-details-class" use="required">
+      <xs:annotation>
+        <xs:documentation>Allows the objectClass of the user entry to be specified. If set, the framework will attempt to load standard attributes for the defined class into the returned UserDetails object</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="person"/>
+          <xs:enumeration value="inetOrgPerson"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="user-context-mapper-attribute">
+    <xs:attribute name="user-context-mapper-ref" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Allows explicit customization of the loaded user object by specifying a UserDetailsContextMapper bean which will be called with the context information from the user's directory entry</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="ldap-user-service" substitutionGroup="security:any-user-service"><xs:complexType>
+      <xs:attributeGroup ref="security:ldap-us.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="ldap-us.attlist">
+    <xs:attribute name="id" type="xs:ID">
+      <xs:annotation>
+        <xs:documentation>A bean identifier, used for referring to the bean elsewhere in the context.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="server-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The optional server to use. If omitted, and a default LDAP server is registered (using &lt;ldap-server&gt; with no Id), that server will be used.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="user-search-filter" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The LDAP filter used to search for users (optional). For example "(uid={0})". The substituted parameter is the user's login name.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="user-search-base" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Search base for user searches. Defaults to "". Only used with a 'user-search-filter'.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="group-search-filter" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Group search filter. Defaults to (uniqueMember={0}). The substituted parameter is the DN of the user.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="group-search-base" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Search base for group membership searches. Defaults to "" (searching from the root).</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="group-role-attribute" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The LDAP attribute name which contains the role name which will be used within Spring Security. Defaults to "cn".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="cache-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Defines a reference to a cache for use with a UserDetailsService.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="role-prefix" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A non-empty string prefix that will be added to role strings loaded from persistent storage (e.g. "ROLE_"). Use the value "none" for no prefix in cases where the default is non-empty.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="user-details-class">
+      <xs:annotation>
+        <xs:documentation>Allows the objectClass of the user entry to be specified. If set, the framework will attempt to load standard attributes for the defined class into the returned UserDetails object</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="person"/>
+          <xs:enumeration value="inetOrgPerson"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="user-context-mapper-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Allows explicit customization of the loaded user object by specifying a UserDetailsContextMapper bean which will be called with the context information from the user's directory entry</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="ldap-ap.attlist">
+    <xs:attribute name="server-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The optional server to use. If omitted, and a default LDAP server is registered (using &lt;ldap-server&gt; with no Id), that server will be used.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="user-search-base" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Search base for user searches. Defaults to "". Only used with a 'user-search-filter'.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="user-search-filter" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The LDAP filter used to search for users (optional). For example "(uid={0})". The substituted parameter is the user's login name.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="group-search-base" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Search base for group membership searches. Defaults to "" (searching from the root).</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="group-search-filter" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Group search filter. Defaults to (uniqueMember={0}). The substituted parameter is the DN of the user.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="group-role-attribute" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The LDAP attribute name which contains the role name which will be used within Spring Security. Defaults to "cn".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="user-dn-pattern" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A specific pattern used to build the user's DN, for example "uid={0},ou=people". The key "{0}" must be present and will be substituted with the username.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="role-prefix" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A non-empty string prefix that will be added to role strings loaded from persistent storage (e.g. "ROLE_"). Use the value "none" for no prefix in cases where the default is non-empty.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="user-details-class">
+      <xs:annotation>
+        <xs:documentation>Allows the objectClass of the user entry to be specified. If set, the framework will attempt to load standard attributes for the defined class into the returned UserDetails object</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="person"/>
+          <xs:enumeration value="inetOrgPerson"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="user-context-mapper-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Allows explicit customization of the loaded user object by specifying a UserDetailsContextMapper bean which will be called with the context information from the user's directory entry</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="password-compare.attlist">
+    <xs:attribute name="password-attribute" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The attribute in the directory which contains the user password. Defaults to "userPassword".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="hash">
+      <xs:annotation>
+        <xs:documentation>Defines the hashing algorithm used on user passwords. We recommend strongly against using MD4, as it is a very weak hashing algorithm.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="plaintext"/>
+          <xs:enumeration value="sha"/>
+          <xs:enumeration value="sha-256"/>
+          <xs:enumeration value="md5"/>
+          <xs:enumeration value="md4"/>
+          <xs:enumeration value="{sha}"/>
+          <xs:enumeration value="{ssha}"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="intercept-methods"><xs:annotation>
+      <xs:documentation>Can be used inside a bean definition to add a security interceptor to the bean and set up access configuration attributes for the bean's methods</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" name="protect"><xs:annotation>
+      <xs:documentation>Defines a protected method and the access control configuration attributes that apply to it. We strongly advise you NOT to mix "protect" declarations with any services provided "global-method-security".</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:protect.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:intercept-methods.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="intercept-methods.attlist">
+    <xs:attribute name="access-decision-manager-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Optional AccessDecisionManager bean ID to be used by the created method security interceptor.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="protect.attlist">
+    <xs:attribute name="method" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A method name</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="access" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Access configuration attributes list that applies to the method, e.g. "ROLE_A,ROLE_B".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="global-method-security"><xs:annotation>
+      <xs:documentation>Provides method security for all beans registered in the Spring application context. Specifically, beans will be scanned for matches with the ordered list of "protect-pointcut" sub-elements, Spring Security annotations and/or. Where there is a match, the beans will automatically be proxied and security authorization applied to the methods accordingly. If you use and enable all four sources of method security metadata (ie "protect-pointcut" declarations, expression annotations, @Secured and also JSR250 security annotations), the metadata sources will be queried in that order. In practical terms, this enables you to use XML to override method security metadata expressed in annotations. If using annotations, the order of precedence is EL-based (@PreAuthorize etc.), @Secured and finally JSR-250.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:choice minOccurs="0">
+          <xs:element name="pre-post-annotation-handling"><xs:annotation>
+      <xs:documentation>Allows the default expression-based mechanism for handling Spring Security's pre and post invocation annotations (@PreFilter, @PreAuthorize, @PostFilter, @PostAuthorize) to be replace entirely. Only applies if these annotations are enabled.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element name="invocation-attribute-factory"><xs:annotation>
+      <xs:documentation>Defines the PrePostInvocationAttributeFactory instance which is used to generate pre and post invocation metadata from the annotated methods.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:ref"/>
+    </xs:complexType></xs:element>
+        <xs:element name="pre-invocation-advice"><xs:complexType>
+      <xs:attributeGroup ref="security:ref"/>
+    </xs:complexType></xs:element>
+        <xs:element name="post-invocation-advice"><xs:complexType>
+      <xs:attributeGroup ref="security:ref"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+    </xs:complexType></xs:element>
+          <xs:element name="expression-handler"><xs:annotation>
+      <xs:documentation>Defines the SecurityExpressionHandler instance which will be used if expression-based access-control is enabled. A default implementation (with no ACL support) will be used if not supplied.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:ref"/>
+    </xs:complexType></xs:element>
+        </xs:choice>
+        <xs:element minOccurs="0" maxOccurs="unbounded" name="protect-pointcut"><xs:annotation>
+      <xs:documentation>Defines a protected pointcut and the access control configuration attributes that apply to it. Every bean registered in the Spring application context that provides a method that matches the pointcut will receive security authorization.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:protect-pointcut.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element minOccurs="0" maxOccurs="unbounded" name="after-invocation-provider"><xs:annotation>
+      <xs:documentation>Allows addition of extra AfterInvocationProvider beans which should be called by the MethodSecurityInterceptor created by global-method-security.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:ref"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:global-method-security.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="global-method-security.attlist">
+    <xs:attribute name="pre-post-annotations">
+      <xs:annotation>
+        <xs:documentation>Specifies whether the use of Spring Security's pre and post invocation annotations (@PreFilter, @PreAuthorize, @PostFilter, @PostAuthorize) should be enabled for this application context. Defaults to "disabled".</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="disabled"/>
+          <xs:enumeration value="enabled"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="secured-annotations">
+      <xs:annotation>
+        <xs:documentation>Specifies whether the use of Spring Security's @Secured annotations should be enabled for this application context. Defaults to "disabled".</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="disabled"/>
+          <xs:enumeration value="enabled"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="jsr250-annotations">
+      <xs:annotation>
+        <xs:documentation>Specifies whether JSR-250 style attributes are to be used (for example "RolesAllowed"). This will require the javax.annotation.security classes on the classpath. Defaults to "disabled".</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="disabled"/>
+          <xs:enumeration value="enabled"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="access-decision-manager-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Optional AccessDecisionManager bean ID to override the default used for method security.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="run-as-manager-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Optional RunAsmanager implementation which will be used by the configured MethodSecurityInterceptor</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="order" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Allows the advice "order" to be set for the method security interceptor.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="proxy-target-class" type="security:boolean"/>
+    <xs:attribute name="mode">
+      <xs:annotation>
+        <xs:documentation>Can be used to specify that AspectJ should be used instead of the default Spring AOP. If set, secured classes must be woven with the AnnotationSecurityAspect from the spring-security-aspects module.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="aspectj"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+
+
+
+
+
+
+  <xs:attributeGroup name="protect-pointcut.attlist">
+    <xs:attribute name="expression" use="required" type="xs:string">
+      <xs:annotation>
+        <xs:documentation>An AspectJ expression, including the 'execution' keyword. For example, 'execution(int com.foo.TargetObject.countLength(String))' (without the quotes).</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="access" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Access configuration attributes list that applies to all methods matching the pointcut, e.g. "ROLE_A,ROLE_B"</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="http-firewall"><xs:annotation>
+      <xs:documentation>Allows a custom instance of HttpFirewall to be injected into the FilterChainProxy created by the namespace.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:ref"/>
+    </xs:complexType></xs:element>
+  <xs:element name="http"><xs:annotation>
+      <xs:documentation>Container element for HTTP security configuration</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="intercept-url"><xs:annotation>
+      <xs:documentation>Specifies the access attributes and/or filter list for a particular set of URLs.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:intercept-url.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="access-denied-handler"><xs:annotation>
+      <xs:documentation>Defines the access-denied strategy that should be used. An access denied page can be defined or a reference to an AccessDeniedHandler instance.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:access-denied-handler.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="form-login"><xs:annotation>
+      <xs:documentation>Sets up a form login configuration for authentication with a username and password</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:form-login.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="openid-login"><xs:annotation>
+      <xs:documentation>Sets up form login for authentication with an Open ID identity</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" ref="security:attribute-exchange"/>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:form-login.attlist"/>
+      <xs:attribute name="user-service-ref" type="xs:token">
+        <xs:annotation>
+          <xs:documentation>A reference to a user-service (or UserDetailsService bean) Id</xs:documentation>
+        </xs:annotation>
+      </xs:attribute>
+    </xs:complexType></xs:element>
+        <xs:element name="x509"><xs:annotation>
+      <xs:documentation>Adds support for X.509 client authentication.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:x509.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="http-basic"><xs:annotation>
+      <xs:documentation>Adds support for basic authentication (this is an element to permit future expansion, such as supporting an "ignoreFailure" attribute)</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:http-basic.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="logout"><xs:annotation>
+      <xs:documentation>Incorporates a logout processing filter. Most web applications require a logout filter, although you may not require one if you write a controller to provider similar logic.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:logout.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="session-management"><xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" name="concurrency-control"><xs:annotation>
+      <xs:documentation>Enables concurrent session control, limiting the number of authenticated sessions a user may have at the same time.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:concurrency-control.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:session-management.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="remember-me"><xs:annotation>
+      <xs:documentation>Sets up remember-me authentication. If used with the "key" attribute (or no attributes) the cookie-only implementation will be used. Specifying "token-repository-ref" or "remember-me-data-source-ref" will use the more secure, persisten token approach.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:remember-me.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="anonymous"><xs:annotation>
+      <xs:documentation>Adds support for automatically granting all anonymous web requests a particular principal identity and a corresponding granted authority.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:anonymous.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="port-mappings"><xs:annotation>
+      <xs:documentation>Defines the list of mappings between http and https ports for use in redirects</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" name="port-mapping"><xs:complexType>
+      <xs:attributeGroup ref="security:http-port"/>
+      <xs:attributeGroup ref="security:https-port"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+    </xs:complexType></xs:element>
+        <xs:element ref="security:custom-filter"/>
+        <xs:element ref="security:request-cache"/>
+      </xs:choice>
+      <xs:attributeGroup ref="security:http.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="http.attlist">
+    <xs:attribute name="auto-config" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Automatically registers a login form, BASIC authentication, anonymous authentication, logout services, remember-me and servlet-api-integration. If set to "true", all of these capabilities are added (although you can still customize the configuration of each by providing the respective element). If unspecified, defaults to "false".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="use-expressions" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Enables the use of expressions in the 'access' attributes in &lt;intercept-url&gt; elements rather than the traditional list of configuration attributes. Defaults to 'false'. If enabled, each attribute should contain a single boolean expression. If the expression evaluates to 'true', access will be granted.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="create-session">
+      <xs:annotation>
+        <xs:documentation>Controls the eagerness with which an HTTP session is created. If not set, defaults to "ifRequired". Note that if a custom SecurityContextRepository is set using security-context-repository-ref, then the only value which can be set is "always". Otherwise the session creation behaviour will be determined by the repository bean implementation.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="ifRequired"/>
+          <xs:enumeration value="always"/>
+          <xs:enumeration value="never"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="security-context-repository-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A reference to a SecurityContextRepository bean. This can be used to customize how the SecurityContext is stored between requests.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="path-type">
+      <xs:annotation>
+        <xs:documentation>Defines the type of pattern used to specify URL paths (either JDK 1.4-compatible regular expressions, or Apache Ant expressions). Defaults to "ant" if unspecified.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="ant"/>
+          <xs:enumeration value="regex"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="lowercase-comparisons" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Whether test URLs should be converted to lower case prior to comparing with defined path patterns. If unspecified, defaults to "true".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="servlet-api-provision" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Provides versions of HttpServletRequest security methods such as isUserInRole() and getPrincipal() which are implemented by accessing the Spring SecurityContext. Defaults to "true".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="access-decision-manager-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Optional attribute specifying the ID of the AccessDecisionManager implementation which should be used for authorizing HTTP requests.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="realm" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Optional attribute specifying the realm name that will be used for all authentication features that require a realm name (eg BASIC and Digest authentication). If unspecified, defaults to "Spring Security Application".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="entry-point-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Allows a customized AuthenticationEntryPoint to be set on the ExceptionTranslationFilter.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="once-per-request" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Corresponds to the observeOncePerRequest property of FilterSecurityInterceptor. Defaults to "true"</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="access-denied-page" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Deprecated in favour of the access-denied-handler element.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="disable-url-rewriting" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation/>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="access-denied-handler.attlist">
+    <xs:attribute name="ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Defines a reference to a Spring bean Id.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="error-page" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The access denied page that an authenticated user will be redirected to if they request a page which they don't have the authority to access.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="access-denied-handler-page">
+    <xs:attribute name="error-page" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The access denied page that an authenticated user will be redirected to if they request a page which they don't have the authority to access.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="intercept-url.attlist">
+    <xs:attribute name="pattern" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The pattern which defines the URL path. The content will depend on the type set in the containing http element, so will default to ant path syntax.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="access" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The access configuration attributes that apply for the configured path.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="method">
+      <xs:annotation>
+        <xs:documentation>The HTTP Method for which the access configuration attributes should apply. If not specified, the attributes will apply to any method.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="GET"/>
+          <xs:enumeration value="DELETE"/>
+          <xs:enumeration value="HEAD"/>
+          <xs:enumeration value="OPTIONS"/>
+          <xs:enumeration value="POST"/>
+          <xs:enumeration value="PUT"/>
+          <xs:enumeration value="TRACE"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="filters">
+      <xs:annotation>
+        <xs:documentation>The filter list for the path. Currently can be set to "none" to remove a path from having any filters applied. The full filter stack (consisting of all filters created by the namespace configuration, and any added using 'custom-filter'), will be applied to any other paths.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="none"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="requires-channel" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Used to specify that a URL must be accessed over http or https, or that there is no preference. The value should be "http", "https" or "any", respectively.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="logout.attlist">
+    <xs:attribute name="logout-url" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Specifies the URL that will cause a logout. Spring Security will initialize a filter that responds to this particular URL. Defaults to /j_spring_security_logout if unspecified.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="logout-success-url" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Specifies the URL to display once the user has logged out. If not specified, defaults to /.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="invalidate-session" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Specifies whether a logout also causes HttpSession invalidation, which is generally desirable. If unspecified, defaults to true.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="success-handler-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A reference to a LogoutSuccessHandler implementation which will be used to determine the destination to which the user is taken after logging out.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="request-cache"><xs:annotation>
+      <xs:documentation>Allow the RequestCache used for saving requests during the login process to be set</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:ref"/>
+    </xs:complexType></xs:element>
+
+  <xs:attributeGroup name="form-login.attlist">
+    <xs:attribute name="login-processing-url" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The URL that the login form is posted to. If unspecified, it defaults to /j_spring_security_check.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="default-target-url" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The URL that will be redirected to after successful authentication, if the user's previous action could not be resumed. This generally happens if the user visits a login page without having first requested a secured operation that triggers authentication. If unspecified, defaults to the root of the application.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="always-use-default-target" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Whether the user should always be redirected to the default-target-url after login.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="login-page" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The URL for the login page. If no login URL is specified, Spring Security will automatically create a login URL at /spring_security_login and a corresponding filter to render that login URL when requested.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="authentication-failure-url" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The URL for the login failure page. If no login failure URL is specified, Spring Security will automatically create a failure login URL at /spring_security_login?login_error and a corresponding filter to render that login failure URL when requested.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="authentication-success-handler-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Reference to an AuthenticationSuccessHandler bean which should be used to handle a successful authentication request. Should not be used in combination with default-target-url (or always-use-default-target-url) as the implementation should always deal with navigation to the subsequent destination</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="authentication-failure-handler-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Reference to an AuthenticationFailureHandler bean which should be used to handle a failed authentication request. Should not be used in combination with authentication-failure-url as the implementation should always deal with navigation to the subsequent destination</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:element name="attribute-exchange"><xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" ref="security:openid-attribute"/>
+      </xs:sequence>
+    </xs:complexType></xs:element>
+  <xs:element name="openid-attribute"><xs:complexType>
+      <xs:attributeGroup ref="security:openid-attribute.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="openid-attribute.attlist">
+    <xs:attribute name="name" use="required" type="xs:token"/>
+    <xs:attribute name="type" use="required" type="xs:token"/>
+    <xs:attribute name="required" type="security:boolean"/>
+    <xs:attribute name="count" type="xs:int"/>
+  </xs:attributeGroup>
+  <xs:element name="filter-chain-map"><xs:annotation>
+      <xs:documentation>Used to explicitly configure a FilterChainProxy instance with a FilterChainMap</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" name="filter-chain"><xs:annotation>
+      <xs:documentation>Used within filter-chain-map to define a specific URL pattern and the list of filters which apply to the URLs matching that pattern. When multiple filter-chain elements are used within a filter-chain-map element, the most specific patterns must be placed at the top of the list, with  most general ones at the bottom.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:filter-chain.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:filter-chain-map.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="filter-chain-map.attlist">
+    <xs:attributeGroup ref="security:path-type"/>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="filter-chain.attlist">
+    <xs:attribute name="pattern" use="required" type="xs:token"/>
+    <xs:attribute name="filters" use="required" type="xs:token"/>
+  </xs:attributeGroup>
+  <xs:element name="filter-security-metadata-source"><xs:annotation>
+      <xs:documentation>Used to explicitly configure a FilterSecurityMetadataSource bean for use with a FilterSecurityInterceptor. Usually only needed if you are configuring a FilterChainProxy explicitly, rather than using the &lt;http&gt; element. The intercept-url elements used should only contain pattern, method and access attributes. Any others will result in a configuration error.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" name="intercept-url"><xs:annotation>
+      <xs:documentation>Specifies the access attributes and/or filter list for a particular set of URLs.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:intercept-url.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:fsmds.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="fsmds.attlist">
+    <xs:attribute name="use-expressions" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Enables the use of expressions in the 'access' attributes in &lt;intercept-url&gt; elements rather than the traditional list of configuration attributes. Defaults to 'false'. If enabled, each attribute should contain a single boolean expression. If the expression evaluates to 'true', access will be granted.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="id" type="xs:ID">
+      <xs:annotation>
+        <xs:documentation>A bean identifier, used for referring to the bean elsewhere in the context.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="lowercase-comparisons" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>as for http element</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="path-type">
+      <xs:annotation>
+        <xs:documentation>Defines the type of pattern used to specify URL paths (either JDK 1.4-compatible regular expressions, or Apache Ant expressions). Defaults to "ant" if unspecified.</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="ant"/>
+          <xs:enumeration value="regex"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="filter-invocation-definition-source"><xs:annotation>
+      <xs:documentation>Deprecated synonym for filter-security-metadata-source</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" name="intercept-url"><xs:annotation>
+      <xs:documentation>Specifies the access attributes and/or filter list for a particular set of URLs.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:intercept-url.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:fsmds.attlist"/>
+    </xs:complexType></xs:element>
+
+  <xs:attributeGroup name="http-basic.attlist">
+    <xs:attribute name="entry-point-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Sets the AuthenticationEntryPoint which is used by the BasicAuthenticationFilter.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="session-management.attlist">
+    <xs:attribute name="session-fixation-protection">
+      <xs:annotation>
+        <xs:documentation>Indicates whether an existing session should be invalidated when a user authenticates and a new session started. If set to "none" no change will be made. "newSession" will create a new empty session. "migrateSession" will create a new session and copy the session attributes to the new session. Defaults to "migrateSession".</xs:documentation>
+      </xs:annotation>
+      <xs:simpleType>
+        <xs:restriction base="xs:token">
+          <xs:enumeration value="none"/>
+          <xs:enumeration value="newSession"/>
+          <xs:enumeration value="migrateSession"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="invalid-session-url" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The URL to which a user will be redirected if they submit an invalid session indentifier. Typically used to detect session timeouts.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="session-authentication-strategy-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Allows injection of the SessionAuthenticationStrategy instance used by the SessionManagementFilter</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="session-authentication-error-url" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Defines the URL of the error page which should be shown when the SessionAuthenticationStrategy raises an exception. If not set, an unauthorized (402) error code will be returned to the client. Note that this attribute doesn't apply if the error occurs during a form-based login, where the URL for authentication failure will take precedence.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="concurrency-control.attlist">
+    <xs:attribute name="max-sessions" type="xs:positiveInteger">
+      <xs:annotation>
+        <xs:documentation>The maximum number of sessions a single authenticated user can have open at the same time. Defaults to "1".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="expired-url" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The URL a user will be redirected to if they attempt to use a session which has been "expired" because they have logged in again.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="error-if-maximum-exceeded" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Specifies that an unauthorized error should be reported when a user attempts to login when they already have the maximum configured sessions open. The default behaviour is to expire the original session. If the session-authentication-error-url attribute is set on the session-management URL, the user will be redirected to this URL.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="session-registry-alias" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Allows you to define an alias for the SessionRegistry bean in order to access it in your own configuration.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="session-registry-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Allows you to define an external SessionRegistry bean to be used by the concurrency control setup.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="remember-me.attlist">
+    <xs:attribute name="key" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The "key" used to identify cookies from a specific token-based remember-me application. You should set this to a unique value for your application.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="token-repository-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Reference to a PersistentTokenRepository bean for use with the persistent token remember-me implementation.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="data-source-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A reference to a DataSource bean</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attributeGroup ref="security:remember-me-services-ref"/>
+    <xs:attribute name="user-service-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A reference to a user-service (or UserDetailsService bean) Id</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="services-alias" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Exports the internally defined RememberMeServices as a bean alias, allowing it to be used by other beans in the application context.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="use-secure-cookie" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Determines whether the "secure" flag will be set on the remember-me cookie. If set to true, the cookie will only be submitted over HTTPS. Defaults to false.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="token-validity-seconds" type="xs:integer">
+      <xs:annotation>
+        <xs:documentation>The period (in seconds) for which the remember-me cookie should be valid.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="token-repository-ref">
+    <xs:attribute name="token-repository-ref" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Reference to a PersistentTokenRepository bean for use with the persistent token remember-me implementation.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="remember-me-services-ref">
+    <xs:attribute name="services-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Allows a custom implementation of RememberMeServices to be used. Note that this implementation should return RememberMeAuthenticationToken instances with the same "key" value as specified in the remember-me element. Alternatively it should register its own AuthenticationProvider.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="remember-me-data-source-ref">
+    <xs:attributeGroup ref="security:data-source-ref"/>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="anonymous.attlist">
+    <xs:attribute name="key" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The key shared between the provider and filter. This generally does not need to be set. If unset, it will default to "doesNotMatter".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="username" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The username that should be assigned to the anonymous request. This allows the principal to be identified, which may be important for logging and auditing. if unset, defaults to "anonymousUser".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="granted-authority" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The granted authority that should be assigned to the anonymous request. Commonly this is used to assign the anonymous request particular roles, which can subsequently be used in authorization decisions. If unset, defaults to "ROLE_ANONYMOUS".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="enabled" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>With the default namespace setup, the anonymous "authentication" facility is automatically enabled. You can disable it using this property.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+
+  <xs:attributeGroup name="http-port">
+    <xs:attribute name="http" use="required" type="xs:token"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="https-port">
+    <xs:attribute name="https" use="required" type="xs:token"/>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="x509.attlist">
+    <xs:attribute name="subject-principal-regex" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The regular expression used to obtain the username from the certificate's subject. Defaults to matching on the common name using the pattern "CN=(.*?),".</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="user-service-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A reference to a user-service (or UserDetailsService bean) Id</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="authentication-manager"><xs:annotation>
+      <xs:documentation>Registers the AuthenticationManager instance and allows its list of AuthenticationProviders to be defined. Also allows you to define an alias to allow you to reference the AuthenticationManager in your own beans.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="authentication-provider"><xs:annotation>
+      <xs:documentation>Indicates that the contained user-service should be used as an authentication source.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="security:any-user-service"/>
+        <xs:element name="password-encoder"><xs:annotation>
+      <xs:documentation>element which defines a password encoding strategy. Used by an authentication provider to convert submitted passwords to hashed versions, for example.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" name="salt-source"><xs:annotation>
+      <xs:documentation>Password salting strategy. A system-wide constant or a property from the UserDetails object can be used.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attribute name="user-property" type="xs:token">
+        <xs:annotation>
+          <xs:documentation>A property of the UserDetails object which will be used as salt by a password encoder. Typically something like "username" might be used.</xs:documentation>
+        </xs:annotation>
+      </xs:attribute>
+      <xs:attribute name="system-wide" type="xs:token">
+        <xs:annotation>
+          <xs:documentation>A single value that will be used as the salt for a password encoder.</xs:documentation>
+        </xs:annotation>
+      </xs:attribute>
+      <xs:attribute name="ref" type="xs:token">
+        <xs:annotation>
+          <xs:documentation>Defines a reference to a Spring bean Id.</xs:documentation>
+        </xs:annotation>
+      </xs:attribute>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:password-encoder.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:choice>
+      <xs:attributeGroup ref="security:ap.attlist"/>
+    </xs:complexType></xs:element>
+        <xs:element name="ldap-authentication-provider"><xs:annotation>
+      <xs:documentation>Sets up an ldap authentication provider</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" name="password-compare"><xs:annotation>
+      <xs:documentation>Specifies that an LDAP provider should use an LDAP compare operation of the user's password to authenticate the user</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" name="password-encoder"><xs:annotation>
+      <xs:documentation>element which defines a password encoding strategy. Used by an authentication provider to convert submitted passwords to hashed versions, for example.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" name="salt-source"><xs:annotation>
+      <xs:documentation>Password salting strategy. A system-wide constant or a property from the UserDetails object can be used.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attribute name="user-property" type="xs:token">
+        <xs:annotation>
+          <xs:documentation>A property of the UserDetails object which will be used as salt by a password encoder. Typically something like "username" might be used.</xs:documentation>
+        </xs:annotation>
+      </xs:attribute>
+      <xs:attribute name="system-wide" type="xs:token">
+        <xs:annotation>
+          <xs:documentation>A single value that will be used as the salt for a password encoder.</xs:documentation>
+        </xs:annotation>
+      </xs:attribute>
+      <xs:attribute name="ref" type="xs:token">
+        <xs:annotation>
+          <xs:documentation>Defines a reference to a Spring bean Id.</xs:documentation>
+        </xs:annotation>
+      </xs:attribute>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:password-encoder.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:password-compare.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attributeGroup ref="security:ldap-ap.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:choice>
+      <xs:attributeGroup ref="security:authman.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="authman.attlist">
+    <xs:attribute name="alias" type="xs:ID">
+      <xs:annotation>
+        <xs:documentation>The alias you wish to use for the AuthenticationManager bean</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="erase-credentials" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>If set to true, the AuthenticationManger will attempt to clear any credentials data in the returned Authentication object, once the user has been authenticated. Defaults to false.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="ap.attlist">
+    <xs:attribute name="ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Defines a reference to a Spring bean Id.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="user-service-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A reference to a user-service (or UserDetailsService bean) Id</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="user-service" substitutionGroup="security:any-user-service"><xs:annotation>
+      <xs:documentation>Creates an in-memory UserDetailsService from a properties file or a list of "user" child elements.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" maxOccurs="unbounded" name="user"><xs:annotation>
+      <xs:documentation>Represents a user in the application.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:user.attlist"/>
+    </xs:complexType></xs:element>
+      </xs:sequence>
+      <xs:attribute name="id" type="xs:ID">
+        <xs:annotation>
+          <xs:documentation>A bean identifier, used for referring to the bean elsewhere in the context.</xs:documentation>
+        </xs:annotation>
+      </xs:attribute>
+      <xs:attributeGroup ref="security:properties-file"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="properties-file">
+    <xs:attribute name="properties" type="xs:token"/>
+  </xs:attributeGroup>
+
+  <xs:attributeGroup name="user.attlist">
+    <xs:attribute name="name" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The username assigned to the user.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="password" type="xs:string">
+      <xs:annotation>
+        <xs:documentation>The password assigned to the user. This may be hashed if the corresponding authentication provider supports hashing (remember to set the "hash" attribute of the "user-service" element). This attribute be omitted in the case where the data will not be used for authentication, but only for accessing authorities. If omitted, the namespace will generate a random value, preventing its accidental use for authentication. Cannot be empty.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="authorities" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>One of more authorities granted to the user. Separate authorities with a comma (but no space). For example, "ROLE_USER,ROLE_ADMINISTRATOR"</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="locked" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Can be set to "true" to mark an account as locked and unusable.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="disabled" type="security:boolean">
+      <xs:annotation>
+        <xs:documentation>Can be set to "true" to mark an account as disabled and unusable.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="jdbc-user-service" substitutionGroup="security:any-user-service"><xs:annotation>
+      <xs:documentation>Causes creation of a JDBC-based UserDetailsService.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attribute name="id" type="xs:ID">
+        <xs:annotation>
+          <xs:documentation>A bean identifier, used for referring to the bean elsewhere in the context.</xs:documentation>
+        </xs:annotation>
+      </xs:attribute>
+      <xs:attributeGroup ref="security:jdbc-user-service.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="jdbc-user-service.attlist">
+    <xs:attribute name="data-source-ref" use="required" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>The bean ID of the DataSource which provides the required tables.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="cache-ref" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>Defines a reference to a cache for use with a UserDetailsService.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="users-by-username-query" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>An SQL statement to query a username, password, and enabled status given a username</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="authorities-by-username-query" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>An SQL statement to query for a user's granted authorities given a username.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="group-authorities-by-username-query" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>An SQL statement to query user's group authorities given a username.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="role-prefix" type="xs:token">
+      <xs:annotation>
+        <xs:documentation>A non-empty string prefix that will be added to role strings loaded from persistent storage (e.g. "ROLE_"). Use the value "none" for no prefix in cases where the default is non-empty.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:element name="any-user-service" abstract="true"/>
+  <xs:element name="custom-filter"><xs:annotation>
+      <xs:documentation>Used to indicate that a filter bean declaration should be incorporated into the security filter chain.</xs:documentation>
+    </xs:annotation><xs:complexType>
+      <xs:attributeGroup ref="security:custom-filter.attlist"/>
+    </xs:complexType></xs:element>
+  <xs:attributeGroup name="custom-filter.attlist">
+    <xs:attributeGroup ref="security:ref"/>
+    <xs:attribute name="after" type="security:named-security-filter">
+      <xs:annotation>
+        <xs:documentation>The filter immediately after which the custom-filter should be placed in the chain. This feature will only be needed by advanced users who wish to mix their own filters into the security filter chain and have some knowledge of the standard Spring Security filters. The filter names map to specific Spring Security implementation filters.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="before" type="security:named-security-filter">
+      <xs:annotation>
+        <xs:documentation>The filter immediately before which the custom-filter should be placed in the chain</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="position" type="security:named-security-filter">
+      <xs:annotation>
+        <xs:documentation>The explicit position at which the custom-filter should be placed in the chain. Use if you are replacing a standard filter.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="after">
+    <xs:attribute name="after" use="required" type="security:named-security-filter">
+      <xs:annotation>
+        <xs:documentation>The filter immediately after which the custom-filter should be placed in the chain. This feature will only be needed by advanced users who wish to mix their own filters into the security filter chain and have some knowledge of the standard Spring Security filters. The filter names map to specific Spring Security implementation filters.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="before">
+    <xs:attribute name="before" use="required" type="security:named-security-filter">
+      <xs:annotation>
+        <xs:documentation>The filter immediately before which the custom-filter should be placed in the chain</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="position">
+    <xs:attribute name="position" use="required" type="security:named-security-filter">
+      <xs:annotation>
+        <xs:documentation>The explicit position at which the custom-filter should be placed in the chain. Use if you are replacing a standard filter.</xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:attributeGroup>
+  <xs:simpleType name="named-security-filter">
+    <xs:restriction base="xs:token">
+      <xs:enumeration value="FIRST"/>
+      <xs:enumeration value="CHANNEL_FILTER"/>
+      <xs:enumeration value="CONCURRENT_SESSION_FILTER"/>
+      <xs:enumeration value="SECURITY_CONTEXT_FILTER"/>
+      <xs:enumeration value="LOGOUT_FILTER"/>
+      <xs:enumeration value="X509_FILTER"/>
+      <xs:enumeration value="PRE_AUTH_FILTER"/>
+      <xs:enumeration value="CAS_FILTER"/>
+      <xs:enumeration value="FORM_LOGIN_FILTER"/>
+      <xs:enumeration value="OPENID_FILTER"/>
+      <xs:enumeration value="BASIC_AUTH_FILTER"/>
+      <xs:enumeration value="SERVLET_API_SUPPORT_FILTER"/>
+      <xs:enumeration value="REMEMBER_ME_FILTER"/>
+      <xs:enumeration value="ANONYMOUS_FILTER"/>
+      <xs:enumeration value="EXCEPTION_TRANSLATION_FILTER"/>
+      <xs:enumeration value="SESSION_MANAGEMENT_FILTER"/>
+      <xs:enumeration value="FILTER_SECURITY_INTERCEPTOR"/>
+      <xs:enumeration value="SWITCH_USER_FILTER"/>
+      <xs:enumeration value="LAST"/>
+    </xs:restriction>
+  </xs:simpleType>
+</xs:schema>

+ 13 - 0
config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java

@@ -80,6 +80,7 @@ import org.springframework.security.web.authentication.www.BasicAuthenticationFi
 import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
 import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
 import org.springframework.security.web.context.SaveContextOnUpdateOrErrorResponseWrapper;
 import org.springframework.security.web.context.SaveContextOnUpdateOrErrorResponseWrapper;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
+import org.springframework.security.web.firewall.DefaultHttpFirewall;
 import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
 import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
 import org.springframework.security.web.savedrequest.RequestCacheAwareFilter;
 import org.springframework.security.web.savedrequest.RequestCacheAwareFilter;
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
@@ -1251,6 +1252,18 @@ public class HttpSecurityBeanDefinitionParserTests {
         fcp.doFilter(request, new MockHttpServletResponse(), new MockFilterChain());
         fcp.doFilter(request, new MockHttpServletResponse(), new MockFilterChain());
     }
     }
 
 
+    @Test
+    public void httpFirewallInjectionIsSupported() throws Exception {
+        setContext(
+                "<http-firewall ref='fw'/>" +
+                "<http>" +
+                "   <form-login />" +
+                "</http>" +
+                "<b:bean id='fw' class='" + DefaultHttpFirewall.class.getName() +"'/>" +
+                AUTH_PROVIDER_XML);
+        FilterChainProxy fcp = (FilterChainProxy) appContext.getBean(BeanIds.FILTER_CHAIN_PROXY);
+        assertSame(appContext.getBean("fw"), FieldUtils.getFieldValue(fcp, "firewall"));
+    }
 
 
     private void setContext(String context) {
     private void setContext(String context) {
         appContext = new InMemoryXmlApplicationContext(context);
         appContext = new InMemoryXmlApplicationContext(context);

+ 2 - 2
config/src/test/java/org/springframework/security/config/util/InMemoryXmlApplicationContext.java

@@ -22,11 +22,11 @@ public class InMemoryXmlApplicationContext extends AbstractXmlApplicationContext
     Resource inMemoryXml;
     Resource inMemoryXml;
 
 
     public InMemoryXmlApplicationContext(String xml) {
     public InMemoryXmlApplicationContext(String xml) {
-        this(xml, "3.0.3", null);
+        this(xml, "3.0.4", null);
     }
     }
 
 
     public InMemoryXmlApplicationContext(String xml, ApplicationContext parent) {
     public InMemoryXmlApplicationContext(String xml, ApplicationContext parent) {
-        this(xml, "3.0.3", parent);
+        this(xml, "3.0.4", parent);
     }
     }
 
 
     public InMemoryXmlApplicationContext(String xml, String secVersion, ApplicationContext parent) {
     public InMemoryXmlApplicationContext(String xml, String secVersion, ApplicationContext parent) {

+ 742 - 621
docs/manual/src/docbook/appendix-namespace.xml

@@ -1,638 +1,759 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <appendix version="5.0" xml:id="appendix-namespace" xmlns="http://docbook.org/ns/docbook"
 <appendix version="5.0" xml:id="appendix-namespace" xmlns="http://docbook.org/ns/docbook"
-  xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
-  <info>
-    <title>The Security Namespace</title>
-  </info>
-  <para> This appendix provides a reference to the elements available in the security namespace and
-    information on the underlying beans they create (a knowledge of the individual classes and how
-    they work together is assumed - you can find more information in the project Javadoc and
-    elsewhere in this document). If you haven't used the namespace before, please read the <link
-      xlink:href="#ns-config">introductory chapter</link> on namespace configuration, as this is
-    intended as a supplement to the information there. Using a good quality XML editor while editing
-    a configuration based on the schema is recommended as this will provide contextual information
-    on which elements and attributes are available as well as comments explaining their purpose. The
-    namespace is written in <link xlink:href="http://www.relaxng.org/">RELAX NG</link> Compact
-    format and later converted into an XSD schema. If you are familiar with this format, you may
-    wish to examine the <link
-      xlink:href="https://fisheye.springsource.org/browse/~raw,r=9a2d0c2cb55ede1b41bbcc3dd752e9a70363b14d/spring-security/config/src/main/resources/org/springframework/security/config/spring-security-3.0.3.rnc"
-      >schema file</link> directly.</para>
-  <section xml:id="nsa-http">
-    <title>Web Application Security - the <literal>&lt;http&gt;</literal> Element</title>
-    <para> The <literal>&lt;http&gt;</literal> element encapsulates the security configuration for
-      the web layer of your application. It creates a <classname>FilterChainProxy</classname> bean
-      named "springSecurityFilterChain" which maintains the stack of security filters which make up
-      the web security configuration <footnote>
-        <para>See the <link xlink:href="#ns-web-xml"> introductory chapter</link> for how to set up
-          the mapping from your <literal>web.xml</literal></para>
-      </footnote>. Some core filters are always created and others will be added to the stack
-      depending on the attributes child elements which are present. The positions of the standard
-      filters are fixed (see <link xlink:href="#filter-stack">the filter order table</link> in the
-      namespace introduction), removing a common source of errors with previous versions of the
-      framework when users had to configure the filter chain explicitly in
-        the<classname>FilterChainProxy</classname> bean. You can, of course, still do this if you
-      need full control of the configuration. </para>
-    <para> All filters which require a reference to the
-        <interfacename>AuthenticationManager</interfacename> will be automatically injected with the
-      internal instance created by the namespace configuration (see the <link
-        xlink:href="#ns-auth-manager"> introductory chapter</link> for more on the
-        <interfacename>AuthenticationManager</interfacename>). </para>
-    <para> The <literal>&lt;http&gt;</literal> namespace block always creates an
-        <classname>HttpSessionContextIntegrationFilter</classname>, an
-        <classname>ExceptionTranslationFilter</classname> and a
-        <classname>FilterSecurityInterceptor</classname>. These are fixed and cannot be replaced
-      with alternatives. </para>
-    <section xml:id="nsa-http-attributes">
-      <title><literal>&lt;http&gt;</literal> Attributes</title>
-      <para> The attributes on the <literal>&lt;http&gt;</literal> element control some of the
-        properties on the core filters. </para>
-      <section xml:id="nsa-servlet-api-provision">
-        <title><literal>servlet-api-provision</literal></title>
-        <para> Provides versions of <literal>HttpServletRequest</literal> security methods such as
-            <literal>isUserInRole()</literal> and <literal>getPrincipal()</literal> which are
-          implemented by adding a <classname>SecurityContextHolderAwareRequestFilter</classname>
-          bean to the stack. Defaults to "true". </para>
-      </section>
-      <section xml:id="nsa-path-type">
-        <title><literal>path-type</literal></title>
-        <para> Controls whether URL patterns are interpreted as ant paths (the default) or regular
-          expressions. In practice this sets a particular <interfacename>UrlMatcher</interfacename>
-          instance on the <classname>FilterChainProxy</classname>. </para>
-      </section>
-      <section xml:id="nsa-lowercase-comparisons">
-        <title><literal>lowercase-comparisons</literal></title>
-        <para> Whether test URLs should be converted to lower case prior to comparing with defined
-          path patterns. If unspecified, defaults to "true" </para>
-      </section>
-      <section xml:id="nsa-realm">
-        <title><literal>realm</literal></title>
-        <para> Sets the realm name used for basic authentication (if enabled). Corresponds to the
-            <literal>realmName</literal> property on
-            <classname>BasicAuthenticationEntryPoint</classname>. </para>
-      </section>
-      <section xml:id="nsa-entry-point-ref">
-        <title><literal>entry-point-ref</literal></title>
-        <para> Normally the <interfacename>AuthenticationEntryPoint</interfacename> used will be set
-          depending on which authentication mechanisms have been configured. This attribute allows
-          this behaviour to be overridden by defining a customized
-            <interfacename>AuthenticationEntryPoint</interfacename> bean which will start the
-          authentication process. </para>
-      </section>
-      <section xml:id="nsa-access-decision-manager-ref">
-        <title><literal>access-decision-manager-ref</literal></title>
-        <para> Optional attribute specifying the ID of the
-            <interfacename>AccessDecisionManager</interfacename> implementation which should be used
-          for authorizing HTTP requests. By default an <classname>AffirmativeBased</classname>
-          implementation is used for with a <classname>RoleVoter</classname> and an
-            <classname>AuthenticatedVoter</classname>. </para>
-      </section>
-      <section xml:id="nsa-access-denied-page">
-        <title><literal>access-denied-page</literal></title>
-        <para> Deprecated in favour of the <literal>access-denied-handler</literal> child element.
-        </para>
-      </section>
-      <section xml:id="nsa-once-per-request">
-        <title><literal>once-per-request</literal></title>
-        <para> Corresponds to the <literal>observeOncePerRequest</literal> property of
-            <classname>FilterSecurityInterceptor</classname>. Defaults to "true". </para>
-      </section>
-      <section xml:id="create-session">
-        <title><literal>create-session</literal></title>
-        <para> Controls the eagerness with which an HTTP session is created. If not set, defaults to
-          "ifRequired". Other options are "always" and "never". The setting of this attribute affect
-          the <literal>allowSessionCreation</literal> and
-            <literal>forceEagerSessionCreation</literal> properties of
-            <classname>HttpSessionContextIntegrationFilter</classname>.
-            <literal>allowSessionCreation</literal> will always be true unless this attribute is set
-          to "never". <literal>forceEagerSessionCreation</literal> is "false" unless it is set to
-          "always". So the default configuration allows session creation but does not force it. The
-          exception is if concurrent session control is enabled, when
-            <literal>forceEagerSessionCreation</literal> will be set to true, regardless of what the
-          setting is here. Using "never" would then cause an exception during the initialization of
-            <classname>HttpSessionContextIntegrationFilter</classname>. </para>
-      </section>
-    </section>
-    <section xml:id="nsa-access-denied-handler">
-      <title><literal>&lt;access-denied-handler></literal></title>
-      <para> This element allows you to set the <literal>errorPage</literal> property for the
-        default <interfacename>AccessDeniedHandler</interfacename> used by the
-          <classname>ExceptionTranslationFilter</classname>, (using the
-          <literal>error-page</literal> attribute, or to supply your own implementation using the
-          <literal>ref</literal> attribute. This is discussed in more detail in the section on <link
-          xlink:href="#access-denied-handler">the
-          <classname>ExceptionTranslationFilter</classname></link>.</para>
-    </section>
-    <section>
-      <title>The <literal>&lt;intercept-url&gt;</literal> Element</title>
-      <para> This element is used to define the set of URL patterns that the application is
-        interested in and to configure how they should be handled. It is used to construct the
-          <interfacename>FilterInvocationSecurityMetadataSource</interfacename> used by the
-          <classname>FilterSecurityInterceptor</classname> and to exclude particular patterns from
-        the filter chain entirely (by setting the attribute <literal>filters="none"</literal>). It
-        is also responsible for configuring a <classname>ChannelAuthenticationFilter</classname> if
-        particular URLs need to be accessed by HTTPS, for example. When matching the specified
-        patterns against an incoming request, the matching is done in the order in which the
-        elements are declared. So the most specific matches patterns should come first and the most
-        general should come last.</para>
-      <section xml:id="nsa-pattern">
-        <title><literal>pattern</literal></title>
-        <para> The pattern which defines the URL path. The content will depend on the
-            <literal>path-type</literal> attribute from the containing http element, so will default
-          to ant path syntax. </para>
-      </section>
-      <section xml:id="nsa-method">
-        <title><literal>method</literal></title>
-        <para> The HTTP Method which will be used in combination with the pattern to match an
-          incoming request. If omitted, any method will match. If an identical pattern is specified
-          with and without a method, the method-specific match will take precedence.</para>
-      </section>
-      <section xml:id="nsa-access">
-        <title><literal>access</literal></title>
-        <para> Lists the access attributes which will be stored in the
-            <interfacename>FilterInvocationSecurityMetadataSource</interfacename> for the defined URL
-          pattern/method combination. This should be a comma-separated list of the security
-          configuration attributes (such as role names). </para>
-      </section>
-      <section xml:id="nsa-requires-channel">
-        <title><literal>requires-channel</literal></title>
-        <para> Can be <quote>http</quote> or <quote>https</quote> depending on whether a particular
-          URL pattern should be accessed over HTTP or HTTPS respectively. Alternatively the value
-            <quote>any</quote> can be used when there is no preference. If this attribute is present
-          on any <literal>&lt;intercept-url&gt;</literal> element, then a
-            <classname>ChannelAuthenticationFilter</classname> will be added to the filter stack and
-          its additional dependencies added to the application
-          context.<!--See the chapter on <link
+    xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
+    <info>
+        <title>The Security Namespace</title>
+    </info>
+    <para> This appendix provides a reference to the elements available in the security namespace
+        and information on the underlying beans they create (a knowledge of the individual classes
+        and how they work together is assumed - you can find more information in the project Javadoc
+        and elsewhere in this document). If you haven't used the namespace before, please read the
+        <link xlink:href="#ns-config">introductory chapter</link> on namespace configuration, as
+        this is intended as a supplement to the information there. Using a good quality XML editor
+        while editing a configuration based on the schema is recommended as this will provide
+        contextual information on which elements and attributes are available as well as comments
+        explaining their purpose. The namespace is written in <link
+        xlink:href="http://www.relaxng.org/">RELAX NG</link> Compact format and later converted into
+        an XSD schema. If you are familiar with this format, you may wish to examine the <link
+        xlink:href="https://fisheye.springsource.org/browse/spring-security/config/src/main/resources/org/springframework/security/config/spring-security-3.1.rnc"
+        >schema file</link> directly.</para>
+    <section xml:id="nsa-http">
+        <title>Web Application Security - the <literal>&lt;http&gt;</literal> Element</title>
+        <para> If you use an <literal>&lt;http&gt;</literal> element within your application, a
+            <classname>FilterChainProxy</classname> bean named "springSecurityFilterChain" is
+            created and the configuration within the element is used to build a filter chain within
+            <classname>FilterChainProxy</classname>. As of Spring Security 3.1, additional
+            <literal>http</literal> elements can be used to add extra filter chains <footnote>
+            <para>See the <link xlink:href="#ns-web-xml"> introductory chapter</link> for how to set
+                up the mapping from your <literal>web.xml</literal></para>
+            </footnote>. Some core filters are always created in a filter chain and others will be
+            added to the stack depending on the attributes and child elements which are present. The
+            positions of the standard filters are fixed (see <link xlink:href="#filter-stack">the
+            filter order table</link> in the namespace introduction), removing a common source of
+            errors with previous versions of the framework when users had to configure the filter
+            chain explicitly in the<classname>FilterChainProxy</classname> bean. You can, of course,
+            still do this if you need full control of the configuration. </para>
+        <para> All filters which require a reference to the
+            <interfacename>AuthenticationManager</interfacename> will be automatically injected with
+            the internal instance created by the namespace configuration (see the <link
+            xlink:href="#ns-auth-manager"> introductory chapter</link> for more on the
+            <interfacename>AuthenticationManager</interfacename>). </para>
+        <para> Each <literal>&lt;http&gt;</literal> namespace block always creates an
+            <classname>SecurityContextPersistenceFilter</classname>, an
+            <classname>ExceptionTranslationFilter</classname> and a
+            <classname>FilterSecurityInterceptor</classname>. These are fixed and cannot be replaced
+            with alternatives. </para>
+        <section xml:id="nsa-http-attributes">
+            <title><literal>&lt;http&gt;</literal> Attributes</title>
+            <para> The attributes on the <literal>&lt;http&gt;</literal> element control some of the
+                properties on the core filters. </para>
+            <section xml:id="nsa-http-pattern">
+                <title><literal>pattern</literal></title>
+                <para>Defining a pattern for the <literal>http</literal> element controls the
+                    requests which will be filtered through the list of filters which it defines.
+                    The interpretation is dependent on the configured <link
+                    xlink:href="#nsa-path-type">request-matcher</link>. If no pattern is defined,
+                    all requests will be matched, so the most specific patterns should be declared
+                    first. </para>
+            </section>
+            <section xml:id="nsa-http-secured">
+                <title><literal>security</literal></title>
+                <para>A request pattern can be mapped to an empty filter chain, by setting this
+                    attribute to <literal>none</literal>. No security will be applied and none of
+                    Spring Security's features will be available. </para>
+            </section>
+            <section xml:id="nsa-servlet-api-provision">
+                <title><literal>servlet-api-provision</literal></title>
+                <para> Provides versions of <literal>HttpServletRequest</literal> security methods
+                    such as <literal>isUserInRole()</literal> and <literal>getPrincipal()</literal>
+                    which are implemented by adding a
+                    <classname>SecurityContextHolderAwareRequestFilter</classname> bean to the
+                    stack. Defaults to "true".</para>
+            </section>
+            <section xml:id="nsa-jaas-api-provision">
+                <title><literal>jaas-api-provision</literal></title>
+                <para>If available, runs the request as the <literal>Subject</literal> acquired from
+                    the <classname>JaasAuthenticationToken</classname> which is implemented by
+                    adding a <classname>JaasApiIntegrationFilter</classname> bean to the stack.
+                    Defaults to "false".</para>
+            </section>
+            <section xml:id="nsa-path-type">
+                <title><literal>request-matcher</literal></title>
+                <para> Defines the <interfacename>RequestMatcher</interfacename> strategy used in
+                    the <classname>FilterChainProxy</classname> and the beans created by the
+                    <literal>intercept-url</literal> to match incoming requests. Options are
+                    currently <literal>ant</literal>, <literal>regex</literal> and
+                    <literal>ciRegex</literal>, for ant, regular-expression and case-insensitive
+                    regular-expression repsectively. A separate instance is created for each
+                    <literal>intercept-url</literal> element using its <literal>pattern</literal>
+                    and <literal>method</literal> attributes (see below). Ant paths are matched
+                    using an <classname>AntPathRequestMatcher</classname> and regular expressions
+                    are matched using a <classname>RegexRequestMatcher</classname>. See the Javadoc
+                    for these classes for more details on exactly how the matching is preformed. Ant
+                    paths are the default strategy.</para>
+            </section>
+            <section xml:id="nsa-realm">
+                <title><literal>realm</literal></title>
+                <para> Sets the realm name used for basic authentication (if enabled). Corresponds
+                    to the <literal>realmName</literal> property on
+                    <classname>BasicAuthenticationEntryPoint</classname>. </para>
+            </section>
+            <section xml:id="nsa-entry-point-ref">
+                <title><literal>entry-point-ref</literal></title>
+                <para> Normally the <interfacename>AuthenticationEntryPoint</interfacename> used
+                    will be set depending on which authentication mechanisms have been configured.
+                    This attribute allows this behaviour to be overridden by defining a customized
+                    <interfacename>AuthenticationEntryPoint</interfacename> bean which will start
+                    the authentication process. </para>
+            </section>
+            <section xml:id="nsa-security-context-repo-ref">
+                <title><literal>security-context-repository-ref</literal></title>
+                <para> Allows injection of a custom
+                    <interfacename>SecurityContextRepository</interfacename> into the
+                    <classname>SecurityContextPersistenceFilter</classname>. </para>
+            </section>
+            <section xml:id="nsa-access-decision-manager-ref">
+                <title><literal>access-decision-manager-ref</literal></title>
+                <para> Optional attribute specifying the ID of the
+                    <interfacename>AccessDecisionManager</interfacename> implementation which should
+                    be used for authorizing HTTP requests. By default an
+                    <classname>AffirmativeBased</classname> implementation is used for with a
+                    <classname>RoleVoter</classname> and an
+                    <classname>AuthenticatedVoter</classname>. </para>
+            </section>
+            <section xml:id="nsa-access-denied-page">
+                <title><literal>access-denied-page</literal></title>
+                <para> Deprecated in favour of the <literal>access-denied-handler</literal> child
+                    element. </para>
+            </section>
+            <section xml:id="nsa-once-per-request">
+                <title><literal>once-per-request</literal></title>
+                <para> Corresponds to the <literal>observeOncePerRequest</literal> property of
+                    <classname>FilterSecurityInterceptor</classname>. Defaults to "true". </para>
+            </section>
+            <section xml:id="nsa-create-session">
+                <title><literal>create-session</literal></title>
+                <para> Controls the eagerness with which an HTTP session is created. If not set,
+                    defaults to "ifRequired". Other options are "always" and "never". The setting of
+                    this attribute affect the <literal>allowSessionCreation</literal> and
+                    <literal>forceEagerSessionCreation</literal> properties of
+                    <classname>HttpSessionContextIntegrationFilter</classname>.
+                    <literal>allowSessionCreation</literal> will always be true unless this
+                    attribute is set to "never". <literal>forceEagerSessionCreation</literal> is
+                    "false" unless it is set to "always". So the default configuration allows
+                    session creation but does not force it. The exception is if concurrent session
+                    control is enabled, when <literal>forceEagerSessionCreation</literal> will be
+                    set to true, regardless of what the setting is here. Using "never" would then
+                    cause an exception during the initialization of
+                    <classname>HttpSessionContextIntegrationFilter</classname>. </para>
+            </section>
+            <section xml:id="nsa-use-expressions">
+                <title><literal>use-expressions</literal></title>
+                <para>Enables EL-expressions in the <literal>access</literal> attribute, as
+                    described in the chapter on <link xlink:href="#el-access-web">expression-based
+                    access-control</link>. </para>
+            </section>
+            <section xml:id="nsa-disable-url-rewriting">
+                <title><literal>disable-url-rewriting</literal></title>
+                <para>Prevents session IDs from being appended to URLs in the application. Clients
+                    must use cookies if this attribute is set to <literal>true</literal>. </para>
+            </section>
+        </section>
+        <section xml:id="nsa-access-denied-handler">
+            <title><literal>&lt;access-denied-handler></literal></title>
+            <para> This element allows you to set the <literal>errorPage</literal> property for the
+                default <interfacename>AccessDeniedHandler</interfacename> used by the
+                <classname>ExceptionTranslationFilter</classname>, (using the
+                <literal>error-page</literal> attribute, or to supply your own implementation using
+                the <literal>ref</literal> attribute. This is discussed in more detail in the
+                section on <link xlink:href="#access-denied-handler">the
+                <classname>ExceptionTranslationFilter</classname></link>.</para>
+        </section>
+        <section>
+            <title>The <literal>&lt;intercept-url&gt;</literal> Element</title>
+            <para> This element is used to define the set of URL patterns that the application is
+                interested in and to configure how they should be handled. It is used to construct
+                the <interfacename>FilterInvocationSecurityMetadataSource</interfacename> used by
+                the <classname>FilterSecurityInterceptor</classname>. It is also responsible for
+                configuring a <classname>ChannelAuthenticationFilter</classname> if particular URLs
+                need to be accessed by HTTPS, for example. When matching the specified patterns
+                against an incoming request, the matching is done in the order in which the elements
+                are declared. So the most specific matches patterns should come first and the most
+                general should come last.</para>
+            <section xml:id="nsa-pattern">
+                <title><literal>pattern</literal></title>
+                <para> The pattern which defines the URL path. The content will depend on the
+                    <literal>request-matcher</literal> attribute from the containing http element,
+                    so will default to ant path syntax. </para>
+            </section>
+            <section xml:id="nsa-method">
+                <title><literal>method</literal></title>
+                <para> The HTTP Method which will be used in combination with the pattern to match
+                    an incoming request. If omitted, any method will match. If an identical pattern
+                    is specified with and without a method, the method-specific match will take
+                    precedence.</para>
+            </section>
+            <section xml:id="nsa-access">
+                <title><literal>access</literal></title>
+                <para> Lists the access attributes which will be stored in the
+                    <interfacename>FilterInvocationSecurityMetadataSource</interfacename> for the
+                    defined URL pattern/method combination. This should be a comma-separated list of
+                    the security configuration attributes (such as role names). </para>
+            </section>
+            <section xml:id="nsa-requires-channel">
+                <title><literal>requires-channel</literal></title>
+                <para> Can be <quote>http</quote> or <quote>https</quote> depending on whether a
+                    particular URL pattern should be accessed over HTTP or HTTPS respectively.
+                    Alternatively the value <quote>any</quote> can be used when there is no
+                    preference. If this attribute is present on any
+                    <literal>&lt;intercept-url&gt;</literal> element, then a
+                    <classname>ChannelAuthenticationFilter</classname> will be added to the filter
+                    stack and its additional dependencies added to the application
+                    context.<!--See the chapter on <link
             xlink:href="#channel-security-config">channel security</link> for an example
             xlink:href="#channel-security-config">channel security</link> for an example
           configuration using traditional beans. --></para>
           configuration using traditional beans. --></para>
-        <para> If a <literal>&lt;port-mappings&gt;</literal> configuration is added, this will be
-          used to by the <classname>SecureChannelProcessor</classname> and
-            <classname>InsecureChannelProcessor</classname> beans to determine the ports used for
-          redirecting to HTTP/HTTPS. </para>
-      </section>
-      <section>
-        <title><literal>filters</literal></title>
-        <para>Can only take the value <quote>none</quote>. This will cause any matching request to
-          bypass the Spring Security filter chain entirely. None of the rest of the
-            <literal>&lt;http></literal> configuration will have any effect on the request and there
-          will be no security context available for its duration. Access to secured methods during
-          the request will fail.</para>
-      </section>
-    </section>
-    <section>
-      <title>The <literal>&lt;port-mappings&gt;</literal> Element</title>
-      <para> By default, an instance of <classname>PortMapperImpl</classname> will be added to the
-        configuration for use in redirecting to secure and insecure URLs. This element can
-        optionally be used to override the default mappings which that class defines. Each child
-          <literal>&lt;port-mapping&gt;</literal> element defines a pair of HTTP:HTTPS ports. The
-        default mappings are 80:443 and 8080:8443. An example of overriding these can be found in
-        the <link xlink:href="#ns-requires-channel">namespace introduction</link>. </para>
-    </section>
-    <section xml:id="nsa-form-login">
-      <title>The <literal>&lt;form-login&gt;</literal> Element</title>
-      <para> Used to add an <classname>UsernamePasswordAuthenticationFilter</classname> to the
-        filter stack and an <classname>LoginUrlAuthenticationEntryPoint</classname> to the
-        application context to provide authentication on demand. This will always take precedence
-        over other namespace-created entry points. If no attributes are supplied, a login page will
-        be generated automatically at the URL "/spring-security-login" <footnote>
-          <para>This feature is really just provided for convenience and is not intended for
-            production (where a view technology will have been chosen and can be used to render a
-            customized login page). The class
-              <classname>DefaultLoginPageGeneratingFilter</classname> is responsible for rendering
-            the login page and will provide login forms for both normal form login and/or OpenID if
-            required.</para>
-        </footnote> The behaviour can be customized using the following attributes. </para>
-      <section>
-        <title><literal>login-page</literal></title>
-        <para> The URL that should be used to render the login page. Maps to the
-            <literal>loginFormUrl</literal> property of the
-            <classname>LoginUrlAuthenticationEntryPoint</classname>. Defaults to
-          "/spring-security-login". </para>
-      </section>
-      <section>
-        <title><literal>login-processing-url</literal></title>
-        <para> Maps to the <literal>filterProcessesUrl</literal> property of
-            <classname>UsernamePasswordAuthenticationFilter</classname>. The default value is
-          "/j_spring_security_check". </para>
-      </section>
-      <section>
-        <title><literal>default-target-url</literal></title>
-        <para>Maps to the <literal>defaultTargetUrl</literal> property of
-            <classname>UsernamePasswordAuthenticationFilter</classname>. If not set, the default
-          value is "/" (the application root). A user will be taken to this URL after logging in,
-          provided they were not asked to login while attempting to access a secured resource, when
-          they will be taken to the originally requested URL. </para>
-      </section>
-      <section>
-        <title><literal>always-use-default-target</literal></title>
-        <para> If set to "true", the user will always start at the value given by
-            <literal>default-target-url</literal>, regardless of how they arrived at the login page.
-          Maps to the <literal>alwaysUseDefaultTargetUrl</literal> property of
-            <classname>UsernamePasswordAuthenticationFilter</classname>. Default value is "false".
-        </para>
-      </section>
-      <section>
-        <title><literal>authentication-failure-url</literal></title>
-        <para> Maps to the <literal>authenticationFailureUrl</literal> property of
-            <classname>UsernamePasswordAuthenticationFilter</classname>. Defines the URL the browser
-          will be redirected to on login failure. Defaults to "/spring_security_login?login_error",
-          which will be automatically handled by the automatic login page generator, re-rendering
-          the login page with an error message. </para>
-      </section>
-      <section>
-        <title><literal>authentication-success-handler-ref</literal></title>
-        <para>This can be used as an alternative to <literal>default-target-url</literal> and
-            <literal>always-use-default-target</literal>, giving you full control over the
-          navigation flow after a successful authentication. The value should be he name of an
-            <interfacename>AuthenticationSuccessHandler</interfacename> bean in the application
-          context. </para>
-      </section>
-      <section>
-        <title><literal>authentication-failure-handler-ref</literal></title>
-        <para>Can be used as an alternative to <literal>authentication-failure-url</literal>, giving
-          you full control over the navigation flow after an authentication failure. The value
-          should be he name of an <interfacename>AuthenticationFailureHandler</interfacename> bean
-          in the application context. </para>
-      </section>
-    </section>
-    <section xml:id="nsa-http-basic">
-      <title>The <literal>&lt;http-basic&gt;</literal> Element</title>
-      <para> Adds a <classname>BasicAuthenticationFilter</classname> and
-          <classname>BasicAuthenticationEntryPoint</classname> to the configuration. The latter will
-        only be used as the configuration entry point if form-based login is not enabled. </para>
-    </section>
-    <section xml:id="nsa-remember-me">
-      <title>The <literal>&lt;remember-me&gt;</literal> Element</title>
-      <para> Adds the <classname>RememberMeAuthenticationFilter</classname> to the stack. This in
-        turn will be configured with either a <classname>TokenBasedRememberMeServices</classname>, a
-          <classname>PersistentTokenBasedRememberMeServices</classname> or a user-specified bean
-        implementing <interfacename>RememberMeServices</interfacename> depending on the attribute
-        settings. </para>
-      <section>
-        <title><literal>data-source-ref</literal></title>
-        <para> If this is set, <classname>PersistentTokenBasedRememberMeServices</classname> will be
-          used and configured with a <classname>JdbcTokenRepositoryImpl</classname> instance.
-        </para>
-      </section>
-      <section>
-        <title><literal>token-repository-ref</literal></title>
-        <para> Configures a <classname>PersistentTokenBasedRememberMeServices</classname> but allows
-          the use of a custom <interfacename>PersistentTokenRepository</interfacename> bean. </para>
-      </section>
-      <section>
-        <title><literal>services-ref</literal></title>
-        <para> Allows complete control of the <interfacename>RememberMeServices</interfacename>
-          implementation that will be used by the filter. The value should be the Id of a bean in
-          the application context which implements this interface. </para>
-      </section>
-      <section>
-        <title><literal>token-repository-ref</literal></title>
-        <para> Configures a <classname>PersistentTokenBasedRememberMeServices</classname> but allows
-          the use of a custom <interfacename>PersistentTokenRepository</interfacename> bean. </para>
-      </section>
-      <section>
-        <title>The <literal>key</literal> Attribute</title>
-        <para>Maps to the "key" property of <classname>AbstractRememberMeServices</classname>.
-          Should be set to a unique value to ensure that remember-me cookies are only valid within
-          the one application <footnote>
-            <para>This doesn't affect the use of
-                <classname>PersistentTokenBasedRememberMeServices</classname>, where the tokens are
-              stored on the server side.</para>
-          </footnote>. </para>
-      </section>
-      <section>
-        <title><literal>token-validity-seconds</literal></title>
-        <para> Maps to the <literal>tokenValiditySeconds</literal> property of
-            <classname>AbstractRememberMeServices</classname>. Specifies the period in seconds for
-          which the remember-me cookie should be valid. By default it will be valid for 14 days.
-        </para>
-      </section>
-      <section>
-        <title><literal>user-service-ref</literal></title>
-        <para> The remember-me services implementations require access to a
-            <interfacename>UserDetailsService</interfacename>, so there has to be one defined in the
-          application context. If there is only one, it will be selected and used automatically by
-          the namespace configuration. If there are multiple instances, you can specify a bean Id
-          explicitly using this attribute. </para>
-      </section>
-    </section>
-    <section xml:id="nsa-session-mgmt">
-      <title>The <literal>&lt;session-management&gt;</literal> Element</title>
-      <para>Session-management related functionality is implemented by the addition of a
-          <classname>SessionManagementFilter</classname> to the filter stack.</para>
-      <section xml:id="session-fixation-protection">
-        <title><literal>session-fixation-protection</literal></title>
-        <para> Indicates whether an existing session should be invalidated when a user authenticates
-          and a new session started. If set to "none" no change will be made. "newSession" will
-          create a new empty session. "migrateSession" will create a new session and copy the
-          session attributes to the new session. Defaults to "migrateSession".</para>
-        <para> If session fixation protection is enabled, the
-            <classname>SessionManagementFilter</classname> is inected with a appropriately
-          configured <classname>DefaultSessionAuthenticationStrategy</classname>. See the Javadoc
-          for this class for more details. </para>
-      </section>
-    </section>
-    <section xml:id="nsa-concurrent-session-control">
-      <title>The <literal>&lt;concurrency-control&gt;</literal> Element</title>
-      <para> Adds support for concurrent session control, allowing limits to be placed on the number
-        of active sessions a user can have. A <classname>ConcurrentSessionFilter</classname> will be
-        created, and a <classname>ConcurrentSessionControlStrategy</classname> will be used with the
-          <classname>SessionManagementFilter</classname>. If a <literal>form-login</literal> element
-        has been declared, the strategy object will also be injected into the created authentication
-        filter. An instance of <interfacename>SessionRegistry</interfacename> (a
-          <classname>SessionRegistryImpl</classname> instance unless the user wishes to use a custom
-        bean) will be created for use by the strategy.</para>
-      <section>
-        <title>The <literal>max-sessions</literal> attribute</title>
-        <para>Maps to the <literal>maximumSessions</literal> property of
-            <classname>ConcurrentSessionControlStrategy</classname>.</para>
-      </section>
-      <section>
-        <title>The <literal>expired-url</literal> attribute</title>
-        <para> The URL a user will be redirected to if they attempt to use a session which has been
-          "expired" by the concurrent session controller because the user has exceeded the number of
-          allowed sessions and has logged in again elsewhere. Should be set unless
-            <literal>exception-if-maximum-exceeded</literal> is set. If no value is supplied, an
-          expiry message will just be written directly back to the response. </para>
-      </section>
-      <section>
-        <title>The <literal>error-if-maximum-exceeded</literal> attribute</title>
-        <para>If set to "true" a <exceptionname>SessionAuthenticationException</exceptionname> will
-          be raised when a user attempts to exceed the maximum allowed number of sessions. The
-          default behaviour is to expire the original session. </para>
-      </section>
-      <section>
-        <title>The <literal>session-registry-alias</literal> and
-            <literal>session-registry-ref</literal> attributes</title>
-        <para> The user can supply their own <interfacename>SessionRegistry</interfacename>
-          implementation using the <literal>session-registry-ref</literal> attribute. The other
-          concurrent session control beans will be wired up to use it. </para>
-        <para> It can also be useful to have a reference to the internal session registry for use in
-          your own beans or an admin interface. You can expose the interal bean using the
-            <literal>session-registry-alias</literal> attribute, giving it a name that you can use
-          elsewhere in your configuration. </para>
-      </section>
-    </section>
-    <section xml:id="nsa-anonymous">
-      <title>The <literal>&lt;anonymous&gt;</literal> Element</title>
-      <para> Adds an <classname>AnonymousAuthenticationFilter</classname> to the stack and an
-          <classname>AnonymousAuthenticationProvider</classname>. Required if you are using the
-          <literal>IS_AUTHENTICATED_ANONYMOUSLY</literal> attribute. </para>
-    </section>
-    <section xml:id="nsa-x509">
-      <title>The <literal>&lt;x509&gt;</literal> Element</title>
-      <para> Adds support for X.509 authentication. An
-          <classname>X509AuthenticationFilter</classname> will be added to the stack and an
-          <classname>Http403ForbiddenEntryPoint</classname> bean will be created. The latter will
-        only be used if no other authentication mechanisms are in use (it's only functionality is to
-        return an HTTP 403 error code). A
-          <classname>PreAuthenticatedAuthenticationProvider</classname> will also be created which
-        delegates the loading of user authorities to a
-          <interfacename>UserDetailsService</interfacename>. </para>
-      <section>
-        <title>The <literal>subject-principal-regex</literal> attribute</title>
-        <para> Defines a regular expression which will be used to extract the username from the
-          certificate (for use with the <interfacename>UserDetailsService</interfacename>). </para>
-      </section>
-      <section>
-        <title>The <literal>user-service-ref</literal> attribute</title>
-        <para> Allows a specific <interfacename>UserDetailsService</interfacename> to be used with
-          X.509 in the case where multiple instances are configured. If not set, an attempt will be
-          made to locate a suitable instance automatically and use that. </para>
-      </section>
-    </section>
-    <section xml:id="nsa-openid-login">
-      <title>The <literal>&lt;openid-login&gt;</literal> Element</title>
-      <para> Similar to <literal>&lt;form-login&gt;</literal> and has the same attributes. The
-        default value for <literal>login-processing-url</literal> is
-        "/j_spring_openid_security_check". An <classname>OpenIDAuthenticationFilter</classname> and
-          <classname>OpenIDAuthenticationProvider</classname> will be registered. The latter
-        requires a reference to a <interfacename>UserDetailsService</interfacename>. Again, this can
-        be specified by Id, using the <literal>user-service-ref</literal> attribute, or will be
-        located automatically in the application context. </para>
-    </section>
-    <section xml:id="nsa-logout">
-      <title>The <literal>&lt;logout&gt;</literal> Element</title>
-      <para> Adds a <classname>LogoutFilter</classname> to the filter stack. This is configured with
-        a <classname>SecurityContextLogoutHandler</classname>. </para>
-      <section>
-        <title>The <literal>logout-url</literal> attribute</title>
-        <para> The URL which will cause a logout (i.e. which will be processed by the filter).
-          Defaults to "/j_spring_security_logout". </para>
-      </section>
-      <section>
-        <title>The <literal>logout-success-url</literal> attribute</title>
-        <para> The destination URL which the user will be taken to after logging out. Defaults to
-          "/". </para>
-      </section>
-      <section>
-        <title>The <literal>invalidate-session</literal> attribute</title>
-        <para> Maps to the <literal>invalidateHttpSession</literal> of the
-            <classname>SecurityContextLogoutHandler</classname>. Defaults to "true", so the session
-          will be invalidated on logout. </para>
-      </section>
-    </section>
-    <section>
-      <title>The <literal>&lt;custom-filter></literal> Element</title>
-      <para>This element is used to add a filter to the filter chain. It doesn't create any
-        additional beans but is used to select a bean of type
-          <interfacename>javax.servlet.Filter</interfacename> which is already defined in the
-        appllication context and add that at a particular position in the filter chain maintained by
-        Spring Security. Full details can be found in the namespace chapter.</para>
-    </section>
-  </section>
-  <section>
-    <title>Authentication Services</title>
-    <para> Before Spring Security 3.0, an <interfacename>AuthenticationManager</interfacename> was
-      automatically registered internally. Now you must register one explicitly using the
-        <literal>&lt;authentication-manager&gt;</literal> element. This creates an instance of
-      Spring Security's <classname>ProviderManager</classname> class, which needs to be configured
-      with a list of one or more <interfacename>AuthenticationProvider</interfacename> instances.
-      These can either be created using syntax elements provided by the namespace, or they can be
-      standard bean definitions, marked for addition to the list using the
-        <literal>authentication-provider</literal> element. </para>
-    <section>
-      <title>The <literal>&lt;authentication-manager&gt;</literal> Element</title>
-      <para> Every Spring Security application which uses the namespace must have include this
-        element somewhere. It is responsible for registering the
-          <interfacename>AuthenticationManager</interfacename> which provides authentication
-        services to the application. It also allows you to define an alias name for the internal
-        instance for use in your own configuration. Its use is described in the 
-          <link xlink:href="#ns-auth-manager">namespace introduction</link>. All elements which create
-          <interfacename>AuthenticationProvider</interfacename> instances should be children of this
-          element.</para>
-      <para>
-          The element also exposes an <literal>erase-credentials</literal> attribute which maps
-          to the <literal>eraseCredentialsAfterAuthentication</literal> property of
-          the <classname>ProviderManager</classname>. This is discussed in the
-          <link xlink:href="#core-services-erasing-credentials">Core Services</link> chapter.</para>
-      <section>
-        <title>The <literal>&lt;authentication-provider&gt;</literal> Element</title>
-        <para> Unless used with a <literal>ref</literal> attribute, this element is shorthand for configuring a
-            <link xlink:href="#core-services-dao-provider"><classname>DaoAuthenticationProvider</classname></link>.
-            <classname>DaoAuthenticationProvider</classname> loads user information from a
-            <interfacename>UserDetailsService</interfacename> and compares the username/password
-          combination with the values supplied at login. The
-            <interfacename>UserDetailsService</interfacename> instance can be defined either by
-          using an available namespace element (<literal>jdbc-user-service</literal> or by using the
-            <literal>user-service-ref</literal> attribute to point to a bean defined elsewhere in
-          the application context). You can find examples of these variations in the <link
-            xlink:href="#ns-auth-providers">namespace introduction</link>. </para>
+                <para> If a <literal>&lt;port-mappings&gt;</literal> configuration is added, this
+                    will be used to by the <classname>SecureChannelProcessor</classname> and
+                    <classname>InsecureChannelProcessor</classname> beans to determine the ports
+                    used for redirecting to HTTP/HTTPS. </para>
+            </section>
+            <section>
+                <title><literal>filters</literal></title>
+                <para>Can only take the value <quote>none</quote>. This will cause any matching
+                    request to bypass the Spring Security filter chain entirely. None of the rest of
+                    the <literal>&lt;http></literal> configuration will have any effect on the
+                    request and there will be no security context available for its duration. Access
+                    to secured methods during the request will fail.</para>
+            </section>
+        </section>
         <section>
         <section>
-          <title>The <literal>&lt;password-encoder&gt;</literal> Element</title>
-          <para>Authentication providers can optionally be configured to use a password encoder as
-            described in the <link xlink:href="#ns-password-encoder">namespace introduction</link>.
-            This will result in the bean being injected with the appropriate
-              <interfacename>PasswordEncoder</interfacename> instance, potentially with an
-            accompanying <interfacename>SaltSource</interfacename> bean to provide salt values for
-            hashing. </para>
+            <title>The <literal>&lt;port-mappings&gt;</literal> Element</title>
+            <para> By default, an instance of <classname>PortMapperImpl</classname> will be added to
+                the configuration for use in redirecting to secure and insecure URLs. This element
+                can optionally be used to override the default mappings which that class defines.
+                Each child <literal>&lt;port-mapping&gt;</literal> element defines a pair of
+                HTTP:HTTPS ports. The default mappings are 80:443 and 8080:8443. An example of
+                overriding these can be found in the <link xlink:href="#ns-requires-channel"
+                >namespace introduction</link>. </para>
+        </section>
+        <section xml:id="nsa-form-login">
+            <title>The <literal>&lt;form-login&gt;</literal> Element</title>
+            <para> Used to add an <classname>UsernamePasswordAuthenticationFilter</classname> to the
+                filter stack and an <classname>LoginUrlAuthenticationEntryPoint</classname> to the
+                application context to provide authentication on demand. This will always take
+                precedence over other namespace-created entry points. If no attributes are supplied,
+                a login page will be generated automatically at the URL "/spring_security_login" <footnote>
+                <para>This feature is really just provided for convenience and is not intended for
+                    production (where a view technology will have been chosen and can be used to
+                    render a customized login page). The class
+                    <classname>DefaultLoginPageGeneratingFilter</classname> is responsible for
+                    rendering the login page and will provide login forms for both normal form login
+                    and/or OpenID if required.</para>
+                </footnote> The behaviour can be customized using the following attributes. </para>
+            <section>
+                <title><literal>login-page</literal></title>
+                <para> The URL that should be used to render the login page. Maps to the
+                    <literal>loginFormUrl</literal> property of the
+                    <classname>LoginUrlAuthenticationEntryPoint</classname>. Defaults to
+                    "/spring_security_login". </para>
+            </section>
+            <section>
+                <title><literal>login-processing-url</literal></title>
+                <para> Maps to the <literal>filterProcessesUrl</literal> property of
+                    <classname>UsernamePasswordAuthenticationFilter</classname>. The default value
+                    is "/j_spring_security_check". </para>
+            </section>
+            <section>
+                <title><literal>default-target-url</literal></title>
+                <para>Maps to the <literal>defaultTargetUrl</literal> property of
+                    <classname>UsernamePasswordAuthenticationFilter</classname>. If not set, the
+                    default value is "/" (the application root). A user will be taken to this URL
+                    after logging in, provided they were not asked to login while attempting to
+                    access a secured resource, when they will be taken to the originally requested
+                    URL. </para>
+            </section>
+            <section>
+                <title><literal>always-use-default-target</literal></title>
+                <para> If set to "true", the user will always start at the value given by
+                    <literal>default-target-url</literal>, regardless of how they arrived at the
+                    login page. Maps to the <literal>alwaysUseDefaultTargetUrl</literal> property of
+                    <classname>UsernamePasswordAuthenticationFilter</classname>. Default value is
+                    "false". </para>
+            </section>
+            <section>
+                <title><literal>authentication-failure-url</literal></title>
+                <para> Maps to the <literal>authenticationFailureUrl</literal> property of
+                    <classname>UsernamePasswordAuthenticationFilter</classname>. Defines the URL the
+                    browser will be redirected to on login failure. Defaults to
+                    "/spring_security_login?login_error", which will be automatically handled by the
+                    automatic login page generator, re-rendering the login page with an error
+                    message. </para>
+            </section>
+            <section>
+                <title><literal>authentication-success-handler-ref</literal></title>
+                <para>This can be used as an alternative to <literal>default-target-url</literal>
+                    and <literal>always-use-default-target</literal>, giving you full control over
+                    the navigation flow after a successful authentication. The value should be the
+                    name of an <interfacename>AuthenticationSuccessHandler</interfacename> bean in
+                    the application context. By default, an imlementation of
+                    <classname>SavedRequestAwareAuthenticationSuccessHandler</classname> is used and
+                    injected with the <literal>default-target-url</literal>.</para>
+            </section>
+            <section>
+                <title><literal>authentication-failure-handler-ref</literal></title>
+                <para>Can be used as an alternative to
+                    <literal>authentication-failure-url</literal>, giving you full control over the
+                    navigation flow after an authentication failure. The value should be he name of
+                    an <interfacename>AuthenticationFailureHandler</interfacename> bean in the
+                    application context. </para>
+            </section>
+        </section>
+        <section xml:id="nsa-http-basic">
+            <title>The <literal>&lt;http-basic&gt;</literal> Element</title>
+            <para> Adds a <classname>BasicAuthenticationFilter</classname> and
+                <classname>BasicAuthenticationEntryPoint</classname> to the configuration. The
+                latter will only be used as the configuration entry point if form-based login is not
+                enabled. </para>
+        </section>
+        <section xml:id="nsa-remember-me">
+            <title>The <literal>&lt;remember-me&gt;</literal> Element</title>
+            <para> Adds the <classname>RememberMeAuthenticationFilter</classname> to the stack. This
+                in turn will be configured with either a
+                <classname>TokenBasedRememberMeServices</classname>, a
+                <classname>PersistentTokenBasedRememberMeServices</classname> or a user-specified
+                bean implementing <interfacename>RememberMeServices</interfacename> depending on the
+                attribute settings. </para>
+            <section>
+                <title><literal>data-source-ref</literal></title>
+                <para> If this is set, <classname>PersistentTokenBasedRememberMeServices</classname>
+                    will be used and configured with a
+                    <classname>JdbcTokenRepositoryImpl</classname> instance. </para>
+            </section>
+            <section>
+                <title><literal>services-ref</literal></title>
+                <para> Allows complete control of the
+                    <interfacename>RememberMeServices</interfacename> implementation that will be
+                    used by the filter. The value should be the <literal>id</literal> of a bean in the application
+                    context which implements this interface. Should also implement
+                    <interfacename>LogoutHandler</interfacename> if a logout filter is in use.</para>
+            </section>
+            <section>
+                <title><literal>token-repository-ref</literal></title>
+                <para> Configures a <classname>PersistentTokenBasedRememberMeServices</classname>
+                    but allows the use of a custom
+                    <interfacename>PersistentTokenRepository</interfacename> bean. </para>
+            </section>
+            <section>
+                <title>The <literal>key</literal> Attribute</title>
+                <para>Maps to the "key" property of
+                    <classname>AbstractRememberMeServices</classname>. Should be set to a unique
+                    value to ensure that remember-me cookies are only valid within the one
+                    application <footnote>
+                    <para>This doesn't affect the use of
+                        <classname>PersistentTokenBasedRememberMeServices</classname>, where the
+                        tokens are stored on the server side.</para>
+                    </footnote>. </para>
+            </section>
+            <section>
+                <title><literal>token-validity-seconds</literal></title>
+                <para> Maps to the <literal>tokenValiditySeconds</literal> property of
+                    <classname>AbstractRememberMeServices</classname>. Specifies the period in
+                    seconds for which the remember-me cookie should be valid. By default it will be
+                    valid for 14 days. </para>
+            </section>
+            <section>
+                <title><literal>user-service-ref</literal></title>
+                <para> The remember-me services implementations require access to a
+                    <interfacename>UserDetailsService</interfacename>, so there has to be one
+                    defined in the application context. If there is only one, it will be selected
+                    and used automatically by the namespace configuration. If there are multiple
+                    instances, you can specify a bean <literal>id</literal> explicitly using this attribute. </para>
+            </section>
         </section>
         </section>
-      </section>
-      <section>
-        <title>Using <literal>&lt;authentication-provider&gt;</literal> to refer to an
-            <interfacename>AuthenticationProvider</interfacename> Bean</title>
-        <para> If you have written your own <interfacename>AuthenticationProvider</interfacename>
-          implementation (or want to configure one of Spring Security's own implementations as a
-          traditional bean for some reason, then you can use the following syntax to add it to the
-          internal <classname>ProviderManager</classname>'s list: <programlisting><![CDATA[
+        <section xml:id="nsa-session-mgmt">
+            <title>The <literal>&lt;session-management&gt;</literal> Element</title>
+            <para>Session-management related functionality is implemented by the addition of a
+                <classname>SessionManagementFilter</classname> to the filter stack.</para>
+            <section xml:id="session-fixation-protection">
+                <title><literal>session-fixation-protection</literal></title>
+                <para> Indicates whether an existing session should be invalidated when a user
+                    authenticates and a new session started. If set to "none" no change will be
+                    made. "newSession" will create a new empty session. "migrateSession" will create
+                    a new session and copy the session attributes to the new session. Defaults to
+                    "migrateSession".</para>
+                <para> If session fixation protection is enabled, the
+                    <classname>SessionManagementFilter</classname> is inected with a appropriately
+                    configured <classname>DefaultSessionAuthenticationStrategy</classname>. See the
+                    Javadoc for this class for more details. </para>
+            </section>
+        </section>
+        <section xml:id="nsa-concurrent-session-control">
+            <title>The <literal>&lt;concurrency-control&gt;</literal> Element</title>
+            <para> Adds support for concurrent session control, allowing limits to be placed on the
+                number of active sessions a user can have. A
+                <classname>ConcurrentSessionFilter</classname> will be created, and a
+                <classname>ConcurrentSessionControlStrategy</classname> will be used with the
+                <classname>SessionManagementFilter</classname>. If a <literal>form-login</literal>
+                element has been declared, the strategy object will also be injected into the
+                created authentication filter. An instance of
+                <interfacename>SessionRegistry</interfacename> (a
+                <classname>SessionRegistryImpl</classname> instance unless the user wishes to use a
+                custom bean) will be created for use by the strategy.</para>
+            <section>
+                <title>The <literal>max-sessions</literal> attribute</title>
+                <para>Maps to the <literal>maximumSessions</literal> property of
+                    <classname>ConcurrentSessionControlStrategy</classname>.</para>
+            </section>
+            <section>
+                <title>The <literal>expired-url</literal> attribute</title>
+                <para> The URL a user will be redirected to if they attempt to use a session which
+                    has been "expired" by the concurrent session controller because the user has
+                    exceeded the number of allowed sessions and has logged in again elsewhere.
+                    Should be set unless <literal>exception-if-maximum-exceeded</literal> is set. If
+                    no value is supplied, an expiry message will just be written directly back to
+                    the response. </para>
+            </section>
+            <section>
+                <title>The <literal>error-if-maximum-exceeded</literal> attribute</title>
+                <para>If set to "true" a
+                    <exceptionname>SessionAuthenticationException</exceptionname> will be raised
+                    when a user attempts to exceed the maximum allowed number of sessions. The
+                    default behaviour is to expire the original session. </para>
+            </section>
+            <section>
+                <title>The <literal>session-registry-alias</literal> and
+                    <literal>session-registry-ref</literal> attributes</title>
+                <para> The user can supply their own <interfacename>SessionRegistry</interfacename>
+                    implementation using the <literal>session-registry-ref</literal> attribute. The
+                    other concurrent session control beans will be wired up to use it. </para>
+                <para> It can also be useful to have a reference to the internal session registry
+                    for use in your own beans or an admin interface. You can expose the interal bean
+                    using the <literal>session-registry-alias</literal> attribute, giving it a name
+                    that you can use elsewhere in your configuration. </para>
+            </section>
+        </section>
+        <section xml:id="nsa-anonymous">
+            <title>The <literal>&lt;anonymous&gt;</literal> Element</title>
+            <para> Adds an <classname>AnonymousAuthenticationFilter</classname> to the stack and an
+                <classname>AnonymousAuthenticationProvider</classname>. Required if you are using
+                the <literal>IS_AUTHENTICATED_ANONYMOUSLY</literal> attribute. </para>
+        </section>
+        <section xml:id="nsa-x509">
+            <title>The <literal>&lt;x509&gt;</literal> Element</title>
+            <para> Adds support for X.509 authentication. An
+                <classname>X509AuthenticationFilter</classname> will be added to the stack and an
+                <classname>Http403ForbiddenEntryPoint</classname> bean will be created. The latter
+                will only be used if no other authentication mechanisms are in use (it's only
+                functionality is to return an HTTP 403 error code). A
+                <classname>PreAuthenticatedAuthenticationProvider</classname> will also be created
+                which delegates the loading of user authorities to a
+                <interfacename>UserDetailsService</interfacename>. </para>
+            <section>
+                <title>The <literal>subject-principal-regex</literal> attribute</title>
+                <para> Defines a regular expression which will be used to extract the username from
+                    the certificate (for use with the
+                    <interfacename>UserDetailsService</interfacename>). </para>
+            </section>
+            <section>
+                <title>The <literal>user-service-ref</literal> attribute</title>
+                <para> Allows a specific <interfacename>UserDetailsService</interfacename> to be
+                    used with X.509 in the case where multiple instances are configured. If not set,
+                    an attempt will be made to locate a suitable instance automatically and use
+                    that. </para>
+            </section>
+        </section>
+        <section xml:id="nsa-openid-login">
+            <title>The <literal>&lt;openid-login&gt;</literal> Element</title>
+            <para> Similar to <literal>&lt;form-login&gt;</literal> and has the same attributes. The
+                default value for <literal>login-processing-url</literal> is
+                "/j_spring_openid_security_check". An
+                <classname>OpenIDAuthenticationFilter</classname> and
+                <classname>OpenIDAuthenticationProvider</classname> will be registered. The latter
+                requires a reference to a <interfacename>UserDetailsService</interfacename>. Again,
+                this can be specified by <literal>id</literal>, using the <literal>user-service-ref</literal>
+                attribute, or will be located automatically in the application context. </para>
+            <section>
+                <title>The <literal>&lt;attribute-exchange></literal> Element</title>
+                <para>The <literal>attribute-exchange</literal> element defines the list of
+                    attributes which should be requested from the identity provider. More than one
+                    can be used, in which case each must have an <literal>identifier-match</literal>
+                    attribute, containing a regular expression which is matched against the supplied
+                    OpenID identifer. This allows different attribute lists to be fetched from
+                    different providers (Google, Yahoo etc).</para>
+            </section>
+        </section>
+        <section xml:id="nsa-logout">
+            <title>The <literal>&lt;logout&gt;</literal> Element</title>
+            <para> Adds a <classname>LogoutFilter</classname> to the filter stack. This is
+                configured with a <classname>SecurityContextLogoutHandler</classname>. </para>
+            <section>
+                <title>The <literal>logout-url</literal> attribute</title>
+                <para> The URL which will cause a logout (i.e. which will be processed by the
+                    filter). Defaults to "/j_spring_security_logout". </para>
+            </section>
+            <section>
+                <title>The <literal>logout-success-url</literal> attribute</title>
+                <para> The destination URL which the user will be taken to after logging out.
+                    Defaults to "/". </para>
+            </section>
+            <section>
+                <title>The <literal>success-handler-ref</literal> attribute</title>
+                <para>May be used to supply an instance of <interfacename>LogoutSuccessHandler</interfacename>
+                    which will be invoked to control the navigation after logging out.
+                </para>
+            </section>
+            <section>
+                <title>The <literal>invalidate-session</literal> attribute</title>
+                <para> Maps to the <literal>invalidateHttpSession</literal> of the
+                    <classname>SecurityContextLogoutHandler</classname>. Defaults to "true", so the
+                    session will be invalidated on logout.</para>
+            </section>
+            <section>
+                <title>The <literal>delete-cookies</literal> attribute</title>
+                <para>A comma-separated list of the names of cookies which should be deleted when the user logs out.
+                </para>
+            </section>
+        </section>
+        <section>
+            <title>The <literal>&lt;custom-filter></literal> Element</title>
+            <para>This element is used to add a filter to the filter chain. It doesn't create any
+                additional beans but is used to select a bean of type
+                <interfacename>javax.servlet.Filter</interfacename> which is already defined in the
+                appllication context and add that at a particular position in the filter chain
+                maintained by Spring Security. Full details can be found in the namespace
+                chapter.</para>
+        </section>
+        <section xml:id="nsa-request-cache">
+            <title>The <literal>request-cache</literal> Element</title>
+            <para>Sets the <interfacename>RequestCache</interfacename> instance which will be used
+                by the <classname>ExceptionTranslationFilter</classname> to store request
+                information before invoking an
+                <interfacename>AuthenticationEntryPoint</interfacename>. </para>
+        </section>
+        <section>
+            <title>The <literal>&lt;http-firewall></literal> Element</title>
+            <para>This is a top-level element which can be used to inject a custom implementation of
+                <interfacename>HttpFirewall</interfacename> into the
+                <classname>FilterChainProxy</classname> created by the namespace. The default
+                implementation should be suitable for most applications.</para>
+        </section>
+    </section>
+    <section xml:id="nsa-authentication">
+        <title>Authentication Services</title>
+        <para> Before Spring Security 3.0, an <interfacename>AuthenticationManager</interfacename>
+            was automatically registered internally. Now you must register one explicitly using the
+            <literal>&lt;authentication-manager&gt;</literal> element. This creates an instance of
+            Spring Security's <classname>ProviderManager</classname> class, which needs to be
+            configured with a list of one or more
+            <interfacename>AuthenticationProvider</interfacename> instances. These can either be
+            created using syntax elements provided by the namespace, or they can be standard bean
+            definitions, marked for addition to the list using the
+            <literal>authentication-provider</literal> element. </para>
+        <section>
+            <title>The <literal>&lt;authentication-manager&gt;</literal> Element</title>
+            <para> Every Spring Security application which uses the namespace must have include this
+                element somewhere. It is responsible for registering the
+                <interfacename>AuthenticationManager</interfacename> which provides authentication
+                services to the application. It also allows you to define an alias name for the
+                internal instance for use in your own configuration. Its use is described in the
+                <link xlink:href="#ns-auth-manager">namespace introduction</link>. All elements
+                which create <interfacename>AuthenticationProvider</interfacename> instances should
+                be children of this element.</para>
+            <para> The element also exposes an <literal>erase-credentials</literal> attribute which
+                maps to the <literal>eraseCredentialsAfterAuthentication</literal> property of the
+                <classname>ProviderManager</classname>. This is discussed in the <link
+                xlink:href="#core-services-erasing-credentials">Core Services</link> chapter.</para>
+            <section>
+                <title>The <literal>&lt;authentication-provider&gt;</literal> Element</title>
+                <para> Unless used with a <literal>ref</literal> attribute, this element is
+                    shorthand for configuring a <link xlink:href="#core-services-dao-provider"
+                    ><classname>DaoAuthenticationProvider</classname></link>.
+                    <classname>DaoAuthenticationProvider</classname> loads user information from a
+                    <interfacename>UserDetailsService</interfacename> and compares the
+                    username/password combination with the values supplied at login. The
+                    <interfacename>UserDetailsService</interfacename> instance can be defined either
+                    by using an available namespace element (<literal>jdbc-user-service</literal> or
+                    by using the <literal>user-service-ref</literal> attribute to point to a bean
+                    defined elsewhere in the application context). You can find examples of these
+                    variations in the <link xlink:href="#ns-auth-providers">namespace
+                    introduction</link>. </para>
+                <section>
+                    <title>The <literal>&lt;password-encoder&gt;</literal> Element</title>
+                    <para>Authentication providers can optionally be configured to use a password
+                        encoder as described in the <link xlink:href="#ns-password-encoder"
+                        >namespace introduction</link>. This will result in the bean being injected
+                        with the appropriate <interfacename>PasswordEncoder</interfacename>
+                        instance, potentially with an accompanying
+                        <interfacename>SaltSource</interfacename> bean to provide salt values for
+                        hashing. </para>
+                </section>
+            </section>
+            <section>
+                <title>Using <literal>&lt;authentication-provider&gt;</literal> to refer to an
+                    <interfacename>AuthenticationProvider</interfacename> Bean</title>
+                <para> If you have written your own
+                    <interfacename>AuthenticationProvider</interfacename> implementation (or want to
+                    configure one of Spring Security's own implementations as a traditional bean for
+                    some reason, then you can use the following syntax to add it to the internal
+                    <classname>ProviderManager</classname>'s list: <programlisting><![CDATA[
   <security:authentication-manager>
   <security:authentication-manager>
     <security:authentication-provider ref="myAuthenticationProvider" />
     <security:authentication-provider ref="myAuthenticationProvider" />
   </security:authentication-manager>
   </security:authentication-manager>
   <bean id="myAuthenticationProvider" class="com.something.MyAuthenticationProvider"/>
   <bean id="myAuthenticationProvider" class="com.something.MyAuthenticationProvider"/>
   ]]></programlisting></para>
   ]]></programlisting></para>
-      </section>
-    </section>
-  </section>
-  <section>
-    <title>Method Security</title>
-    <section>
-      <title>The <literal>&lt;global-method-security&gt;</literal> Element</title>
-      <para> This element is the primary means of adding support for securing methods on Spring
-        Security beans. Methods can be secured by the use of annotations (defined at the interface
-        or class level) or by defining a set of pointcuts as child elements, using AspectJ syntax. </para>
-      <para> Method security uses the same <interfacename>AccessDecisionManager</interfacename>
-        configuration as web security, but this can be overridden as explained above <xref
-          xlink:href="#nsa-access-decision-manager-ref"/>, using the same attribute. </para>
-      <section>
-        <title>The <literal>secured-annotations</literal> and <literal>jsr250-annotations</literal>
-          Attributes</title>
-        <para> Setting these to "true" will enable support for Spring Security's own
-            <literal>@Secured</literal> annotations and JSR-250 annotations, respectively. They are
-          both disabled by default. Use of JSR-250 annotations also adds a
-            <classname>Jsr250Voter</classname> to the
-            <interfacename>AccessDecisionManager</interfacename>, so you need to make sure you do
-          this if you are using a custom implementation and want to use these annotations. </para>
-      </section>
-      <section>
-        <title>Securing Methods using <literal>&lt;protect-pointcut&gt;</literal></title>
-        <para> Rather than defining security attributes on an individual method or class basis using
-          the <literal>@Secured</literal> annotation, you can define cross-cutting security
-          constraints across whole sets of methods and interfaces in your service layer using the
-            <literal>&lt;protect-pointcut&gt;</literal> element. This has two attributes: <itemizedlist>
-            <listitem>
-              <para><literal>expression</literal> - the pointcut expression</para>
-            </listitem>
-            <listitem>
-              <para><literal>access</literal> - the security attributes which apply</para>
-            </listitem>
-          </itemizedlist> You can find an example in the <link xlink:href="#ns-protect-pointcut"
-            >namespace introduction</link>. </para>
-      </section>
-      <section xml:id="nsa-custom-after-invocation">
-        <title>The <literal>&lt;after-invocation-provider&gt;</literal> Element</title>
-        <para> This element can be used to decorate an
-            <interfacename>AfterInvocationProvider</interfacename> for use by the security
-          interceptor maintained by the <literal>&lt;global-method-security&gt;</literal> namespace.
-          You can define zero or more of these within the <literal>global-method-security</literal>
-          element, each with a <literal>ref</literal> attribute pointing to an
-            <interfacename>AfterInvocationProvider</interfacename> bean instance within your
-          application context. </para>
-      </section>
-    </section>
-    <section>
-      <title>LDAP Namespace Options</title>
-      <para> LDAP is covered in some details in <link xlink:href="#ldap">its own chapter</link>. We
-        will expand on that here with some explanation of how the namespace options map to Spring
-        beans. The LDAP implementation uses Spring LDAP extensively, so some familiarity with that
-        project's API may be useful. </para>
-      <section>
-        <title>Defining the LDAP Server using the <literal>&lt;ldap-server&gt;</literal>
-          Element</title>
-        <para> This element sets up a Spring LDAP <interfacename>ContextSource</interfacename> for
-          use by the other LDAP beans, defining the location of the LDAP server and other
-          information (such as a username and password, if it doesn't allow anonymous access) for
-          connecting to it. It can also be used to create an embedded server for testing. Details of
-          the syntax for both options are covered in the <link xlink:href="#ldap-server">LDAP
-            chapter</link>. The actual <interfacename>ContextSource</interfacename> implementation
-          is <classname>DefaultSpringSecurityContextSource</classname> which extends Spring LDAP's
-            <classname>LdapContextSource</classname> class. The <literal>manager-dn</literal> and
-            <literal>manager-password</literal> attributes map to the latter's
-            <literal>userDn</literal> and <literal>password</literal> properties respectively. </para>
-        <para> If you only have one server defined in your application context, the other LDAP
-          namespace-defined beans will use it automatically. Otherwise, you can give the element an
-          "id" attribute and refer to it from other namespace beans using the
-            <literal>server-ref</literal> attribute. This is actually the bean Id of the
-            <literal>ContextSource</literal> instance, if you want to use it in other traditional
-          Spring beans. </para>
-      </section>
-      <section>
-        <title>The <literal>&lt;ldap-provider&gt;</literal> Element</title>
-        <para> This element is shorthand for the creation of an
-            <classname>LdapAuthenticationProvider</classname> instance. By default this will be
-          configured with a <classname>BindAuthenticator</classname> instance and a
-            <classname>DefaultAuthoritiesPopulator</classname>. As with all namespace authentication
-          providers, it must be included as a child of the
-            <literal>authentication-provider</literal> element.</para>
-        <section>
-          <title>The <literal>user-dn-pattern</literal> Attribute</title>
-          <para> If your users are at a fixed location in the directory (i.e. you can work out the
-            DN directly from the username without doing a directory search), you can use this
-            attribute to map directly to the DN. It maps directly to the
-              <literal>userDnPatterns</literal> property of
-              <classname>AbstractLdapAuthenticator</classname>. </para>
-        </section>
-        <section>
-          <title>The <literal>user-search-base</literal> and <literal>user-search-filter</literal>
-            Attributes</title>
-          <para> If you need to perform a search to locate the user in the directory, then you can
-            set these attributes to control the search. The <classname>BindAuthenticator</classname>
-            will be configured with a <classname>FilterBasedLdapUserSearch</classname> and the
-            attribute values map directly to the first two arguments of that bean's constructor. If
-            these attributes aren't set and no <literal>user-dn-pattern</literal> has been supplied
-            as an alternative, then the default search values of
-              <literal>user-search-filter="(uid={0})"</literal> and
-              <literal>user-search-base=""</literal> will be used. </para>
+            </section>
         </section>
         </section>
-        <section>
-          <title><literal>group-search-filter</literal>, <literal>group-search-base</literal>,
-              <literal>group-role-attribute</literal> and <literal>role-prefix</literal>
-            Attributes</title>
-          <para> The value of <literal>group-search-base</literal> is mapped to the
-              <literal>groupSearchBase</literal> constructor argument of
-              <classname>DefaultAuthoritiesPopulator</classname> and defaults to "ou=groups". The
-            default filter value is "(uniqueMember={0})", which assumes that the entry is of type
-            "groupOfUniqueNames". <literal>group-role-attribute</literal> maps to the
-              <literal>groupRoleAttribute</literal> attribute and defaults to "cn". Similarly
-              <literal>role-prefix</literal> maps to <literal>rolePrefix</literal> and defaults to
-            "ROLE_". </para>
+    </section>
+    <section xml:id="nsa-method-security">
+        <title>Method Security</title>
+        <section xml:id="nsa-gms">
+            <title>The <literal>&lt;global-method-security&gt;</literal> Element</title>
+            <para> This element is the primary means of adding support for securing methods on
+                Spring Security beans. Methods can be secured by the use of annotations (defined at
+                the interface or class level) or by defining a set of pointcuts as child elements,
+                using AspectJ syntax. </para>
+            <para> Method security uses the same
+                <interfacename>AccessDecisionManager</interfacename> configuration as web security,
+                but this can be overridden as explained above <xref
+                xlink:href="#nsa-access-decision-manager-ref"/>, using the same attribute. </para>
+            <section>
+                <title>The <literal>secured-annotations</literal> and
+                    <literal>jsr250-annotations</literal> Attributes</title>
+                <para> Setting these to "true" will enable support for Spring Security's own
+                    <literal>@Secured</literal> annotations and JSR-250 annotations, respectively.
+                    They are both disabled by default. Use of JSR-250 annotations also adds a
+                    <classname>Jsr250Voter</classname> to the
+                    <interfacename>AccessDecisionManager</interfacename>, so you need to make sure
+                    you do this if you are using a custom implementation and want to use these
+                    annotations. </para>
+            </section>
+            <section xml:id="nsa-gms-mode">
+                <title>The <literal>mode</literal> Attribute</title>
+                <para>This attribute can be set to <quote>aspectj</quote> to specify that AspectJ
+                    should be used instead of the default Spring AOP. Secured methods must be woven
+                    with the <classname>AnnotationSecurityAspect</classname> from the
+                    <literal>spring-security-aspects</literal> module. </para>
+            </section>
+            <section>
+                <title>Securing Methods using <literal>&lt;protect-pointcut&gt;</literal></title>
+                <para> Rather than defining security attributes on an individual method or class
+                    basis using the <literal>@Secured</literal> annotation, you can define
+                    cross-cutting security constraints across whole sets of methods and interfaces
+                    in your service layer using the <literal>&lt;protect-pointcut&gt;</literal>
+                    element. This has two attributes: <itemizedlist>
+                    <listitem>
+                        <para><literal>expression</literal> - the pointcut expression</para>
+                    </listitem>
+                    <listitem>
+                        <para><literal>access</literal> - the security attributes which apply</para>
+                    </listitem>
+                    </itemizedlist> You can find an example in the <link
+                    xlink:href="#ns-protect-pointcut">namespace introduction</link>. </para>
+            </section>
+            <section xml:id="nsa-custom-after-invocation">
+                <title>The <literal>&lt;after-invocation-provider&gt;</literal> Element</title>
+                <para> This element can be used to decorate an
+                    <interfacename>AfterInvocationProvider</interfacename> for use by the security
+                    interceptor maintained by the <literal>&lt;global-method-security&gt;</literal>
+                    namespace. You can define zero or more of these within the
+                    <literal>global-method-security</literal> element, each with a
+                    <literal>ref</literal> attribute pointing to an
+                    <interfacename>AfterInvocationProvider</interfacename> bean instance within your
+                    application context. </para>
+            </section>
         </section>
         </section>
         <section>
         <section>
-          <title>The <literal>&lt;password-compare&gt;</literal> Element</title>
-          <para> This is used as child element to <literal>&lt;ldap-provider&gt;</literal> and
-            switches the authentication strategy from <classname>BindAuthenticator</classname> to
-              <classname>PasswordComparisonAuthenticator</classname>. This can optionally be
-            supplied with a <literal>hash</literal> attribute or with a child
-              <literal>&lt;password-encoder&gt;</literal> element to hash the password before
-            submitting it to the directory for comparison. </para>
+            <title>LDAP Namespace Options</title>
+            <para> LDAP is covered in some details in <link xlink:href="#ldap">its own
+                chapter</link>. We will expand on that here with some explanation of how the
+                namespace options map to Spring beans. The LDAP implementation uses Spring LDAP
+                extensively, so some familiarity with that project's API may be useful. </para>
+            <section>
+                <title>Defining the LDAP Server using the <literal>&lt;ldap-server&gt;</literal>
+                    Element</title>
+                <para> This element sets up a Spring LDAP
+                    <interfacename>ContextSource</interfacename> for use by the other LDAP beans,
+                    defining the location of the LDAP server and other information (such as a
+                    username and password, if it doesn't allow anonymous access) for connecting to
+                    it. It can also be used to create an embedded server for testing. Details of the
+                    syntax for both options are covered in the <link xlink:href="#ldap-server">LDAP
+                    chapter</link>. The actual <interfacename>ContextSource</interfacename>
+                    implementation is <classname>DefaultSpringSecurityContextSource</classname>
+                    which extends Spring LDAP's <classname>LdapContextSource</classname> class. The
+                    <literal>manager-dn</literal> and <literal>manager-password</literal> attributes
+                    map to the latter's <literal>userDn</literal> and <literal>password</literal>
+                    properties respectively. </para>
+                <para> If you only have one server defined in your application context, the other
+                    LDAP namespace-defined beans will use it automatically. Otherwise, you can give
+                    the element an "id" attribute and refer to it from other namespace beans using
+                    the <literal>server-ref</literal> attribute. This is actually the bean <literal>id</literal> of the
+                    <literal>ContextSource</literal> instance, if you want to use it in other
+                    traditional Spring beans. </para>
+            </section>
+            <section>
+                <title>The <literal>&lt;ldap-provider&gt;</literal> Element</title>
+                <para> This element is shorthand for the creation of an
+                    <classname>LdapAuthenticationProvider</classname> instance. By default this will
+                    be configured with a <classname>BindAuthenticator</classname> instance and a
+                    <classname>DefaultAuthoritiesPopulator</classname>. As with all namespace
+                    authentication providers, it must be included as a child of the
+                    <literal>authentication-provider</literal> element.</para>
+                <section>
+                    <title>The <literal>user-dn-pattern</literal> Attribute</title>
+                    <para> If your users are at a fixed location in the directory (i.e. you can work
+                        out the DN directly from the username without doing a directory search), you
+                        can use this attribute to map directly to the DN. It maps directly to the
+                        <literal>userDnPatterns</literal> property of
+                        <classname>AbstractLdapAuthenticator</classname>. </para>
+                </section>
+                <section>
+                    <title>The <literal>user-search-base</literal> and
+                        <literal>user-search-filter</literal> Attributes</title>
+                    <para> If you need to perform a search to locate the user in the directory, then
+                        you can set these attributes to control the search. The
+                        <classname>BindAuthenticator</classname> will be configured with a
+                        <classname>FilterBasedLdapUserSearch</classname> and the attribute values
+                        map directly to the first two arguments of that bean's constructor. If these
+                        attributes aren't set and no <literal>user-dn-pattern</literal> has been
+                        supplied as an alternative, then the default search values of
+                        <literal>user-search-filter="(uid={0})"</literal> and
+                        <literal>user-search-base=""</literal> will be used. </para>
+                </section>
+                <section>
+                    <title><literal>group-search-filter</literal>,
+                        <literal>group-search-base</literal>,
+                        <literal>group-role-attribute</literal> and <literal>role-prefix</literal>
+                        Attributes</title>
+                    <para> The value of <literal>group-search-base</literal> is mapped to the
+                        <literal>groupSearchBase</literal> constructor argument of
+                        <classname>DefaultAuthoritiesPopulator</classname> and defaults to
+                        "ou=groups". The default filter value is "(uniqueMember={0})", which assumes
+                        that the entry is of type "groupOfUniqueNames".
+                        <literal>group-role-attribute</literal> maps to the
+                        <literal>groupRoleAttribute</literal> attribute and defaults to "cn".
+                        Similarly <literal>role-prefix</literal> maps to
+                        <literal>rolePrefix</literal> and defaults to "ROLE_". </para>
+                </section>
+                <section>
+                    <title>The <literal>&lt;password-compare&gt;</literal> Element</title>
+                    <para> This is used as child element to <literal>&lt;ldap-provider&gt;</literal>
+                        and switches the authentication strategy from
+                        <classname>BindAuthenticator</classname> to
+                        <classname>PasswordComparisonAuthenticator</classname>. This can optionally
+                        be supplied with a <literal>hash</literal> attribute or with a child
+                        <literal>&lt;password-encoder&gt;</literal> element to hash the password
+                        before submitting it to the directory for comparison. </para>
+                </section>
+            </section>
+            <section>
+                <title>The <literal>&lt;ldap-user-service&gt;</literal> Element</title>
+                <para> This element configures an LDAP
+                    <interfacename>UserDetailsService</interfacename>. The class used is
+                    <classname>LdapUserDetailsService</classname> which is a combination of a
+                    <classname>FilterBasedLdapUserSearch</classname> and a
+                    <classname>DefaultAuthoritiesPopulator</classname>. The attributes it supports
+                    have the same usage as in <literal>&lt;ldap-provider&gt;</literal>. </para>
+            </section>
         </section>
         </section>
-      </section>
-      <section>
-        <title>The <literal>&lt;ldap-user-service&gt;</literal> Element</title>
-        <para> This element configures an LDAP <interfacename>UserDetailsService</interfacename>.
-          The class used is <classname>LdapUserDetailsService</classname> which is a combination of
-          a <classname>FilterBasedLdapUserSearch</classname> and a
-            <classname>DefaultAuthoritiesPopulator</classname>. The attributes it supports have the
-          same usage as in <literal>&lt;ldap-provider&gt;</literal>. </para>
-      </section>
     </section>
     </section>
-  </section>
 </appendix>
 </appendix>

+ 4 - 0
web/src/main/java/org/springframework/security/web/FilterChainProxy.java

@@ -304,6 +304,10 @@ public class FilterChainProxy extends GenericFilterBean {
         return matcher;
         return matcher;
     }
     }
 
 
+    public void setFirewall(HttpFirewall firewall) {
+        this.firewall = firewall;
+    }
+
     /**
     /**
      * If set to 'true', the query string will be stripped from the request URL before
      * If set to 'true', the query string will be stripped from the request URL before
      * attempting to find a matching filter chain. This is the default value.
      * attempting to find a matching filter chain. This is the default value.