Adobe 38043740 Lockdown Guide - Page 82

Adding ClickJacking Protection, 6.12 Security Constraints in web.xml, CFClickJackFilterDeny

Page 82 highlights

6.11 Adding ClickJacking Protection ColdFusion 10 includes two new Servlet Filters CFClickJackFilterDeny and CFClickJackFilterSameOrigin. When a URL is mapped to one of these servlets the X-Frame-Options HTTP header will be returned with a value of DENY or SAMEORGIN. You can add a filter-mapping in web.xml to enable these filters for a given URI, this functionality could also be accomplished at the web server level. 6.12 Security Constraints in web.xml The servlet container (Tomcat) can enforce certain security constraints to ensure that a given URI is secured, or to limit certain URIs to HTTP POST over a secure (SSL) connection: POST SSL POST ONLY SSL /post/* POST CONFIDENTIAL POST ONLY BLOCK NOT POST /post/* GET HEAD PUT DELETE TRACE 82

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87

82
6.11 Adding ClickJacking Protection
ColdFusion 10 includes two new Servlet Filters
CFClickJackFilterDeny
and
CFClickJackFilterSameOrigin
. When a URL is mapped to one of these servlets the
X-Frame-Options
HTTP header will be returned with a value of
DENY
or
SAMEORGIN
. You can add a
filter-mapping
in
web.xml
to enable these filters for a given URI, this functionality could also be accomplished at the web
server level.
6.12 Security Constraints in web.xml
The servlet container (Tomcat) can enforce certain security constraints to ensure that a given URI is secured,
or to limit certain URIs to HTTP POST over a secure (SSL) connection:
<security-constraint>
<display-name>POST SSL</display-name>
<web-resource-collection>
<web-resource-name>POST ONLY SSL</web-resource-name>
<url-pattern>/post/*</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<display-name>POST ONLY</display-name>
<web-resource-collection>
<web-resource-name>BLOCK NOT POST</web-resource-name>
<url-pattern>/post/*</url-pattern>
<http-method>GET</http-method>
<http-method>HEAD</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>TRACE</http-method>
</web-resource-collection>
<auth-constraint />
</security-constraint>