About
A brief summary about Internet Spacejunk
I've long wanted a place on the internet to call my own. I have found over time that I tend to glorify the act of actually standing up, maintaining and contributing to a website. In doing so, I focus on what actually makes the website run.
Along the years, hosting providers come and go. Each of them have their own guardrails for its users. Some providers would block port 587 from your account and would require a ticket to lift the restriction. Some providers would give you a plan old FTP connection. It really boiled down to the fact that I wanted to have a robust provider that was easy to configure, while also having the flexibility to deploy new technologies to the site.
That flexibility came at a cost, and it was typically the deciding factor on whether to sign up for a particular provider. I was never really able to find a provider that fit my needs and my budget. I'd spend so much time focusing on the backend that by the time I'd get anywhere near being close to being finished, I wouldn't have any desire to actually write any content for it.
Forward to today, and cloud resources are inexpensive while being fun to tinker with. This site will be a place for me to document projects, research, and writing.
Diagram as text
- User Agent (Client) - Three apex domains serve identical content. www hosts 301 to the apex on the same TLD; rel=canonical, sitemap and feeds reference the .com origin.
- Reverse Proxy (Cloudflare Edge) - Anycast reverse proxy terminating TLS 1.3 (HTTP/2 and HTTP/3). Re-encrypts to the origin in Full (strict) mode, validating the origin certificate. HSTS with preload, edge caching and Brotli.
- Authoritative DNS (Cloudflare Edge) - Apex and www records are proxied (flattened CNAMEs to the CDN), so origin addresses are never published. Zones are DNSSEC-signed and CAA-restricted.
- Edge WAF (Cloudflare Edge) - Managed rulesets, custom rules constraining the static site's attack surface (method allowlist, scanner-path blocking), per-client rate limiting and bot mitigation, evaluated before any request leaves the edge.
- Origin Auth Header (Cloudflare Edge) - A late request-transform rule injects a shared-secret header on every upstream request. Combined with the origin's source-IP check, this binds the origin to this edge account rather than to the provider's network as a whole.
- Email Routing (Cloudflare Edge) - Inbound mail for the contact address is forwarded to a private mailbox. Non-mail domains publish null MX, a hard-fail SPF record and DMARC reject to prevent spoofing.
- AWS WAF (AWS (us-east-1)) - CloudFront-scoped WebACL with a default BLOCK action. Requests are allowed only when the source IP is in the edge provider's published ranges AND the shared-secret header matches. Supports zero-downtime secret rotation.
- CloudFront (AWS (us-east-1)) - One DNS-validated ACM certificate (ECDSA P-256) covers all six hostnames. A response headers policy enforces a strict CSP (no inline script, self-only sources), HSTS, X-Frame-Options, COOP/CORP and Permissions-Policy.
- CloudFront Function (AWS (us-east-1)) - Rejects path-traversal and encoded-separator probes, 301-redirects www to the same-TLD apex, and rewrites extensionless and directory paths to index.html for clean URLs.
- S3 Origin (AWS (us-east-1)) - Block Public Access on all four controls, bucket-owner-enforced ownership, versioning. Readable only by this distribution through Origin Access Control with SigV4-signed requests.
- KMS CMK (AWS (us-east-1)) - Customer-managed key encrypting origin objects and log groups. The key policy limits CloudFront decryption to this distribution via aws:SourceArn, and the key is protected from accidental destruction in Terraform.
- CloudWatch Logs (AWS (us-east-1)) - WAF and CloudFront access logs delivered to KMS-encrypted log groups. The origin auth header is redacted from WAF logs, so the secret never appears in telemetry.
- GitHub Repository (CI/CD & Infrastructure as Code) - Site generator, content, Terraform and workflows live in one repository. All changes land through pull requests with signed commits.
- GitHub Actions (CI/CD & Infrastructure as Code) - Compiles the zero-dependency static site and runs a release gate (CSP and SRI parity, WCAG landmarks, link integrity, asset and metadata hygiene). Deploys via a short-lived OIDC role scoped to put/delete objects and invalidate the distribution.
- HCP Terraform (CI/CD & Infrastructure as Code) - Remote runs with dynamic provider credentials: a read-only role for plan and a scoped role for apply, both trust-pinned to the workspace and run phase. Speculative plans on PRs; applies require manual confirmation.
- User Agent → Reverse Proxy: 2. TLS 1.3
- User Agent → Authoritative DNS: 1. Resolve
- Reverse Proxy → Edge WAF: 3. Inspect
- Edge WAF → Origin Auth Header: 4. Pass
- Origin Auth Header → AWS WAF: 5. TLS + auth header
- AWS WAF → CloudFront: 6. Allow
- CloudFront → CloudFront Function: 7. Viewer request
- CloudFront Function → S3 Origin: 8. OAC fetch
- S3 Origin → KMS CMK: SSE-KMS
- AWS WAF → CloudWatch Logs: WAF logs
- CloudFront → CloudWatch Logs: Access logs
- Authoritative DNS → Email Routing: MX
- S3 Origin → GitHub Actions: Synced by
- CloudFront → HCP Terraform: Managed by
- GitHub Repository → GitHub Actions: Push to main
- GitHub Repository → HCP Terraform: PR / merge