Skip to content

Commit

Permalink
ops files for valid x-frame-options settings
Browse files Browse the repository at this point in the history
These mutually-exclusive ops files configure x-frame-options to help
prevent clickjacking attacks.
  • Loading branch information
flavorjones committed Sep 13, 2018
1 parent 398b50e commit 59b37b1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cluster/operations/x-frame-options-allow-from.yml
@@ -0,0 +1,21 @@
#
# This operations file will configure atc to include this HTTP header:
#
# X-Frame-Options: allow-from https://example.com/
#
# You can read more about this header and how it might help prevent
# clickjacking attacks [here][1].
#
# [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
#
# The following URI parameter is required:
#
# x_frame_options_allow_from: <uri>
#
# It is mutually-exclusive with the other two x-frame-options*.yml
# operations files.
#
---
- type: replace
path: /instance_groups/name=web/jobs/name=atc/properties/x_frame_options?
value: "allow ((x_frame_options_allow_from))"
18 changes: 18 additions & 0 deletions cluster/operations/x-frame-options-deny.yml
@@ -0,0 +1,18 @@
#
# This operations file will configure atc to include this HTTP header:
#
# X-Frame-Options: deny
#
# You can read more about this header and how it might help prevent
# clickjacking attacks [here][1].
#
# [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
#
# There are no configurable parameters associated with this
# operations file, and it is mutually-exclusive with the other two
# x-frame-options*.yml operations files.
#
---
- type: replace
path: /instance_groups/name=web/jobs/name=atc/properties/x_frame_options?
value: "deny"
18 changes: 18 additions & 0 deletions cluster/operations/x-frame-options-sameorigin.yml
@@ -0,0 +1,18 @@
#
# This operations file will configure atc to include this HTTP header:
#
# X-Frame-Options: sameorigin
#
# You can read more about this header and how it might help prevent
# clickjacking attacks [here][1].
#
# [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
#
# There are no configurable parameters associated with this
# operations file, and it is mutually-exclusive with the other two
# x-frame-options*.yml operations files.
#
---
- type: replace
path: /instance_groups/name=web/jobs/name=atc/properties/x_frame_options?
value: "sameorigin"

0 comments on commit 59b37b1

Please sign in to comment.