(window.webpackJsonp=window.webpackJsonp||[]).push([[221],{649:function(e,t,r){"use strict";r.r(t);var a=r(56),s=Object(a.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"web-application-security"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#web-application-security"}},[e._v("#")]),e._v(" Web Application Security")]),e._v(" "),r("h2",{attrs:{id:"debug"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#debug"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Enables Spring Security debugging infrastructure.\nThis will provide human-readable (multi-line) debugging information to monitor requests coming into the security filters.\nThis may include sensitive information, such as request parameters or headers, and should only be used in a development environment.")]),e._v(" "),r("h2",{attrs:{id:"http"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#http"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("If you use an "),r("code",[e._v("")]),e._v(" element within your application, a "),r("code",[e._v("FilterChainProxy")]),e._v(' bean named "springSecurityFilterChain" is created and the configuration within the element is used to build a filter chain within'),r("code",[e._v("FilterChainProxy")]),e._v(".\nAs of Spring Security 3.1, additional "),r("code",[e._v("http")]),e._v(" elements can be used to add extra filter chains "),r("sup",{staticClass:"footnote"},[e._v("["),r("a",{staticClass:"footnote",attrs:{id:"_footnoteref_1",href:"#_footnotedef_1",title:"View footnote."}},[e._v("1")]),e._v("]")]),e._v(" for how to set up the mapping from your "),r("code",[e._v("web.xml")]),e._v(" ].\nSome 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.\nThe positions of the standard filters are fixed (see"),r("RouterLink",{attrs:{to:"/configuration/xml-namespace.html#filter-stack"}},[e._v("the filter order table")]),e._v(" 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"),r("code",[e._v("FilterChainProxy")]),e._v(" bean.\nYou can, of course, still do this if you need full control of the configuration.")],1),e._v(" "),r("p",[e._v("All filters which require a reference to the "),r("RouterLink",{attrs:{to:"/authentication/architecture.html#servlet-authentication-authenticationmanager"}},[r("code",[e._v("AuthenticationManager")])]),e._v(" will be automatically injected with the internal instance created by the namespace configuration.")],1),e._v(" "),r("p",[e._v("Each "),r("code",[e._v("")]),e._v(" namespace block always creates an "),r("code",[e._v("SecurityContextPersistenceFilter")]),e._v(", an "),r("code",[e._v("ExceptionTranslationFilter")]),e._v(" and a "),r("code",[e._v("FilterSecurityInterceptor")]),e._v(".\nThese are fixed and cannot be replaced with alternatives.")]),e._v(" "),r("h3",{attrs:{id:"http-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#http-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("p",[e._v("The attributes on the "),r("code",[e._v("")]),e._v(" element control some of the properties on the core filters.")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("access-decision-manager-ref")]),e._v("Optional attribute specifying the ID of the "),r("code",[e._v("AccessDecisionManager")]),e._v(" implementation which should be used for authorizing HTTP requests.\nBy default an "),r("code",[e._v("AffirmativeBased")]),e._v(" implementation is used for with a "),r("code",[e._v("RoleVoter")]),e._v(" and an "),r("code",[e._v("AuthenticatedVoter")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-manager-ref")]),e._v("A reference to the "),r("code",[e._v("AuthenticationManager")]),e._v(" used for the "),r("code",[e._v("FilterChain")]),e._v(" created by this http element.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("auto-config")]),e._v('Automatically registers a login form, BASIC authentication, logout services.\nIf set to "true", all of these capabilities are added (although you can still customize the configuration of each by providing the respective element).\nIf unspecified, defaults to "false".\nUse of this attribute is not recommended.\nUse explicit configuration elements instead to avoid confusion.')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("create-session")]),e._v("Controls the eagerness with which an HTTP session is created by Spring Security classes.\nOptions include:")]),e._v(" "),r("ul",[r("li",[r("p",[r("code",[e._v("always")]),e._v(" - Spring Security will proactively create a session if one does not exist.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("ifRequired")]),e._v(" - Spring Security will only create a session only if one is required (default value).")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("never")]),e._v(" - Spring Security will never create a session, but will make use of one if the application does.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("stateless")]),e._v(" - Spring Security will not create a session and ignore the session for obtaining a Spring "),r("code",[e._v("Authentication")]),e._v(".")])])])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("disable-url-rewriting")]),e._v("Prevents session IDs from being appended to URLs in the application.\nClients must use cookies if this attribute is set to "),r("code",[e._v("true")]),e._v(".\nThe default is "),r("code",[e._v("true")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("entry-point-ref")]),e._v("Normally the "),r("code",[e._v("AuthenticationEntryPoint")]),e._v(" used will be set depending on which authentication mechanisms have been configured.\nThis attribute allows this behaviour to be overridden by defining a customized "),r("code",[e._v("AuthenticationEntryPoint")]),e._v(" bean which will start the authentication process.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("jaas-api-provision")]),e._v("If available, runs the request as the "),r("code",[e._v("Subject")]),e._v(" acquired from the "),r("code",[e._v("JaasAuthenticationToken")]),e._v(" which is implemented by adding a "),r("code",[e._v("JaasApiIntegrationFilter")]),e._v(" bean to the stack.\nDefaults to "),r("code",[e._v("false")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("name")]),e._v("A bean identifier, used for referring to the bean elsewhere in the context.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("once-per-request")]),e._v("Corresponds to the "),r("code",[e._v("observeOncePerRequest")]),e._v(" property of "),r("code",[e._v("FilterSecurityInterceptor")]),e._v(".\nDefaults to "),r("code",[e._v("true")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("pattern")]),e._v("Defining a pattern for the "),r("a",{attrs:{href:"#nsa-http"}},[e._v("http")]),e._v(" element controls the requests which will be filtered through the list of filters which it defines.\nThe interpretation is dependent on the configured "),r("a",{attrs:{href:"#nsa-http-request-matcher"}},[e._v("request-matcher")]),e._v(".\nIf no pattern is defined, all requests will be matched, so the most specific patterns should be declared first.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("realm")]),e._v("Sets the realm name used for basic authentication (if enabled).\nCorresponds to the "),r("code",[e._v("realmName")]),e._v(" property on "),r("code",[e._v("BasicAuthenticationEntryPoint")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("request-matcher")]),e._v("Defines the "),r("code",[e._v("RequestMatcher")]),e._v(" strategy used in the "),r("code",[e._v("FilterChainProxy")]),e._v(" and the beans created by the "),r("code",[e._v("intercept-url")]),e._v(" to match incoming requests.\nOptions are currently "),r("code",[e._v("mvc")]),e._v(", "),r("code",[e._v("ant")]),e._v(", "),r("code",[e._v("regex")]),e._v(" and "),r("code",[e._v("ciRegex")]),e._v(", for Spring MVC, ant, regular-expression and case-insensitive regular-expression respectively.\nA separate instance is created for each "),r("a",{attrs:{href:"#nsa-intercept-url"}},[e._v("intercept-url")]),e._v(" element using its "),r("a",{attrs:{href:"#nsa-intercept-url-pattern"}},[e._v("pattern")]),e._v(", "),r("a",{attrs:{href:"#nsa-intercept-url-method"}},[e._v("method")]),e._v(" and "),r("a",{attrs:{href:"#nsa-intercept-url-servlet-path"}},[e._v("servlet-path")]),e._v(" attributes.\nAnt paths are matched using an "),r("code",[e._v("AntPathRequestMatcher")]),e._v(", regular expressions are matched using a "),r("code",[e._v("RegexRequestMatcher")]),e._v(" and for Spring MVC path matching the "),r("code",[e._v("MvcRequestMatcher")]),e._v(" is used.\nSee the Javadoc for these classes for more details on exactly how the matching is performed.\nAnt paths are the default strategy.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("request-matcher-ref")]),e._v("A reference to a bean that implements "),r("code",[e._v("RequestMatcher")]),e._v(" that will determine if this "),r("code",[e._v("FilterChain")]),e._v(" should be used.\nThis is a more powerful alternative to "),r("a",{attrs:{href:"#nsa-http-pattern"}},[e._v("pattern")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("security")]),e._v("A request pattern can be mapped to an empty filter chain, by setting this attribute to "),r("code",[e._v("none")]),e._v(".\nNo security will be applied and none of Spring Security’s features will be available.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("security-context-repository-ref")]),e._v("Allows injection of a custom "),r("code",[e._v("SecurityContextRepository")]),e._v(" into the "),r("code",[e._v("SecurityContextPersistenceFilter")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("servlet-api-provision")]),e._v("Provides versions of "),r("code",[e._v("HttpServletRequest")]),e._v(" security methods such as "),r("code",[e._v("isUserInRole()")]),e._v(" and "),r("code",[e._v("getPrincipal()")]),e._v(" which are implemented by adding a "),r("code",[e._v("SecurityContextHolderAwareRequestFilter")]),e._v(" bean to the stack.\nDefaults to "),r("code",[e._v("true")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("use-expressions")]),e._v("Enables EL-expressions in the "),r("code",[e._v("access")]),e._v(" attribute, as described in the chapter on "),r("RouterLink",{attrs:{to:"/authorization/expression-based.html#el-access-web"}},[e._v("expression-based access-control")]),e._v(".\nThe default value is true.")],1)])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-http"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-http"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("p",[r("a",{attrs:{href:"#nsa-access-denied-handler"}},[e._v("access-denied-handler")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-anonymous"}},[e._v("anonymous")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-cors"}},[e._v("cors")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-csrf"}},[e._v("csrf")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-custom-filter"}},[e._v("custom-filter")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-expression-handler"}},[e._v("expression-handler")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-form-login"}},[e._v("form-login")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-http-basic"}},[e._v("http-basic")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-intercept-url"}},[e._v("intercept-url")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-jee"}},[e._v("jee")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-logout"}},[e._v("logout")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-oauth2-client"}},[e._v("oauth2-client")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-oauth2-login"}},[e._v("oauth2-login")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-oauth2-resource-server"}},[e._v("oauth2-resource-server")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-openid-login"}},[e._v("openid-login")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-password-management"}},[e._v("password-management")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-port-mappings"}},[e._v("port-mappings")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-remember-me"}},[e._v("remember-me")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-request-cache"}},[e._v("request-cache")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-session-management"}},[e._v("session-management")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-x509"}},[e._v("x509")])])])]),e._v(" "),r("h2",{attrs:{id:"access-denied-handler"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#access-denied-handler"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("This element allows you to set the "),r("code",[e._v("errorPage")]),e._v(" property for the default "),r("code",[e._v("AccessDeniedHandler")]),e._v(" used by the "),r("code",[e._v("ExceptionTranslationFilter")]),e._v(", using the "),r("a",{attrs:{href:"#nsa-access-denied-handler-error-page"}},[e._v("error-page")]),e._v(" attribute, or to supply your own implementation using the "),r("a",{attrs:{href:"#nsa-access-denied-handler-ref"}},[e._v("ref")]),e._v(" attribute.\nThis is discussed in more detail in the section on the "),r("RouterLink",{attrs:{to:"/architecture.html#servlet-exceptiontranslationfilter"}},[e._v("ExceptionTranslationFilter")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-access-denied-handler"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-access-denied-handler"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"access-denied-handler-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#access-denied-handler-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("error-page")]),e._v("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.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("ref")]),e._v("Defines a reference to a Spring bean of type "),r("code",[e._v("AccessDeniedHandler")]),e._v(".")])])]),e._v(" "),r("h2",{attrs:{id:"cors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#cors"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("This element allows for configuring a "),r("code",[e._v("CorsFilter")]),e._v(".\nIf no "),r("code",[e._v("CorsFilter")]),e._v(" or "),r("code",[e._v("CorsConfigurationSource")]),e._v(" is specified and Spring MVC is on the classpath, a "),r("code",[e._v("HandlerMappingIntrospector")]),e._v(" is used as the "),r("code",[e._v("CorsConfigurationSource")]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"cors-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#cors-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("p",[e._v("The attributes on the "),r("code",[e._v("")]),e._v(" element control the headers element.")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("ref")]),e._v("Optional attribute that specifies the bean name of a "),r("code",[e._v("CorsFilter")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("cors-configuration-source-ref")]),e._v("Optional attribute that specifies the bean name of a "),r("code",[e._v("CorsConfigurationSource")]),e._v(" to be injected into a "),r("code",[e._v("CorsFilter")]),e._v(" created by the XML namespace.")])])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-cors"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-cors"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h2",{attrs:{id:"headers"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#headers"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("This element allows for configuring additional (security) headers to be send with the response.\nIt enables easy configuration for several headers and also allows for setting custom headers through the "),r("a",{attrs:{href:"#nsa-header"}},[e._v("header")]),e._v(" element.\nAdditional information, can be found in the "),r("RouterLink",{attrs:{to:"/features/exploits/headers.html#headers"}},[e._v("Security Headers")]),e._v(" section of the reference.")],1),e._v(" "),r("ul",[r("li",[r("p",[r("code",[e._v("Cache-Control")]),e._v(", "),r("code",[e._v("Pragma")]),e._v(", and "),r("code",[e._v("Expires")]),e._v(" - Can be set using the "),r("a",{attrs:{href:"#nsa-cache-control"}},[e._v("cache-control")]),e._v(" element.\nThis ensures that the browser does not cache your secured pages.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("Strict-Transport-Security")]),e._v(" - Can be set using the "),r("a",{attrs:{href:"#nsa-hsts"}},[e._v("hsts")]),e._v(" element.\nThis ensures that the browser automatically requests HTTPS for future requests.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("X-Frame-Options")]),e._v(" - Can be set using the "),r("a",{attrs:{href:"#nsa-frame-options"}},[e._v("frame-options")]),e._v(" element.\nThe "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Clickjacking#X-Frame-Options",target:"_blank",rel:"noopener noreferrer"}},[e._v("X-Frame-Options"),r("OutboundLink")],1),e._v(" header can be used to prevent clickjacking attacks.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("X-XSS-Protection")]),e._v(" - Can be set using the "),r("a",{attrs:{href:"#nsa-xss-protection"}},[e._v("xss-protection")]),e._v(" element.\nThe "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Cross-site_scripting",target:"_blank",rel:"noopener noreferrer"}},[e._v("X-XSS-Protection "),r("OutboundLink")],1),e._v(" header can be used by browser to do basic control.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("X-Content-Type-Options")]),e._v(" - Can be set using the "),r("a",{attrs:{href:"#nsa-content-type-options"}},[e._v("content-type-options")]),e._v(" element.\nThe "),r("a",{attrs:{href:"https://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx",target:"_blank",rel:"noopener noreferrer"}},[e._v("X-Content-Type-Options"),r("OutboundLink")],1),e._v(" header prevents Internet Explorer from MIME-sniffing a response away from the declared content-type.\nThis also applies to Google Chrome, when downloading extensions.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("Public-Key-Pinning")]),e._v(" or "),r("code",[e._v("Public-Key-Pinning-Report-Only")]),e._v(" - Can be set using the "),r("a",{attrs:{href:"#nsa-hpkp"}},[e._v("hpkp")]),e._v(" element.\nThis allows HTTPS websites to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("Content-Security-Policy")]),e._v(" or "),r("code",[e._v("Content-Security-Policy-Report-Only")]),e._v(" - Can be set using the "),r("a",{attrs:{href:"#nsa-content-security-policy"}},[e._v("content-security-policy")]),e._v(" element."),r("a",{attrs:{href:"https://www.w3.org/TR/CSP2/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Content Security Policy (CSP)"),r("OutboundLink")],1),e._v(" is a mechanism that web applications can leverage to mitigate content injection vulnerabilities, such as cross-site scripting (XSS).")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("Referrer-Policy")]),e._v(" - Can be set using the "),r("a",{attrs:{href:"#nsa-referrer-policy"}},[e._v("referrer-policy")]),e._v(" element, "),r("a",{attrs:{href:"https://www.w3.org/TR/referrer-policy/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Referrer-Policy"),r("OutboundLink")],1),e._v(" is a mechanism that web applications can leverage to manage the referrer field, which contains the last page the user was on.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("Feature-Policy")]),e._v(" - Can be set using the "),r("a",{attrs:{href:"#nsa-feature-policy"}},[e._v("feature-policy")]),e._v(" element, "),r("a",{attrs:{href:"https://wicg.github.io/feature-policy/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Feature-Policy"),r("OutboundLink")],1),e._v(" is a mechanism that allows web developers to selectively enable, disable, and modify the behavior of certain APIs and web features in the browser.")])])]),e._v(" "),r("h3",{attrs:{id:"headers-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#headers-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("p",[e._v("The attributes on the "),r("code",[e._v("")]),e._v(" element control the headers element.")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("defaults-disabled")]),e._v("Optional attribute that specifies to disable the default Spring Security’s HTTP response headers.\nThe default is false (the default headers are included).")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("disabled")]),e._v("Optional attribute that specifies to disable Spring Security’s HTTP response headers.\nThe default is false (the headers are enabled).")])])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-headers"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-headers"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-headers"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-headers"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("p",[r("a",{attrs:{href:"#nsa-cache-control"}},[e._v("cache-control")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-content-security-policy"}},[e._v("content-security-policy")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-content-type-options"}},[e._v("content-type-options")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-feature-policy"}},[e._v("feature-policy")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-frame-options"}},[e._v("frame-options")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-header"}},[e._v("header")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-hpkp"}},[e._v("hpkp")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-hsts"}},[e._v("hsts")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-permissions-policy"}},[e._v("permission-policy")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-referrer-policy"}},[e._v("referrer-policy")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-xss-protection"}},[e._v("xss-protection")])])])]),e._v(" "),r("h2",{attrs:{id:"cache-control"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#cache-control"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds "),r("code",[e._v("Cache-Control")]),e._v(", "),r("code",[e._v("Pragma")]),e._v(", and "),r("code",[e._v("Expires")]),e._v(" headers to ensure that the browser does not cache your secured pages.")]),e._v(" "),r("h3",{attrs:{id:"cache-control-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#cache-control-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("disabled")]),e._v("Specifies if Cache Control should be disabled.\nDefault false.")])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-cache-control"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-cache-control"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"hsts"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#hsts"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("When enabled adds the "),r("a",{attrs:{href:"https://tools.ietf.org/html/rfc6797",target:"_blank",rel:"noopener noreferrer"}},[e._v("Strict-Transport-Security"),r("OutboundLink")],1),e._v(" header to the response for any secure request.\nThis allows the server to instruct browsers to automatically use HTTPS for future requests.")]),e._v(" "),r("h3",{attrs:{id:"hsts-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#hsts-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("disabled")]),e._v("Specifies if Strict-Transport-Security should be disabled.\nDefault false.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("include-sub-domains")]),e._v("Specifies if subdomains should be included.\nDefault true.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("max-age-seconds")]),e._v("Specifies the maximum amount of time the host should be considered a Known HSTS Host.\nDefault one year.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("request-matcher-ref")]),e._v("The RequestMatcher instance to be used to determine if the header should be set.\nDefault is if HttpServletRequest.isSecure() is true.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("preload")]),e._v("Specifies if preload should be included.\nDefault false.")])])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-hsts"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-hsts"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"hpkp"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#hpkp"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("When enabled adds the "),r("a",{attrs:{href:"https://tools.ietf.org/html/rfc7469",target:"_blank",rel:"noopener noreferrer"}},[e._v("Public Key Pinning Extension for HTTP"),r("OutboundLink")],1),e._v(" header to the response for any secure request.\nThis allows HTTPS websites to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates.")]),e._v(" "),r("h3",{attrs:{id:"hpkp-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#hpkp-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("disabled")]),e._v("Specifies if HTTP Public Key Pinning (HPKP) should be disabled.\nDefault true.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("include-sub-domains")]),e._v("Specifies if subdomains should be included.\nDefault false.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("max-age-seconds")]),e._v("Sets the value for the max-age directive of the Public-Key-Pins header.\nDefault 60 days.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("report-only")]),e._v("Specifies if the browser should only report pin validation failures.\nDefault true.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("report-uri")]),e._v("Specifies the URI to which the browser should report pin validation failures.")])])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-hpkp"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-hpkp"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"pins"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#pins"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("The list of pins")]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-pins"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-pins"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-pin"}},[e._v("pin")])])]),e._v(" "),r("h2",{attrs:{id:"pin"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#pin"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("A pin is specified using the base64-encoded SPKI fingerprint as value and the cryptographic hash algorithm as attribute")]),e._v(" "),r("h3",{attrs:{id:"pin-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#pin-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("algorithm")]),e._v("The cryptographic hash algorithm.\nDefault is SHA256.")])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-pin"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-pin"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-pins"}},[e._v("pins")])])]),e._v(" "),r("h2",{attrs:{id:"content-security-policy"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#content-security-policy"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("When enabled adds the "),r("a",{attrs:{href:"https://www.w3.org/TR/CSP2/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Content Security Policy (CSP)"),r("OutboundLink")],1),e._v(" header to the response.\nCSP is a mechanism that web applications can leverage to mitigate content injection vulnerabilities, such as cross-site scripting (XSS).")]),e._v(" "),r("h3",{attrs:{id:"content-security-policy-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#content-security-policy-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("policy-directives")]),e._v("The security policy directive(s) for the Content-Security-Policy header or if report-only is set to true, then the Content-Security-Policy-Report-Only header is used.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("report-only")]),e._v("Set to true, to enable the Content-Security-Policy-Report-Only header for reporting policy violations only.\nDefaults to false.")])])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-content-security-policy"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-content-security-policy"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"referrer-policy"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#referrer-policy"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("When enabled adds the "),r("a",{attrs:{href:"https://www.w3.org/TR/referrer-policy/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Referrer Policy"),r("OutboundLink")],1),e._v(" header to the response.")]),e._v(" "),r("h3",{attrs:{id:"referrer-policy-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#referrer-policy-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("policy")]),e._v('The policy for the Referrer-Policy header.\nDefault "no-referrer".')])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-referrer-policy"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-referrer-policy"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"feature-policy"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#feature-policy"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("When enabled adds the "),r("a",{attrs:{href:"https://wicg.github.io/feature-policy/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Feature Policy"),r("OutboundLink")],1),e._v(" header to the response.")]),e._v(" "),r("h3",{attrs:{id:"feature-policy-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#feature-policy-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("policy-directives")]),e._v("The security policy directive(s) for the Feature-Policy header.")])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-feature-policy"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-feature-policy"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"frame-options"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#frame-options"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("When enabled adds the "),r("a",{attrs:{href:"https://tools.ietf.org/html/draft-ietf-websec-x-frame-options",target:"_blank",rel:"noopener noreferrer"}},[e._v("X-Frame-Options header"),r("OutboundLink")],1),e._v(" to the response, this allows newer browsers to do some security checks and prevent "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Clickjacking",target:"_blank",rel:"noopener noreferrer"}},[e._v("clickjacking"),r("OutboundLink")],1),e._v(" attacks.")]),e._v(" "),r("h3",{attrs:{id:"frame-options-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#frame-options-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("disabled")]),e._v("If disabled, the X-Frame-Options header will not be included.\nDefault false.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("policy")])]),e._v(" "),r("ul",[r("li",[r("p",[r("code",[e._v("DENY")]),e._v(" The page cannot be displayed in a frame, regardless of the site attempting to do so.\nThis is the default when frame-options-policy is specified.")])]),e._v(" "),r("li",[r("p",[r("code",[e._v("SAMEORIGIN")]),e._v(" The page can only be displayed in a frame on the same origin as the page itself")])])]),e._v(" "),r("p",[e._v("In other words, if you specify DENY, not only will attempts to load the page in a frame fail when loaded from other sites, attempts to do so will fail when loaded from the same site.\nOn the other hand, if you specify SAMEORIGIN, you can still use the page in a frame as long as the site including it in a frame it is the same as the one serving the page.")])])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-frame-options"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-frame-options"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"permissions-policy"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#permissions-policy"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds the "),r("a",{attrs:{href:"https://w3c.github.io/webappsec-permissions-policy/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Permissions-Policy header"),r("OutboundLink")],1),e._v(" to the response.")]),e._v(" "),r("h3",{attrs:{id:"permissions-policy-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#permissions-policy-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("policy")]),e._v("The policy value to write for the "),r("code",[e._v("Permissions-Policy")]),e._v(" header")])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-permissions-policy"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-permissions-policy"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"xss-protection"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#xss-protection"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds the "),r("a",{attrs:{href:"https://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-iv-the-xss-filter.aspx",target:"_blank",rel:"noopener noreferrer"}},[e._v("X-XSS-Protection header"),r("OutboundLink")],1),e._v(" to the response to assist in protecting against "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Cross-site_scripting#Non-Persistent",target:"_blank",rel:"noopener noreferrer"}},[e._v("reflected / Type-1 Cross-Site Scripting (XSS)"),r("OutboundLink")],1),e._v(" attacks.\nThis is in no-way a full protection to XSS attacks!")]),e._v(" "),r("h3",{attrs:{id:"xss-protection-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#xss-protection-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("xss-protection-disabled")]),e._v("Do not include the header for "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Cross-site_scripting#Non-Persistent",target:"_blank",rel:"noopener noreferrer"}},[e._v("reflected / Type-1 Cross-Site Scripting (XSS)"),r("OutboundLink")],1),e._v(" protection.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("xss-protection-enabled")]),e._v("Explicitly enable or disable "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Cross-site_scripting#Non-Persistent",target:"_blank",rel:"noopener noreferrer"}},[e._v("reflected / Type-1 Cross-Site Scripting (XSS)"),r("OutboundLink")],1),e._v(" protection.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("xss-protection-block")]),e._v("When true and xss-protection-enabled is true, adds mode=block to the header.\nThis indicates to the browser that the page should not be loaded at all.\nWhen false and xss-protection-enabled is true, the page will still be rendered when an reflected attack is detected but the response will be modified to protect against the attack.\nNote that there are sometimes ways of bypassing this mode which can often times make blocking the page more desirable.")])])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-xss-protection"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-xss-protection"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"content-type-options"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#content-type-options"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Add the X-Content-Type-Options header with the value of nosniff to the response.\nThis "),r("a",{attrs:{href:"https://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx",target:"_blank",rel:"noopener noreferrer"}},[e._v("disables MIME-sniffing"),r("OutboundLink")],1),e._v(" for IE8+ and Chrome extensions.")]),e._v(" "),r("h3",{attrs:{id:"content-type-options-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#content-type-options-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("disabled")]),e._v("Specifies if Content Type Options should be disabled.\nDefault false.")])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-content-type-options"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-content-type-options"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"header"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#header"}},[e._v("#")]),e._v("
")]),e._v(" "),r("p",[e._v("Add additional headers to the response, both the name and value need to be specified.")]),e._v(" "),r("h3",{attrs:{id:"header-attributes-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#header-attributes-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("header-name")]),e._v("The "),r("code",[e._v("name")]),e._v(" of the header.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("value")]),e._v("The "),r("code",[e._v("value")]),e._v(" of the header to add.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("ref")]),e._v("Reference to a custom implementation of the "),r("code",[e._v("HeaderWriter")]),e._v(" interface.")])])]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-header"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-header"}},[e._v("#")]),e._v(" Parent Elements of
")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-headers"}},[e._v("headers")])])]),e._v(" "),r("h2",{attrs:{id:"anonymous"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#anonymous"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds an "),r("code",[e._v("AnonymousAuthenticationFilter")]),e._v(" to the stack and an "),r("code",[e._v("AnonymousAuthenticationProvider")]),e._v(".\nRequired if you are using the "),r("code",[e._v("IS_AUTHENTICATED_ANONYMOUSLY")]),e._v(" attribute.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-anonymous"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-anonymous"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"anonymous-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#anonymous-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("enabled")]),e._v('With the default namespace setup, the anonymous "authentication" facility is automatically enabled.\nYou can disable it using this property.')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("granted-authority")]),e._v("The granted authority that should be assigned to the anonymous request.\nCommonly this is used to assign the anonymous request particular roles, which can subsequently be used in authorization decisions.\nIf unset, defaults to "),r("code",[e._v("ROLE_ANONYMOUS")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("key")]),e._v("The key shared between the provider and filter.\nThis generally does not need to be set.\nIf unset, it will default to a secure randomly generated value.\nThis means setting this value can improve startup time when using the anonymous functionality since secure random values can take a while to be generated.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("username")]),e._v("The username that should be assigned to the anonymous request.\nThis allows the principal to be identified, which may be important for logging and auditing.\nif unset, defaults to "),r("code",[e._v("anonymousUser")]),e._v(".")])])]),e._v(" "),r("h2",{attrs:{id:"csrf"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#csrf"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("This element will add "),r("a",{attrs:{href:"https://en.wikipedia.org/wiki/Cross-site_request_forgery",target:"_blank",rel:"noopener noreferrer"}},[e._v("Cross Site Request Forger (CSRF)"),r("OutboundLink")],1),e._v(' protection to the application.\nIt also updates the default RequestCache to only replay "GET" requests upon successful authentication.\nAdditional information can be found in the '),r("RouterLink",{attrs:{to:"/features/exploits/csrf.html#csrf"}},[e._v("Cross Site Request Forgery (CSRF)")]),e._v(" section of the reference.")],1),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-csrf"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-csrf"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"csrf-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#csrf-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("disabled")]),e._v("Optional attribute that specifies to disable Spring Security’s CSRF protection.\nThe default is false (CSRF protection is enabled).\nIt is highly recommended to leave CSRF protection enabled.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("token-repository-ref")]),e._v("The CsrfTokenRepository to use.\nThe default is "),r("code",[e._v("HttpSessionCsrfTokenRepository")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("request-matcher-ref")]),e._v('The RequestMatcher instance to be used to determine if CSRF should be applied.\nDefault is any HTTP method except "GET", "TRACE", "HEAD", "OPTIONS".')])])]),e._v(" "),r("h2",{attrs:{id:"custom-filter"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#custom-filter"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("This element is used to add a filter to the filter chain.\nIt doesn’t create any additional beans but is used to select a bean of type "),r("code",[e._v("javax.servlet.Filter")]),e._v(" which is already defined in the application context and add that at a particular position in the filter chain maintained by Spring Security.\nFull details can be found in the "),r("RouterLink",{attrs:{to:"/configuration/xml-namespace.html#ns-custom-filters"}},[e._v(" namespace chapter")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-custom-filter"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-custom-filter"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"custom-filter-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#custom-filter-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("after")]),e._v("The filter immediately after which the custom-filter should be placed in the chain.\nThis 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.\nThe filter names map to specific Spring Security implementation filters.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("before")]),e._v("The filter immediately before which the custom-filter should be placed in the chain")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("position")]),e._v("The explicit position at which the custom-filter should be placed in the chain.\nUse if you are replacing a standard filter.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("ref")]),e._v("Defines a reference to a Spring bean that implements "),r("code",[e._v("Filter")]),e._v(".")])])]),e._v(" "),r("h2",{attrs:{id:"expression-handler"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#expression-handler"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Defines the "),r("code",[e._v("SecurityExpressionHandler")]),e._v(" instance which will be used if expression-based access-control is enabled.\nA default implementation (with no ACL support) will be used if not supplied.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-expression-handler"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-expression-handler"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("p",[r("RouterLink",{attrs:{to:"/en/spring-security/method-security.html#nsa-global-method-security"}},[e._v("global-method-security")])],1)]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("li",[r("p",[r("RouterLink",{attrs:{to:"/en/spring-security/method-security.html#nsa-method-security"}},[e._v("method-security")])],1)]),e._v(" "),r("li",[r("p",[r("RouterLink",{attrs:{to:"/en/spring-security/websocket.html#nsa-websocket-message-broker"}},[e._v("websocket-message-broker")])],1)])]),e._v(" "),r("h3",{attrs:{id:"expression-handler-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#expression-handler-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("ref")]),e._v("Defines a reference to a Spring bean that implements "),r("code",[e._v("SecurityExpressionHandler")]),e._v(".")])]),e._v(" "),r("h2",{attrs:{id:"form-login"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#form-login"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Used to add an "),r("code",[e._v("UsernamePasswordAuthenticationFilter")]),e._v(" to the filter stack and an "),r("code",[e._v("LoginUrlAuthenticationEntryPoint")]),e._v(' to the application context to provide authentication on demand.\nThis will always take precedence over other namespace-created entry points.\nIf no attributes are supplied, a login page will be generated automatically at the URL "/login" '),r("sup",{staticClass:"footnote"},[e._v("["),r("a",{staticClass:"footnote",attrs:{id:"_footnoteref_2",href:"#_footnotedef_2",title:"View footnote."}},[e._v("2")]),e._v("]")]),e._v(" The behaviour can be customized using the "),r("a",{attrs:{href:"#nsa-form-login-attributes"}},[r("code",[e._v("")]),e._v(" Attributes")]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-form-login"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-form-login"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"form-login-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#form-login-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("always-use-default-target")]),e._v("If set to "),r("code",[e._v("true")]),e._v(", the user will always start at the value given by "),r("a",{attrs:{href:"#nsa-form-login-default-target-url"}},[e._v("default-target-url")]),e._v(", regardless of how they arrived at the login page.\nMaps to the "),r("code",[e._v("alwaysUseDefaultTargetUrl")]),e._v(" property of "),r("code",[e._v("UsernamePasswordAuthenticationFilter")]),e._v(".\nDefault value is "),r("code",[e._v("false")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-details-source-ref")]),e._v("Reference to an "),r("code",[e._v("AuthenticationDetailsSource")]),e._v(" which will be used by the authentication filter")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-failure-handler-ref")]),e._v("Can be used as an alternative to "),r("a",{attrs:{href:"#nsa-form-login-authentication-failure-url"}},[e._v("authentication-failure-url")]),e._v(", giving you full control over the navigation flow after an authentication failure.\nThe value should be the name of an "),r("code",[e._v("AuthenticationFailureHandler")]),e._v(" bean in the application context.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-failure-url")]),e._v("Maps to the "),r("code",[e._v("authenticationFailureUrl")]),e._v(" property of "),r("code",[e._v("UsernamePasswordAuthenticationFilter")]),e._v(".\nDefines the URL the browser will be redirected to on login failure.\nDefaults to "),r("code",[e._v("/login?error")]),e._v(", which will be automatically handled by the automatic login page generator, re-rendering the login page with an error message.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-success-handler-ref")]),e._v("This can be used as an alternative to "),r("a",{attrs:{href:"#nsa-form-login-default-target-url"}},[e._v("default-target-url")]),e._v(" and "),r("a",{attrs:{href:"#nsa-form-login-always-use-default-target"}},[e._v("always-use-default-target")]),e._v(", giving you full control over the navigation flow after a successful authentication.\nThe value should be the name of an "),r("code",[e._v("AuthenticationSuccessHandler")]),e._v(" bean in the application context.\nBy default, an implementation of "),r("code",[e._v("SavedRequestAwareAuthenticationSuccessHandler")]),e._v(" is used and injected with the "),r("a",{attrs:{href:"#nsa-form-login-default-target-url"}},[e._v("default-target-url ")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("default-target-url")]),e._v("Maps to the "),r("code",[e._v("defaultTargetUrl")]),e._v(" property of "),r("code",[e._v("UsernamePasswordAuthenticationFilter")]),e._v('.\nIf not set, the default value is "/" (the application root).\nA 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.')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("login-page")]),e._v("The URL that should be used to render the login page.\nMaps to the "),r("code",[e._v("loginFormUrl")]),e._v(" property of the "),r("code",[e._v("LoginUrlAuthenticationEntryPoint")]),e._v('.\nDefaults to "/login".')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("login-processing-url")]),e._v("Maps to the "),r("code",[e._v("filterProcessesUrl")]),e._v(" property of "),r("code",[e._v("UsernamePasswordAuthenticationFilter")]),e._v('.\nThe default value is "/login".')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("password-parameter")]),e._v('The name of the request parameter which contains the password.\nDefaults to "password".')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("username-parameter")]),e._v('The name of the request parameter which contains the username.\nDefaults to "username".')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-success-forward-url")]),e._v("Maps a "),r("code",[e._v("ForwardAuthenticationSuccessHandler")]),e._v(" to "),r("code",[e._v("authenticationSuccessHandler")]),e._v(" property of "),r("code",[e._v("UsernamePasswordAuthenticationFilter")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-failure-forward-url")]),e._v("Maps a "),r("code",[e._v("ForwardAuthenticationFailureHandler")]),e._v(" to "),r("code",[e._v("authenticationFailureHandler")]),e._v(" property of "),r("code",[e._v("UsernamePasswordAuthenticationFilter")]),e._v(".")])])]),e._v(" "),r("h2",{attrs:{id:"oauth2-login"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#oauth2-login"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("The "),r("RouterLink",{attrs:{to:"/oauth2/login/index.html#oauth2login"}},[e._v("OAuth 2.0 Login")]),e._v(" feature configures authentication support using an OAuth 2.0 and/or OpenID Connect 1.0 Provider.")],1),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-oauth2-login"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-oauth2-login"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"oauth2-login-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#oauth2-login-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("client-registration-repository-ref")]),e._v("Reference to the "),r("code",[e._v("ClientRegistrationRepository")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authorized-client-repository-ref")]),e._v("Reference to the "),r("code",[e._v("OAuth2AuthorizedClientRepository")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authorized-client-service-ref")]),e._v("Reference to the "),r("code",[e._v("OAuth2AuthorizedClientService")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authorization-request-repository-ref")]),e._v("Reference to the "),r("code",[e._v("AuthorizationRequestRepository")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authorization-request-resolver-ref")]),e._v("Reference to the "),r("code",[e._v("OAuth2AuthorizationRequestResolver")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("access-token-response-client-ref")]),e._v("Reference to the "),r("code",[e._v("OAuth2AccessTokenResponseClient")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("user-authorities-mapper-ref")]),e._v("Reference to the "),r("code",[e._v("GrantedAuthoritiesMapper")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("user-service-ref")]),e._v("Reference to the "),r("code",[e._v("OAuth2UserService")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("oidc-user-service-ref")]),e._v("Reference to the OpenID Connect "),r("code",[e._v("OAuth2UserService")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("login-processing-url")]),e._v("The URI where the filter processes authentication requests.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("login-page")]),e._v("The URI to send users to login.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-success-handler-ref")]),e._v("Reference to the "),r("code",[e._v("AuthenticationSuccessHandler")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-failure-handler-ref")]),e._v("Reference to the "),r("code",[e._v("AuthenticationFailureHandler")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("jwt-decoder-factory-ref")]),e._v("Reference to the "),r("code",[e._v("JwtDecoderFactory")]),e._v(" used by "),r("code",[e._v("OidcAuthorizationCodeAuthenticationProvider")]),e._v(".")])])]),e._v(" "),r("h2",{attrs:{id:"oauth2-client"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#oauth2-client"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Configures "),r("RouterLink",{attrs:{to:"/oauth2/client/index.html#oauth2client"}},[e._v("OAuth 2.0 Client")]),e._v(" support.")],1),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-oauth2-client"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-oauth2-client"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"oauth2-client-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#oauth2-client-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("client-registration-repository-ref")]),e._v("Reference to the "),r("code",[e._v("ClientRegistrationRepository")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authorized-client-repository-ref")]),e._v("Reference to the "),r("code",[e._v("OAuth2AuthorizedClientRepository")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authorized-client-service-ref")]),e._v("Reference to the "),r("code",[e._v("OAuth2AuthorizedClientService")]),e._v(".")])])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-oauth2-client"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-oauth2-client"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-authorization-code-grant"}},[e._v("authorization-code-grant")])])]),e._v(" "),r("h2",{attrs:{id:"authorization-code-grant"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#authorization-code-grant"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Configures "),r("RouterLink",{attrs:{to:"/oauth2/client/authorization-grants.html#oauth2Client-auth-grant-support"}},[e._v("OAuth 2.0 Authorization Code Grant")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-authorization-code-grant"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-authorization-code-grant"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-oauth2-client"}},[e._v("oauth2-client")])])]),e._v(" "),r("h3",{attrs:{id:"authorization-code-grant-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#authorization-code-grant-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("authorization-request-repository-ref")]),e._v("Reference to the "),r("code",[e._v("AuthorizationRequestRepository")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authorization-request-resolver-ref")]),e._v("Reference to the "),r("code",[e._v("OAuth2AuthorizationRequestResolver")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("access-token-response-client-ref")]),e._v("Reference to the "),r("code",[e._v("OAuth2AccessTokenResponseClient")]),e._v(".")])])]),e._v(" "),r("h2",{attrs:{id:"client-registrations"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#client-registrations"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("A container element for client(s) registered ("),r("RouterLink",{attrs:{to:"/oauth2/client/index.html#oauth2Client-client-registration"}},[e._v("ClientRegistration")]),e._v(") with an OAuth 2.0 or OpenID Connect 1.0 Provider.")],1),e._v(" "),r("h3",{attrs:{id:"child-elements-of-client-registrations"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-client-registrations"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("p",[r("a",{attrs:{href:"#nsa-client-registration"}},[e._v("client-registration")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-provider"}},[e._v("provider")])])])]),e._v(" "),r("h2",{attrs:{id:"client-registration"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#client-registration"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Represents a client registered with an OAuth 2.0 or OpenID Connect 1.0 Provider.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-client-registration"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-client-registration"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-client-registrations"}},[e._v("client-registrations")])])]),e._v(" "),r("h3",{attrs:{id:"client-registration-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#client-registration-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("registration-id")]),e._v("The ID that uniquely identifies the "),r("code",[e._v("ClientRegistration")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("client-id")]),e._v("The client identifier.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("client-secret")]),e._v("The client secret.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("client-authentication-method")]),e._v("The method used to authenticate the Client with the Provider.\nThe supported values are "),r("strong",[e._v("client_secret_basic")]),e._v(", "),r("strong",[e._v("client_secret_post")]),e._v(", "),r("strong",[e._v("private_key_jwt")]),e._v(", "),r("strong",[e._v("client_secret_jwt")]),e._v(" and "),r("strong",[e._v("none")]),e._v(" "),r("a",{attrs:{href:"https://tools.ietf.org/html/rfc6749#section-2.1",target:"_blank",rel:"noopener noreferrer"}},[e._v("(public clients)"),r("OutboundLink")],1),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authorization-grant-type")]),e._v("The OAuth 2.0 Authorization Framework defines four "),r("a",{attrs:{href:"https://tools.ietf.org/html/rfc6749#section-1.3",target:"_blank",rel:"noopener noreferrer"}},[e._v("Authorization Grant"),r("OutboundLink")],1),e._v(" types.\nThe supported values are "),r("code",[e._v("authorization_code")]),e._v(", "),r("code",[e._v("client_credentials")]),e._v(", "),r("code",[e._v("password")]),e._v(", as well as, extension grant type "),r("code",[e._v("urn:ietf:params:oauth:grant-type:jwt-bearer")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("redirect-uri")]),e._v("The client’s registered redirect URI that the "),r("em",[e._v("Authorization Server")]),e._v(" redirects the end-user’s user-agent to after the end-user has authenticated and authorized access to the client.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("scope")]),e._v("The scope(s) requested by the client during the Authorization Request flow, such as openid, email, or profile.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("client-name")]),e._v("A descriptive name used for the client.\nThe name may be used in certain scenarios, such as when displaying the name of the client in the auto-generated login page.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("provider-id")]),e._v("A reference to the associated provider. May reference a "),r("code",[e._v("")]),e._v(" element or use one of the common providers (google, github, facebook, okta).")])])]),e._v(" "),r("h2",{attrs:{id:"provider"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#provider"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("The configuration information for an OAuth 2.0 or OpenID Connect 1.0 Provider.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-provider"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-provider"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-client-registrations"}},[e._v("client-registrations")])])]),e._v(" "),r("h3",{attrs:{id:"provider-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#provider-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("provider-id")]),e._v("The ID that uniquely identifies the provider.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authorization-uri")]),e._v("The Authorization Endpoint URI for the Authorization Server.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("token-uri")]),e._v("The Token Endpoint URI for the Authorization Server.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("user-info-uri")]),e._v("The UserInfo Endpoint URI used to access the claims/attributes of the authenticated end-user.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("user-info-authentication-method")]),e._v("The authentication method used when sending the access token to the UserInfo Endpoint.\nThe supported values are "),r("strong",[e._v("header")]),e._v(", "),r("strong",[e._v("form")]),e._v(" and "),r("strong",[e._v("query")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("user-info-user-name-attribute")]),e._v("The name of the attribute returned in the UserInfo Response that references the Name or Identifier of the end-user.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("jwk-set-uri")]),e._v("The URI used to retrieve the "),r("a",{attrs:{href:"https://tools.ietf.org/html/rfc7517",target:"_blank",rel:"noopener noreferrer"}},[e._v("JSON Web Key (JWK)"),r("OutboundLink")],1),e._v(" Set from the Authorization Server, which contains the cryptographic key(s) used to verify the "),r("a",{attrs:{href:"https://tools.ietf.org/html/rfc7515",target:"_blank",rel:"noopener noreferrer"}},[e._v("JSON Web Signature (JWS)"),r("OutboundLink")],1),e._v(" of the ID Token and optionally the UserInfo Response.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("issuer-uri")]),e._v("The URI used to initially configure a "),r("code",[e._v("ClientRegistration")]),e._v(" using discovery of an OpenID Connect Provider’s "),r("a",{attrs:{href:"https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig",target:"_blank",rel:"noopener noreferrer"}},[e._v("Configuration endpoint"),r("OutboundLink")],1),e._v(" or an Authorization Server’s "),r("a",{attrs:{href:"https://tools.ietf.org/html/rfc8414#section-3",target:"_blank",rel:"noopener noreferrer"}},[e._v("Metadata endpoint"),r("OutboundLink")],1),e._v(".")])])]),e._v(" "),r("h2",{attrs:{id:"oauth2-resource-server"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#oauth2-resource-server"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds a "),r("code",[e._v("BearerTokenAuthenticationFilter")]),e._v(", "),r("code",[e._v("BearerTokenAuthenticationEntryPoint")]),e._v(", and "),r("code",[e._v("BearerTokenAccessDeniedHandler")]),e._v(" to the configuration.\nIn addition, either "),r("code",[e._v("")]),e._v(" or "),r("code",[e._v("")]),e._v(" must be specified.")]),e._v(" "),r("h3",{attrs:{id:"parents-elements-of-oauth2-resource-server"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parents-elements-of-oauth2-resource-server"}},[e._v("#")]),e._v(" Parents Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-oauth2-resource-server"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-oauth2-resource-server"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("p",[r("a",{attrs:{href:"#nsa-jwt"}},[e._v("jwt")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-opaque-token"}},[e._v("opaque-token")])])])]),e._v(" "),r("h3",{attrs:{id:"oauth2-resource-server-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#oauth2-resource-server-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("authentication-manager-resolver-ref")]),e._v("Reference to an "),r("code",[e._v("AuthenticationManagerResolver")]),e._v(" which will resolve the "),r("code",[e._v("AuthenticationManager")]),e._v(" at request time")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("bearer-token-resolver-ref")]),e._v("Reference to a "),r("code",[e._v("BearerTokenResolver")]),e._v(" which will retrieve the bearer token from the request")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("entry-point-ref")]),e._v("Reference to a "),r("code",[e._v("AuthenticationEntryPoint")]),e._v(" which will handle unauthorized requests")])])]),e._v(" "),r("h2",{attrs:{id:"jwt"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#jwt"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Represents an OAuth 2.0 Resource Server that will authorize JWTs")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-jwt"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-jwt"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-oauth2-resource-server"}},[e._v("oauth2-resource-server")])])]),e._v(" "),r("h3",{attrs:{id:"jwt-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#jwt-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("jwt-authentication-converter-ref")]),e._v("Reference to a "),r("code",[e._v("Converter")])])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("jwt-decoder-ref")]),e._v("Reference to a "),r("code",[e._v("JwtDecoder")]),e._v(". This is a larger component that overrides "),r("code",[e._v("jwk-set-uri")])])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("jwk-set-uri")]),e._v("The JWK Set Uri used to load signing verification keys from an OAuth 2.0 Authorization Server")])])]),e._v(" "),r("h2",{attrs:{id:"opaque-token"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#opaque-token"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Represents an OAuth 2.0 Resource Server that will authorize opaque tokens")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-opaque-token"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-opaque-token"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-oauth2-resource-server"}},[e._v("oauth2-resource-server")])])]),e._v(" "),r("h3",{attrs:{id:"opaque-token-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#opaque-token-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("introspector-ref")]),e._v("Reference to an "),r("code",[e._v("OpaqueTokenIntrospector")]),e._v(". This is a larger component that overrides "),r("code",[e._v("introspection-uri")]),e._v(", "),r("code",[e._v("client-id")]),e._v(", and "),r("code",[e._v("client-secret")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("introspection-uri")]),e._v("The Introspection Uri used to introspect the details of an opaque token. Should be accompanied with a "),r("code",[e._v("client-id")]),e._v(" and "),r("code",[e._v("client-secret")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("client-id")]),e._v("The Client Id to use for client authentication against the provided "),r("code",[e._v("introspection-uri")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("client-secret")]),e._v("The Client Secret to use for client authentication against the provided "),r("code",[e._v("introspection-uri")]),e._v(".")])])]),e._v(" "),r("h2",{attrs:{id:"http-basic"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#http-basic"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds a "),r("code",[e._v("BasicAuthenticationFilter")]),e._v(" and "),r("code",[e._v("BasicAuthenticationEntryPoint")]),e._v(" to the configuration.\nThe latter will only be used as the configuration entry point if form-based login is not enabled.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-http-basic"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-http-basic"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"http-basic-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#http-basic-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("authentication-details-source-ref")]),e._v("Reference to an "),r("code",[e._v("AuthenticationDetailsSource")]),e._v(" which will be used by the authentication filter")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("entry-point-ref")]),e._v("Sets the "),r("code",[e._v("AuthenticationEntryPoint")]),e._v(" which is used by the "),r("code",[e._v("BasicAuthenticationFilter")]),e._v(".")])])]),e._v(" "),r("h2",{attrs:{id:"http-firewall-element"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#http-firewall-element"}},[e._v("#")]),e._v(" Element")]),e._v(" "),r("p",[e._v("This is a top-level element which can be used to inject a custom implementation of "),r("code",[e._v("HttpFirewall")]),e._v(" into the "),r("code",[e._v("FilterChainProxy")]),e._v(" created by the namespace.\nThe default implementation should be suitable for most applications.")]),e._v(" "),r("h3",{attrs:{id:"http-firewall-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#http-firewall-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("ref")]),e._v("Defines a reference to a Spring bean that implements "),r("code",[e._v("HttpFirewall")]),e._v(".")])]),e._v(" "),r("h2",{attrs:{id:"intercept-url"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#intercept-url"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("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.\nIt is used to construct the "),r("code",[e._v("FilterInvocationSecurityMetadataSource")]),e._v(" used by the "),r("code",[e._v("FilterSecurityInterceptor")]),e._v(".\nIt is also responsible for configuring a "),r("code",[e._v("ChannelProcessingFilter")]),e._v(" if particular URLs need to be accessed by HTTPS, for example.\nWhen matching the specified patterns against an incoming request, the matching is done in the order in which the elements are declared.\nSo the most specific patterns should come first and the most general should come last.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-intercept-url"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-intercept-url"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("p",[r("a",{attrs:{href:"#nsa-filter-security-metadata-source"}},[e._v("filter-security-metadata-source")])])]),e._v(" "),r("li",[r("p",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])])]),e._v(" "),r("h3",{attrs:{id:"intercept-url-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#intercept-url-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("access")]),e._v("Lists the access attributes which will be stored in the "),r("code",[e._v("FilterInvocationSecurityMetadataSource")]),e._v(" for the defined URL pattern/method combination.\nThis should be a comma-separated list of the security configuration attributes (such as role names).")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("method")]),e._v("The HTTP Method which will be used in combination with the pattern and servlet path (optional) to match an incoming request.\nIf omitted, any method will match.\nIf an identical pattern is specified with and without a method, the method-specific match will take precedence.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("pattern")]),e._v("The pattern which defines the URL path.\nThe content will depend on the "),r("code",[e._v("request-matcher")]),e._v(" attribute from the containing http element, so will default to ant path syntax.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("request-matcher-ref")]),e._v("A reference to a "),r("code",[e._v("RequestMatcher")]),e._v(" that will be used to determine if this "),r("code",[e._v("")]),e._v(" is used.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("requires-channel")]),e._v('Can be "http" or "https" depending on whether a particular URL pattern should be accessed over HTTP or HTTPS respectively.\nAlternatively the value "any" can be used when there is no preference.\nIf this attribute is present on any '),r("code",[e._v("")]),e._v(" element, then a "),r("code",[e._v("ChannelProcessingFilter")]),e._v(" will be added to the filter stack and its additional dependencies added to the application context.")])])]),e._v(" "),r("p",[e._v("If a "),r("code",[e._v("")]),e._v(" configuration is added, this will be used to by the "),r("code",[e._v("SecureChannelProcessor")]),e._v(" and "),r("code",[e._v("InsecureChannelProcessor")]),e._v(" beans to determine the ports used for redirecting to HTTP/HTTPS.")]),e._v(" "),r("table",[r("thead",[r("tr",[r("th"),e._v(" "),r("th",[e._v("This property is invalid for "),r("a",{attrs:{href:"#nsa-filter-security-metadata-source"}},[e._v("filter-security-metadata-source")])])])]),e._v(" "),r("tbody")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("servlet-path")]),e._v("The servlet path which will be used in combination with the pattern and HTTP method to match an incoming request.\nThis attribute is only applicable when "),r("a",{attrs:{href:"#nsa-http-request-matcher"}},[e._v("request-matcher")]),e._v(" is 'mvc'.\nIn addition, the value is only required in the following 2 use cases: 1) There are 2 or more "),r("code",[e._v("HttpServlet")]),e._v(" 's registered in the "),r("code",[e._v("ServletContext")]),e._v(" that have mappings starting with "),r("code",[e._v("'/'")]),e._v(" and are different; 2) The pattern starts with the same value of a registered "),r("code",[e._v("HttpServlet")]),e._v(" path, excluding the default (root) "),r("code",[e._v("HttpServlet")]),e._v(" "),r("code",[e._v("'/'")]),e._v(".")])]),e._v(" "),r("table",[r("thead",[r("tr",[r("th"),e._v(" "),r("th",[e._v("This property is invalid for "),r("a",{attrs:{href:"#nsa-filter-security-metadata-source"}},[e._v("filter-security-metadata-source")])])])]),e._v(" "),r("tbody")]),e._v(" "),r("h2",{attrs:{id:"jee"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#jee"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds a J2eePreAuthenticatedProcessingFilter to the filter chain to provide integration with container authentication.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-jee"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-jee"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"jee-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#jee-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("mappable-roles")]),e._v("A comma-separate list of roles to look for in the incoming HttpServletRequest.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("user-service-ref")]),e._v("A reference to a user-service (or UserDetailsService bean) Id")])])]),e._v(" "),r("h2",{attrs:{id:"logout"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#logout"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds a "),r("code",[e._v("LogoutFilter")]),e._v(" to the filter stack.\nThis is configured with a "),r("code",[e._v("SecurityContextLogoutHandler")]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-logout"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-logout"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"logout-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#logout-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("delete-cookies")]),e._v("A comma-separated list of the names of cookies which should be deleted when the user logs out.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("invalidate-session")]),e._v("Maps to the "),r("code",[e._v("invalidateHttpSession")]),e._v(" of the "),r("code",[e._v("SecurityContextLogoutHandler")]),e._v('.\nDefaults to "true", so the session will be invalidated on logout.')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("logout-success-url")]),e._v("The destination URL which the user will be taken to after logging out.\nDefaults to /?logout (i.e. /login?logout)")]),e._v(" "),r("p",[e._v("Setting this attribute will inject the "),r("code",[e._v("SessionManagementFilter")]),e._v(" with a "),r("code",[e._v("SimpleRedirectInvalidSessionStrategy")]),e._v(" configured with the attribute value.\nWhen an invalid session ID is submitted, the strategy will be invoked, redirecting to the configured URL.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("logout-url")]),e._v('The URL which will cause a logout (i.e. which will be processed by the filter).\nDefaults to "/logout".')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("success-handler-ref")]),e._v("May be used to supply an instance of "),r("code",[e._v("LogoutSuccessHandler")]),e._v(" which will be invoked to control the navigation after logging out.")])])]),e._v(" "),r("h2",{attrs:{id:"openid-login"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#openid-login"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Similar to "),r("code",[e._v("")]),e._v(" and has the same attributes.\nThe default value for "),r("code",[e._v("login-processing-url")]),e._v(' is "/login/openid".\nAn '),r("code",[e._v("OpenIDAuthenticationFilter")]),e._v(" and "),r("code",[e._v("OpenIDAuthenticationProvider")]),e._v(" will be registered.\nThe latter requires a reference to a "),r("code",[e._v("UserDetailsService")]),e._v(".\nAgain, this can be specified by "),r("code",[e._v("id")]),e._v(", using the "),r("code",[e._v("user-service-ref")]),e._v(" attribute, or will be located automatically in the application context.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-openid-login"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-openid-login"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"openid-login-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#openid-login-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("always-use-default-target")]),e._v("Whether the user should always be redirected to the default-target-url after login.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-details-source-ref")]),e._v("Reference to an AuthenticationDetailsSource which will be used by the authentication filter")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-failure-handler-ref")]),e._v("Reference to an AuthenticationFailureHandler bean which should be used to handle a failed authentication request.\nShould not be used in combination with authentication-failure-url as the implementation should always deal with navigation to the subsequent destination")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-failure-url")]),e._v("The URL for the login failure page.\nIf no login failure URL is specified, Spring Security will automatically create a failure login URL at /login?login_error and a corresponding filter to render that login failure URL when requested.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-success-forward-url")]),e._v("Maps a "),r("code",[e._v("ForwardAuthenticationSuccessHandler")]),e._v(" to "),r("code",[e._v("authenticationSuccessHandler")]),e._v(" property of "),r("code",[e._v("UsernamePasswordAuthenticationFilter")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-failure-forward-url")]),e._v("Maps a "),r("code",[e._v("ForwardAuthenticationFailureHandler")]),e._v(" to "),r("code",[e._v("authenticationFailureHandler")]),e._v(" property of "),r("code",[e._v("UsernamePasswordAuthenticationFilter")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("authentication-success-handler-ref")]),e._v("Reference to an AuthenticationSuccessHandler bean which should be used to handle a successful authentication request.\nShould not be used in combination with "),r("a",{attrs:{href:"#nsa-openid-login-default-target-url"}},[e._v("default-target-url")]),e._v(" (or "),r("a",{attrs:{href:"#nsa-openid-login-always-use-default-target"}},[e._v("always-use-default-target")]),e._v(") as the implementation should always deal with navigation to the subsequent destination")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("default-target-url")]),e._v("The URL that will be redirected to after successful authentication, if the user’s previous action could not be resumed.\nThis generally happens if the user visits a login page without having first requested a secured operation that triggers authentication.\nIf unspecified, defaults to the root of the application.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("login-page")]),e._v("The URL for the login page.\nIf no login URL is specified, Spring Security will automatically create a login URL at /login and a corresponding filter to render that login URL when requested.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("login-processing-url")]),e._v("The URL that the login form is posted to.\nIf unspecified, it defaults to /login.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("password-parameter")]),e._v('The name of the request parameter which contains the password.\nDefaults to "password".')])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("user-service-ref")]),e._v("A reference to a user-service (or UserDetailsService bean) Id")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("username-parameter")]),e._v('The name of the request parameter which contains the username.\nDefaults to "username".')])])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-openid-login"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-openid-login"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-attribute-exchange"}},[e._v("attribute-exchange")])])]),e._v(" "),r("h2",{attrs:{id:"attribute-exchange"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#attribute-exchange"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("The "),r("code",[e._v("attribute-exchange")]),e._v(" element defines the list of attributes which should be requested from the identity provider.\nAn example can be found in the "),r("RouterLink",{attrs:{to:"/authentication/openid.html#servlet-openid"}},[e._v("OpenID Support")]),e._v(" section of the namespace configuration chapter.\nMore than one can be used, in which case each must have an "),r("code",[e._v("identifier-match")]),e._v(" attribute, containing a regular expression which is matched against the supplied OpenID identifier.\nThis allows different attribute lists to be fetched from different providers (Google, Yahoo etc).")],1),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-attribute-exchange"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-attribute-exchange"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-openid-login"}},[e._v("openid-login")])])]),e._v(" "),r("h3",{attrs:{id:"attribute-exchange-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#attribute-exchange-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("identifier-match")]),e._v("A regular expression which will be compared against the claimed identity, when deciding which attribute-exchange configuration to use during authentication.")])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-attribute-exchange"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-attribute-exchange"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-openid-attribute"}},[e._v("openid-attribute")])])]),e._v(" "),r("h2",{attrs:{id:"openid-attribute"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#openid-attribute"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Attributes used when making an OpenID AX "),r("a",{attrs:{href:"https://openid.net/specs/openid-attribute-exchange-1_0.html#fetch_request",target:"_blank",rel:"noopener noreferrer"}},[e._v(" Fetch Request"),r("OutboundLink")],1)]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-openid-attribute"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-openid-attribute"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-attribute-exchange"}},[e._v("attribute-exchange")])])]),e._v(" "),r("h3",{attrs:{id:"openid-attribute-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#openid-attribute-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("count")]),e._v("Specifies the number of attributes that you wish to get back.\nFor example, return 3 emails.\nThe default value is 1.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("name")]),e._v("Specifies the name of the attribute that you wish to get back.\nFor example, email.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("required")]),e._v("Specifies if this attribute is required to the OP, but does not error out if the OP does not return the attribute.\nDefault is false.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("type")]),e._v("Specifies the attribute type.\nFor example, "),r("a",{attrs:{href:"https://axschema.org/contact/email",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://axschema.org/contact/email"),r("OutboundLink")],1),e._v(".\nSee your OP’s documentation for valid attribute types.")])])]),e._v(" "),r("h2",{attrs:{id:"password-management"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#password-management"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("This element configures password management.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-password-management"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-password-management"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"password-management-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#password-management-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("change-password-page")]),e._v('The change password page. Defaults to "/change-password".')])]),e._v(" "),r("h2",{attrs:{id:"port-mappings"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#port-mappings"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("By default, an instance of "),r("code",[e._v("PortMapperImpl")]),e._v(" will be added to the configuration for use in redirecting to secure and insecure URLs.\nThis element can optionally be used to override the default mappings which that class defines.\nEach child "),r("code",[e._v("")]),e._v(" element defines a pair of HTTP:HTTPS ports.\nThe default mappings are 80:443 and 8080:8443.\nAn example of overriding these can be found in "),r("RouterLink",{attrs:{to:"/exploits/http.html#servlet-http-redirect"}},[e._v("Redirect to HTTPS")]),e._v(".")],1),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-port-mappings"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-port-mappings"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-port-mappings"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-port-mappings"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-port-mapping"}},[e._v("port-mapping")])])]),e._v(" "),r("h2",{attrs:{id:"port-mapping"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#port-mapping"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Provides a method to map http ports to https ports when forcing a redirect.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-port-mapping"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-port-mapping"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-port-mappings"}},[e._v("port-mappings")])])]),e._v(" "),r("h3",{attrs:{id:"port-mapping-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#port-mapping-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("http")]),e._v("The http port to use.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("https")]),e._v("The https port to use.")])])]),e._v(" "),r("h2",{attrs:{id:"remember-me"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#remember-me"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds the "),r("code",[e._v("RememberMeAuthenticationFilter")]),e._v(" to the stack.\nThis in turn will be configured with either a "),r("code",[e._v("TokenBasedRememberMeServices")]),e._v(", a "),r("code",[e._v("PersistentTokenBasedRememberMeServices")]),e._v(" or a user-specified bean implementing "),r("code",[e._v("RememberMeServices")]),e._v(" depending on the attribute settings.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-remember-me"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-remember-me"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"remember-me-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#remember-me-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("authentication-success-handler-ref")]),e._v("Sets the "),r("code",[e._v("authenticationSuccessHandler")]),e._v(" property on the "),r("code",[e._v("RememberMeAuthenticationFilter")]),e._v(" if custom navigation is required.\nThe value should be the name of a "),r("code",[e._v("AuthenticationSuccessHandler")]),e._v(" bean in the application context.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("data-source-ref")]),e._v("A reference to a "),r("code",[e._v("DataSource")]),e._v(" bean.\nIf this is set, "),r("code",[e._v("PersistentTokenBasedRememberMeServices")]),e._v(" will be used and configured with a "),r("code",[e._v("JdbcTokenRepositoryImpl")]),e._v(" instance.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("remember-me-parameter")]),e._v('The name of the request parameter which toggles remember-me authentication.\nDefaults to "remember-me".\nMaps to the "parameter" property of '),r("code",[e._v("AbstractRememberMeServices")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("remember-me-cookie")]),e._v('The name of cookie which store the token for remember-me authentication.\nDefaults to "remember-me".\nMaps to the "cookieName" property of '),r("code",[e._v("AbstractRememberMeServices")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("key")]),e._v('Maps to the "key" property of '),r("code",[e._v("AbstractRememberMeServices")]),e._v(".\nShould be set to a unique value to ensure that remember-me cookies are only valid within the one application "),r("sup",{staticClass:"footnote"},[e._v("["),r("a",{staticClass:"footnote",attrs:{id:"_footnoteref_3",href:"#_footnotedef_3",title:"View footnote."}},[e._v("3")]),e._v("]")]),e._v(".\nIf this is not set a secure random value will be generated.\nSince generating secure random values can take a while, setting this value explicitly can help improve startup times when using the remember-me functionality.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("services-alias")]),e._v("Exports the internally defined "),r("code",[e._v("RememberMeServices")]),e._v(" as a bean alias, allowing it to be used by other beans in the application context.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("services-ref")]),e._v("Allows complete control of the "),r("code",[e._v("RememberMeServices")]),e._v(" implementation that will be used by the filter.\nThe value should be the "),r("code",[e._v("id")]),e._v(" of a bean in the application context which implements this interface.\nShould also implement "),r("code",[e._v("LogoutHandler")]),e._v(" if a logout filter is in use.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("token-repository-ref")]),e._v("Configures a "),r("code",[e._v("PersistentTokenBasedRememberMeServices")]),e._v(" but allows the use of a custom "),r("code",[e._v("PersistentTokenRepository")]),e._v(" bean.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("token-validity-seconds")]),e._v("Maps to the "),r("code",[e._v("tokenValiditySeconds")]),e._v(" property of "),r("code",[e._v("AbstractRememberMeServices")]),e._v(".\nSpecifies the period in seconds for which the remember-me cookie should be valid.\nBy default it will be valid for 14 days.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("use-secure-cookie")]),e._v('It is recommended that remember-me cookies are only submitted over HTTPS and thus should be flagged as "secure".\nBy default, a secure cookie will be used if the connection over which the login request is made is secure (as it should be).\nIf you set this property to '),r("code",[e._v("false")]),e._v(", secure cookies will not be used.\nSetting it to "),r("code",[e._v("true")]),e._v(" will always set the secure flag on the cookie.\nThis attribute maps to the "),r("code",[e._v("useSecureCookie")]),e._v(" property of "),r("code",[e._v("AbstractRememberMeServices")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("user-service-ref")]),e._v("The remember-me services implementations require access to a "),r("code",[e._v("UserDetailsService")]),e._v(", so there has to be one defined in the application context.\nIf there is only one, it will be selected and used automatically by the namespace configuration.\nIf there are multiple instances, you can specify a bean "),r("code",[e._v("id")]),e._v(" explicitly using this attribute.")])])]),e._v(" "),r("h2",{attrs:{id:"request-cache-element"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#request-cache-element"}},[e._v("#")]),e._v(" Element")]),e._v(" "),r("p",[e._v("Sets the "),r("code",[e._v("RequestCache")]),e._v(" instance which will be used by the "),r("code",[e._v("ExceptionTranslationFilter")]),e._v(" to store request information before invoking an "),r("code",[e._v("AuthenticationEntryPoint")]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-request-cache"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-request-cache"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"request-cache-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#request-cache-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("ref")]),e._v("Defines a reference to a Spring bean that is a "),r("code",[e._v("RequestCache")]),e._v(".")])]),e._v(" "),r("h2",{attrs:{id:"session-management"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#session-management"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Session-management related functionality is implemented by the addition of a "),r("code",[e._v("SessionManagementFilter")]),e._v(" to the filter stack.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-session-management"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-session-management"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"session-management-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#session-management-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("invalid-session-url")]),e._v("Setting this attribute will inject the "),r("code",[e._v("SessionManagementFilter")]),e._v(" with a "),r("code",[e._v("SimpleRedirectInvalidSessionStrategy")]),e._v(" configured with the attribute value.\nWhen an invalid session ID is submitted, the strategy will be invoked, redirecting to the configured URL.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("invalid-session-url")]),e._v("Allows injection of the InvalidSessionStrategy instance used by the SessionManagementFilter.\nUse either this or the "),r("code",[e._v("invalid-session-url")]),e._v(" attribute but not both.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("session-authentication-error-url")]),e._v("Defines the URL of the error page which should be shown when the SessionAuthenticationStrategy raises an exception.\nIf not set, an unauthorized (401) error code will be returned to the client.\nNote that this attribute doesn’t apply if the error occurs during a form-based login, where the URL for authentication failure will take precedence.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("session-authentication-strategy-ref")]),e._v("Allows injection of the SessionAuthenticationStrategy instance used by the SessionManagementFilter")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("session-fixation-protection")]),e._v('Indicates how session fixation protection will be applied when a user authenticates.\nIf set to "none", no protection will be applied.\n"newSession" will create a new empty session, with only Spring Security-related attributes migrated.\n"migrateSession" will create a new session and copy all session attributes to the new session.\nIn Servlet 3.1 (Java EE 7) and newer containers, specifying "changeSessionId" will keep the existing session and use the container-supplied session fixation protection (HttpServletRequest#changeSessionId()).\nDefaults to "changeSessionId" in Servlet 3.1 and newer containers, "migrateSession" in older containers.\nThrows an exception if "changeSessionId" is used in older containers.')]),e._v(" "),r("p",[e._v("If session fixation protection is enabled, the "),r("code",[e._v("SessionManagementFilter")]),e._v(" is injected with an appropriately configured "),r("code",[e._v("DefaultSessionAuthenticationStrategy")]),e._v(".\nSee the Javadoc for this class for more details.")])])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-session-management"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-session-management"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-concurrency-control"}},[e._v("concurrency-control")])])]),e._v(" "),r("h2",{attrs:{id:"concurrency-control"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#concurrency-control"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds support for concurrent session control, allowing limits to be placed on the number of active sessions a user can have.\nA "),r("code",[e._v("ConcurrentSessionFilter")]),e._v(" will be created, and a "),r("code",[e._v("ConcurrentSessionControlAuthenticationStrategy")]),e._v(" will be used with the "),r("code",[e._v("SessionManagementFilter")]),e._v(".\nIf a "),r("code",[e._v("form-login")]),e._v(" element has been declared, the strategy object will also be injected into the created authentication filter.\nAn instance of "),r("code",[e._v("SessionRegistry")]),e._v(" (a "),r("code",[e._v("SessionRegistryImpl")]),e._v(" instance unless the user wishes to use a custom bean) will be created for use by the strategy.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-concurrency-control"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-concurrency-control"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-session-management"}},[e._v("session-management")])])]),e._v(" "),r("h3",{attrs:{id:"concurrency-control-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#concurrency-control-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("error-if-maximum-exceeded")]),e._v('If set to "true" a '),r("code",[e._v("SessionAuthenticationException")]),e._v(" will be raised when a user attempts to exceed the maximum allowed number of sessions.\nThe default behaviour is to expire the original session.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("expired-url")]),e._v('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.\nShould be set unless '),r("code",[e._v("exception-if-maximum-exceeded")]),e._v(" is set.\nIf no value is supplied, an expiry message will just be written directly back to the response.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("expired-url")]),e._v("Allows injection of the ExpiredSessionStrategy instance used by the ConcurrentSessionFilter")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("max-sessions")]),e._v("Maps to the "),r("code",[e._v("maximumSessions")]),e._v(" property of "),r("code",[e._v("ConcurrentSessionControlAuthenticationStrategy")]),e._v(".\nSpecify "),r("code",[e._v("-1")]),e._v(" as the value to support unlimited sessions.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("session-registry-alias")]),e._v("It can also be useful to have a reference to the internal session registry for use in your own beans or an admin interface.\nYou can expose the internal bean using the "),r("code",[e._v("session-registry-alias")]),e._v(" attribute, giving it a name that you can use elsewhere in your configuration.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("session-registry-ref")]),e._v("The user can supply their own "),r("code",[e._v("SessionRegistry")]),e._v(" implementation using the "),r("code",[e._v("session-registry-ref")]),e._v(" attribute.\nThe other concurrent session control beans will be wired up to use it.")])])]),e._v(" "),r("h2",{attrs:{id:"x509"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#x509"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Adds support for X.509 authentication.\nAn "),r("code",[e._v("X509AuthenticationFilter")]),e._v(" will be added to the stack and an "),r("code",[e._v("Http403ForbiddenEntryPoint")]),e._v(" bean will be created.\nThe latter will only be used if no other authentication mechanisms are in use (its only functionality is to return an HTTP 403 error code).\nA "),r("code",[e._v("PreAuthenticatedAuthenticationProvider")]),e._v(" will also be created which delegates the loading of user authorities to a "),r("code",[e._v("UserDetailsService")]),e._v(".")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-x509"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-x509"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-http"}},[e._v("http")])])]),e._v(" "),r("h3",{attrs:{id:"x509-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#x509-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("authentication-details-source-ref")]),e._v("A reference to an "),r("code",[e._v("AuthenticationDetailsSource")])])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("subject-principal-regex")]),e._v("Defines a regular expression which will be used to extract the username from the certificate (for use with the "),r("code",[e._v("UserDetailsService")]),e._v(").")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("user-service-ref")]),e._v("Allows a specific "),r("code",[e._v("UserDetailsService")]),e._v(" to be used with X.509 in the case where multiple instances are configured.\nIf not set, an attempt will be made to locate a suitable instance automatically and use that.")])])]),e._v(" "),r("h2",{attrs:{id:"filter-chain-map"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#filter-chain-map"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Used to explicitly configure a FilterChainProxy instance with a FilterChainMap")]),e._v(" "),r("h3",{attrs:{id:"filter-chain-map-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#filter-chain-map-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("strong",[e._v("request-matcher")]),e._v("Defines the strategy to use for matching incoming requests.\nCurrently the options are 'ant' (for ant path patterns), 'regex' for regular expressions and 'ciRegex' for case-insensitive regular expressions.")])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-filter-chain-map"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-filter-chain-map"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-filter-chain"}},[e._v("filter-chain")])])]),e._v(" "),r("h2",{attrs:{id:"filter-chain"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#filter-chain"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Used within to define a specific URL pattern and the list of filters which apply to the URLs matching that pattern.\nWhen multiple filter-chain elements are assembled in a list in order to configure a FilterChainProxy, the most specific patterns must be placed at the top of the list, with most general ones at the bottom.")]),e._v(" "),r("h3",{attrs:{id:"parent-elements-of-filter-chain"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#parent-elements-of-filter-chain"}},[e._v("#")]),e._v(" Parent Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-filter-chain-map"}},[e._v("filter-chain-map")])])]),e._v(" "),r("h3",{attrs:{id:"filter-chain-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#filter-chain-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("filters")]),e._v("A comma separated list of references to Spring beans that implement "),r("code",[e._v("Filter")]),e._v('.\nThe value "none" means that no '),r("code",[e._v("Filter")]),e._v(" should be used for this "),r("code",[e._v("FilterChain")]),e._v(".")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("pattern")]),e._v("A pattern that creates RequestMatcher in combination with the "),r("a",{attrs:{href:"#nsa-filter-chain-map-request-matcher"}},[e._v("request-matcher")])])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("request-matcher-ref")]),e._v("A reference to a "),r("code",[e._v("RequestMatcher")]),e._v(" that will be used to determine if any "),r("code",[e._v("Filter")]),e._v(" from the "),r("code",[e._v("filters")]),e._v(" attribute should be invoked.")])])]),e._v(" "),r("h2",{attrs:{id:"filter-security-metadata-source"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#filter-security-metadata-source"}},[e._v("#")]),e._v(" ")]),e._v(" "),r("p",[e._v("Used to explicitly configure a FilterSecurityMetadataSource bean for use with a FilterSecurityInterceptor.\nUsually only needed if you are configuring a FilterChainProxy explicitly, rather than using the element.\nThe intercept-url elements used should only contain pattern, method and access attributes.\nAny others will result in a configuration error.")]),e._v(" "),r("h3",{attrs:{id:"filter-security-metadata-source-attributes"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#filter-security-metadata-source-attributes"}},[e._v("#")]),e._v(" Attributes")]),e._v(" "),r("ul",[r("li",[r("p",[r("strong",[e._v("id")]),e._v("A bean identifier, used for referring to the bean elsewhere in the context.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("request-matcher")]),e._v("Defines the strategy use for matching incoming requests.\nCurrently the options are 'ant' (for ant path patterns), 'regex' for regular expressions and 'ciRegex' for case-insensitive regular expressions.")])]),e._v(" "),r("li",[r("p",[r("strong",[e._v("use-expressions")]),e._v("Enables the use of expressions in the 'access' attributes in elements rather than the traditional list of configuration attributes.\nDefaults to 'true'.\nIf enabled, each attribute should contain a single Boolean expression.\nIf the expression evaluates to 'true', access will be granted.")])])]),e._v(" "),r("h3",{attrs:{id:"child-elements-of-filter-security-metadata-source"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#child-elements-of-filter-security-metadata-source"}},[e._v("#")]),e._v(" Child Elements of ")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"#nsa-intercept-url"}},[e._v("intercept-url")])])]),e._v(" "),r("hr"),e._v(" "),r("p",[r("a",{attrs:{href:"#_footnoteref_1"}},[e._v("1")]),e._v(". See the xref:servlet/configuration/xml-namespace.adoc#ns-web-xml[introductory chapter")]),e._v(" "),r("p",[r("a",{attrs:{href:"#_footnoteref_2"}},[e._v("2")]),e._v(". 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 "),r("code",[e._v("DefaultLoginPageGeneratingFilter")]),e._v(" is responsible for rendering the login page and will provide login forms for both normal form login and/or OpenID if required.")]),e._v(" "),r("p",[r("a",{attrs:{href:"#_footnoteref_3"}},[e._v("3")]),e._v(". This doesn’t affect the use of "),r("code",[e._v("PersistentTokenBasedRememberMeServices")]),e._v(", where the tokens are stored on the server side.")]),e._v(" "),r("p",[r("RouterLink",{attrs:{to:"/en/spring-security/authentication-manager.html"}},[e._v("Authentication Services")]),r("RouterLink",{attrs:{to:"/en/spring-security/method-security.html"}},[e._v("Method Security")])],1)])}),[],!1,null,null,null);t.default=s.exports}}]);