SEC-2230: HTTP Strict Transport Security (HSTS)Add support for Strict
This is a distinct filter as apposed to reusing StaticHeaderWriter since the specification specifies that the "Strict-Transport-Security" header should only be set on secure requests. It would not make sense to require DelegatingRequestMatcherHeaderWriter since this requirement is in the specification.
This commit is contained in:
@@ -267,6 +267,9 @@
|
||||
<listitem><literal>Cache-Control</literal> and <literal>Pragma</literal> - Can be set using the
|
||||
<link xlink:href="#nsa-cache-control">cache-control</link> element. This ensures that the
|
||||
browser does not cache your secured pages.</listitem>
|
||||
<listitem><literal>Strict-Transport-Security</literal> - Can be set using the
|
||||
<link xlink:href="#nsa-hsts">hsts</link> element. This ensures that the
|
||||
browser automatically requests HTTPS for future requests.</listitem>
|
||||
<listitem><literal>X-Frame-Options</literal> - Can be set using the
|
||||
<link xlink:href="#nsa-frame-options">frame-options</link> element. The
|
||||
<link xlink:href="http://en.wikipedia.org/wiki/Clickjacking#X-Frame-Options">X-Frame-Options
|
||||
@@ -295,6 +298,7 @@
|
||||
<listitem><link xlink:href="#nsa-content-type-options">content-type-options</link></listitem>
|
||||
<listitem><link xlink:href="#nsa-frame-options">frame-options</link></listitem>
|
||||
<listitem><link xlink:href="#nsa-header">header</link></listitem>
|
||||
<listitem><link xlink:href="#nsa-hsts">hsts</link></listitem>
|
||||
<listitem><link xlink:href="#nsa-xss-protection">xss-protection</link></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
@@ -310,6 +314,38 @@
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
<section xml:id="nsa-hsts">
|
||||
<title><literal><hsts></literal></title>
|
||||
<para>When enabled adds the <link xlink:href="http://tools.ietf.org/html/rfc6797">Strict-Transport-Security</link> header to the response
|
||||
for any secure request. This allows the server to instruct browsers to automatically use HTTPS for future requests.</para>
|
||||
<section xml:id="nsa-hsts-attributes">
|
||||
<title><literal><hsts></literal> Attributes</title>
|
||||
<section xml:id="nsa-hsts-include-subdomains">
|
||||
<title><literal>include-sub-domains</literal></title>
|
||||
<para>
|
||||
Specifies if subdomains should be included. Default true.
|
||||
</para>
|
||||
</section>
|
||||
<section xml:id="nsa-hsts-max-age-seconds">
|
||||
<title><literal>max-age-seconds</literal></title>
|
||||
<para>
|
||||
Specifies the maximum ammount of time the host should be considered a Known HSTS Host. Default one year.
|
||||
</para>
|
||||
</section>
|
||||
<section xml:id="nsa-hsts-request-matcher-ref">
|
||||
<title><literal>request-matcher-ref</literal></title>
|
||||
<para>
|
||||
The RequestMatcher instance to be used to determine if the header should be set. Default is if HttpServletRequest.isSecure() is true.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
<section xml:id="nsa-hsts-parents">
|
||||
<title>Parent Elements of <literal><hsts></literal></title>
|
||||
<itemizedlist>
|
||||
<listitem><link xlink:href="#nsa-headers">headers</link></listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
<section xml:id="nsa-frame-options">
|
||||
<title><literal><frame-options></literal></title>
|
||||
<para>When enabled adds the <link xlink:href="http://tools.ietf.org/html/draft-ietf-websec-x-frame-options-01">X-Frame-Options header</link> to the response, this allows newer browsers to do some security
|
||||
|
||||
Reference in New Issue
Block a user