Skip to content

Commit

Permalink
Add some documentation for the WAF bypass URLs (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
CamLamb authored Mar 5, 2024
1 parent 02a4834 commit b6931b2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/waf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# CloudFront WAF

## Overview

This project is hosted behind a CloudFront Web Application Firewall (WAF).


## File uploads

This firewall causes some issues with users who are uploading files, this means that we need to bypass the WAF on any URLs that are used for file uploads.

Below is a list of all the known URLs that should be bypassed:

- `/admin/media/audio/add/`
- `/admin/media/audio/chooser/upload/`
- `/admin/media/audio/chooser/create/`
- `/admin/media/audio/multiple/add/`
- `/admin/media/edit/{MEDIA_ID}/` where `{MEDIA_ID}` is an integer
- `/admin/media/video/add/`
- `/admin/media/video/chooser/upload/`
- `/admin/media/video/chooser/create/`
- `/admin/media/video/multiple/add/`
- `/admin/documents/edit/{DOCUMENT_ID}/` where `{DOCUMENT_ID}` is an integer
- `/admin/documents/multiple/add/`
- `/admin/documents/chooser/upload/`
- `/admin/documents/chooser/create/`
- `/admin/images/edit/{IMAGE_ID}/` where `{IMAGE_ID}` is an integer
- `/admin/images/multiple/add/`
- `/admin/images/chooser/upload/`
- `/admin/images/chooser/create/`
- `/people/{PERSON_UUID}/edit/personal/` where `{PERSON_UUID}` is a UUID string

This has been implemented by adding a custom WAF rule to the CloudFront distribution. This rule is a regular expression that matches the URLs above and bypasses the WAF for them.

0 comments on commit b6931b2

Please sign in to comment.