Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Referer header #18

Merged
merged 5 commits into from
Oct 20, 2020
Merged

Use Referer header #18

merged 5 commits into from
Oct 20, 2020

Conversation

blakemorgan
Copy link
Contributor

Supercedes #17. Rather than use an origin access identity, we use the Referer header between CloudFront and S3. CloudFront will forward the Referer header with a random value (generated by the random provider) to the S3 bucket. The S3 bucket will deny all requests without that header. This again will force all legitimate traffic through the CloudFront distribution. While the S3 bucket can still be accessed directly, the caller would get a 403 error if it's missing that header.

No functionality is removed in this PR. The breaking change is changing the resource name of the Route 53 records to standardize on the naming convention we use.

The added functionality includes adding the Referer header, setting a variable to force destroy buckets, encrypting buckets, and adding standard CloudFront logging (real-time logging is dependent on hashicorp/terraform-provider-aws#14974).

README.md Outdated Show resolved Hide resolved
stuft2
stuft2 previously approved these changes Oct 20, 2020
@blakemorgan blakemorgan merged commit 0ff7bed into master Oct 20, 2020
@blakemorgan blakemorgan deleted the referrer branch October 20, 2020 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants