<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alex Au</title>
    <description>The latest articles on DEV Community by Alex Au (@alexuau922).</description>
    <link>https://dev.to/alexuau922</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3814910%2Fd1b96662-9d80-4a1f-9705-51ed464bda89.webp</url>
      <title>DEV Community: Alex Au</title>
      <link>https://dev.to/alexuau922</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexuau922"/>
    <language>en</language>
    <item>
      <title>Zero-Trust at the Edge: Rethinking the eDMZ Perimeter (Part 1)</title>
      <dc:creator>Alex Au</dc:creator>
      <pubDate>Mon, 09 Mar 2026 15:58:52 +0000</pubDate>
      <link>https://dev.to/alexuau922/zero-trust-at-the-edge-rethinking-the-edmz-perimeter-part-1-g86</link>
      <guid>https://dev.to/alexuau922/zero-trust-at-the-edge-rethinking-the-edmz-perimeter-part-1-g86</guid>
      <description>&lt;h3&gt;
  
  
  Evolving the Asymmetric WAF-Pass Architecture for Speed and Scale
&lt;/h3&gt;



&lt;p&gt;A few months ago, cloud security architect &lt;a href="https://www.linkedin.com/in/chinglong-kevin-yu/" rel="noopener noreferrer"&gt;Kevin Yu&lt;/a&gt; published an excellent article titled '&lt;a href="https://www.linkedin.com/pulse/copy-designing-asymmetric-waf-pass-jwt-assertion-zonal-yu-togaf--edjsc/" rel="noopener noreferrer"&gt;Designing Asymmetric WAF-Pass JWT Assertion&lt;/a&gt;'. He highlighted a massive, often-ignored vulnerability in modern cloud architectures: the reliance on static custom headers (e.g., &lt;code&gt;X-WAF-Checked: true&lt;/code&gt;) to verify that traffic hitting an Origin actually passed through the CDN and Web Application Firewall (WAF).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx1zukgksckgsacw0k6al.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx1zukgksckgsacw0k6al.png" alt="The Static Header Vulnerability"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Kevin is absolutely right about the problem. Static headers provide &lt;strong&gt;zero cryptographic integrity&lt;/strong&gt;. They are essentially shared passwords; if they leak, your WAF is permanently bypassed, and your Origin is exposed to the open internet.&lt;/p&gt;

&lt;p&gt;To solve this, Kevin proposed an innovative architecture: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Using a &lt;code&gt;Lambda@Edge&lt;/code&gt; function to make a synchronous network call to a Regional API Gateway&lt;/li&gt;
&lt;li&gt;Triggering a Regional Lambda, which calls AWS KMS to generate an Asymmetric JWT&lt;/li&gt;
&lt;li&gt;Passing it all the way back to the Edge to be forwarded to the Origin.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It is a highly secure, effective solution that brilliantly solves 95% of the architectural challenge. But as a Cybersecurity-backgrounded Cloud Platform Engineer who spends my days obsessing over &lt;em&gt;system performance&lt;/em&gt; and &lt;em&gt;cloud unit economics&lt;/em&gt;, it got me thinking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if we could extend this design to &lt;strong&gt;99.9% operational efficiency&lt;/strong&gt; — maintaining that Zero-Trust perimeter with just &lt;strong&gt;a fraction of the latency and cost&lt;/strong&gt;?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Security at the edge is a delicate balancing act. In this three-part series, we are going to break down the cryptography of the Edge perimeter. I will propose a cloud-native, symmetric alternative that achieves this Zero-Trust pattern entirely at the Edge, open-source a custom benchmarking engine to prove the latency savings mathematically, and dive into the FinOps reality of securing the eDMZ.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Threat Model of the eDMZ
&lt;/h3&gt;



&lt;p&gt;Before we talk about cryptography, we must define the exact threat model we are solving.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9fu0aam5je2dw7e76pjh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9fu0aam5je2dw7e76pjh.png" alt="The Threat Model and how eDMZ solves it"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you place a WAF in front of an Application Load Balancer (ALB), EC2 instance, or custom cloud backend, you are creating an Enterprise DMZ (eDMZ). The Origin backend must have absolute mathematical certainty of two things before accepting a request:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The request definitely passed through CloudFront and AWS WAF.&lt;/li&gt;
&lt;li&gt;The routing parameters (URI, Headers) have not been tampered with in transit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If an attacker discovers your Origin's raw IP address or public DNS, they will attempt to &lt;strong&gt;bypass the WAF entirely&lt;/strong&gt;. We need a way for the Edge to &lt;strong&gt;mathematically "sign"&lt;/strong&gt; the request so the Origin can definitively trust its provenance.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Cryptography Refresher: Asymmetric vs. Symmetric
&lt;/h3&gt;



&lt;p&gt;Kevin’s architecture relies on Asymmetric Cryptography (RSA/ECDSA) to generate JWTs via AWS KMS.&lt;/p&gt;

&lt;p&gt;Asymmetric cryptography is a beautiful mathematical construct, perfect for &lt;em&gt;human identity verification&lt;/em&gt; (like OIDC) or highly distributed claims where the verifier cannot be trusted with the signing key. However, for &lt;em&gt;Machine-to-Machine (M2M)&lt;/em&gt; perimeter routing inside the same organization, it can be computationally heavy.&lt;/p&gt;

&lt;p&gt;For a fast, internal perimeter, &lt;strong&gt;Time-Based Symmetric Cryptography (HMAC-SHA256)&lt;/strong&gt; is an incredibly powerful alternative. This is the exact cryptographic algorithm AWS uses for &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html" rel="noopener noreferrer"&gt;SigV4&lt;/a&gt; to authenticate billions of internal API requests per second.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;small&gt;🔬 Crypto Deep-Dive: The Math of HMAC-SHA256&lt;/small&gt;&lt;/strong&gt;&lt;br&gt;
&lt;small&gt;&lt;/small&gt;&lt;br&gt;
&lt;small&gt;When designing secure cloud perimeters, engineers often confuse confidentiality with integrity. We frequently hear acronyms like &lt;b&gt;IND-CPA&lt;/b&gt; (Indistinguishability under Chosen Plaintext Attack) or &lt;b&gt;IND-CCA&lt;/b&gt; — but those are security models for encryption schemes. In eDMZ routing, we aren't encrypting the HTTP headers; we are authenticating them&lt;/small&gt;.&lt;br&gt;
&lt;small&gt;&lt;/small&gt;&lt;br&gt;
&lt;small&gt;Because &lt;code&gt;HMAC-SHA256&lt;/code&gt; is a Message Authentication Code (MAC) rather than an encryption cipher, the mathematically correct security proof is &lt;b&gt;EUF-CMA&lt;/b&gt; (Existential Unforgeability under Chosen Message Attack). In the realm of Authenticated Encryption, this provides the critical &lt;b&gt;INT-CTXT&lt;/b&gt; (Integrity of Ciphertext/Tag) guarantee.&lt;/small&gt;&lt;br&gt;
&lt;small&gt;&lt;/small&gt;&lt;br&gt;
&lt;small&gt;What does this mean in plain English? It means that even if a hacker sits on the network and captures 10 million valid HTTP requests passing through your CDN (the "chosen messages"), along with their valid HMAC signatures, the mathematically chaotic avalanche effect of SHA-256 ensures they learn absolutely zero bits of information about your secret key. They cannot reverse-engineer the key, and they cannot forge a valid signature for a slightly modified URI or payload.&lt;/small&gt;&lt;br&gt;
&lt;small&gt;&lt;/small&gt;&lt;br&gt;
&lt;small&gt;Because symmetric math relies on &lt;b&gt;rapid bitwise operations&lt;/b&gt; (XOR, AND, bit-shifts) rather than the heavy prime factorization or elliptic curve scalar multiplication used in Asymmetric RSA/ECDSA, this EUF-CMA proof can be calculated by a V8 engine in less than a millisecond.&lt;/small&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By taking a highly secure shared 256-bit Symmetric Key and hashing the URI, critical Headers, and a tightly constrained timestamp header (e.g., &lt;code&gt;x-cloud-date&lt;/code&gt;), we generate an &lt;strong&gt;unforgeable signature&lt;/strong&gt;. You achieve enterprise-grade cryptographic integrity, but at a fraction of the computational cost.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Proposed Architecture: CloudFront Functions + KVS
&lt;/h3&gt;



&lt;p&gt;The main friction point in using KMS for Edge validation is &lt;strong&gt;state&lt;/strong&gt; and &lt;strong&gt;distance&lt;/strong&gt;. Making a regional API call from an Edge location natively introduces cross-ocean latency.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslmsx9afr5m62fj1kvew.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslmsx9afr5m62fj1kvew.png" alt="Architecture &amp;amp; Latency Comparison"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead of heavy Lambda@Edge functions fetching regional secrets, we can execute this Zero-Trust pattern using &lt;strong&gt;CloudFront Functions (CFF)&lt;/strong&gt; and &lt;strong&gt;CloudFront KeyValueStore (KVS)&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Compute&lt;/strong&gt;: We write the &lt;code&gt;HMAC-SHA256&lt;/code&gt; mathematical signing logic in vanilla JavaScript and execute it directly within the CFF V8 JavaScript Engine isolates.&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Key Rotation&lt;/strong&gt;: We store the Symmetric Key in CloudFront KVS. KVS allows for instant, global key rotation via API, mimicking the operational security benefits of AWS KMS, but doing so natively at the Edge with &lt;strong&gt;sub-millisecond&lt;/strong&gt; read latency.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  So... Why isn't this architecture adopted by Kevin?
&lt;/h3&gt;



&lt;p&gt;I want to be &lt;strong&gt;completely transparent&lt;/strong&gt;: my symmetric CFF solution is not a silver bullet. Engineering is always about risk and balances.&lt;/p&gt;

&lt;p&gt;My architecture relies on a few critical assumptions and tradeoffs that security engineers must understand:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffj8dwrhw52v3ffy743iy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffj8dwrhw52v3ffy743iy.png" alt="The CloudFront Execution Lifecycle"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h4&gt;
  
  
  1. The Bayes Theorem &amp;amp; Execution Order
&lt;/h4&gt;



&lt;p&gt;In AWS, CloudFront Functions run at the Viewer Request phase (before the WAF). Lambda@Edge can run at the Origin Request phase (after the WAF).&lt;/p&gt;

&lt;p&gt;We want to ensure: 

&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;Pr(Passed WAF∣Has Signature)≈1Pr(\text{Passed WAF} | \text{Has Signature}) \approx 1&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="mord mathnormal"&gt;r&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Passed WAF&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Has Signature&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;≈&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kevin's Architecture (Post-WAF)&lt;/strong&gt;: Because execution is sequential, if the signature exists, the WAF must have already passed. The probability 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;Pr(Passed WAF∣Has Signature)=1Pr(\text{Passed WAF} | \text{Has Signature}) = 1&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="mord mathnormal"&gt;r&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Passed WAF&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Has Signature&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 by definition.&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;My Architecture (Pre-WAF)&lt;/strong&gt;: Because CFF signs the request "blindly" before inspection, we must apply &lt;em&gt;Bayes' Theorem&lt;/em&gt;. &lt;/li&gt;
&lt;/ul&gt;




&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;Pr(Passed WAF∣Has Signature)=Pr(Has Signature∣Passed WAF)⋅Pr(Passed WAF)Pr(Has Signature)=Pr(Passed WAF)
\begin{aligned}
&amp;amp;Pr(\text{Passed WAF} | \text{Has Signature}) \newline
 &amp;amp;= \frac{Pr(\text{Has Signature} | \text{Passed WAF}) \cdot Pr(\text{Passed WAF})}{Pr(\text{Has Signature})} \newline
 &amp;amp;= Pr(\text{Passed WAF})
\end{aligned}
&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mtable"&gt;&lt;span class="col-align-r"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="col-align-l"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="mord mathnormal"&gt;r&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Passed WAF&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Has Signature&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mopen nulldelimiter"&gt;&lt;/span&gt;&lt;span class="mfrac"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="mord mathnormal"&gt;r&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Has Signature&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="frac-line"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="mord mathnormal"&gt;r&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Has Signature&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;∣&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Passed WAF&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;⋅&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="mord mathnormal"&gt;r&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Passed WAF&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose nulldelimiter"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;P&lt;/span&gt;&lt;span class="mord mathnormal"&gt;r&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Passed WAF&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;




&lt;p&gt;To maintain Zero-Trust integrity, you must rigorously ensure your WAF processes every signed request.&lt;/p&gt;





&lt;h4&gt;
  
  
  2. Replay Attacks and Missing Payloads
&lt;/h4&gt;



&lt;p&gt;CloudFront Functions &lt;strong&gt;cannot read or hash the request body&lt;/strong&gt;. This means the payload is unprotected by the signature.&lt;/p&gt;

&lt;p&gt;To mitigate this and prevent &lt;em&gt;Replay Attacks&lt;/em&gt;, your &lt;code&gt;HMAC-SHA256&lt;/code&gt; signature must be strictly time-bound. A 30-to-60 second TTL on the timestamp header ensures that even if an attacker intercepts a signed header, the window to exploit it is practically closed.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Why Kevin's Architecture might be a Better Choice
&lt;/h4&gt;

&lt;p&gt;If your backend APIs involve &lt;em&gt;heavy asynchronous processing&lt;/em&gt; that takes 5 to 10 seconds to resolve, &lt;strong&gt;latency is not your primary concern&lt;/strong&gt;. In those scenarios, Kevin’s Asymmetric KMS approach is the better fit. The latency overhead won't be noticed, and asymmetric cryptography executed post-WAF provides stronger isolation without relying on WAF configuration hygiene.&lt;/p&gt;

&lt;p&gt;However, if your APIs are &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;highly latency-sensitive,&lt;/li&gt;
&lt;li&gt;read-heavy, or &lt;/li&gt;
&lt;li&gt;serving dynamic content,&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;the unit economics and speed of the CFF pattern are mathematically undeniable.&lt;/p&gt;




&lt;h3&gt;
  
  
  Coming Up in Part 2: The Benchmarks
&lt;/h3&gt;



&lt;p&gt;Theory is great, but &lt;strong&gt;hard data is better&lt;/strong&gt;. In Part 2 of this series, I am going to open-source a custom-built, TypeScript benchmarking engine.&lt;/p&gt;

&lt;p&gt;Most CDN benchmarks are deeply flawed by &lt;em&gt;TCP Keep-Alive hoarding&lt;/em&gt; and &lt;em&gt;submarine cable jitter&lt;/em&gt;. We are going to parse standard deviations, isolate pure V8 engine compute overhead, and prove exactly how much latency these architectures add.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Spoiler alert: We reduced the latency penalty from &lt;code&gt;~100ms&lt;/code&gt; down to &lt;code&gt;2.5ms&lt;/code&gt; and a substantial price drop.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Stay tuned.&lt;/p&gt;




&lt;h3&gt;
  
  
  Acknowledgments &amp;amp; Notes
&lt;/h3&gt;



&lt;p&gt;&lt;strong&gt;A Special Thanks:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;I want to extend a massive thank you to my employer, &lt;a href="https://hket.com" rel="noopener noreferrer"&gt;HKET&lt;/a&gt;, and my supervisor, &lt;a href="https://www.linkedin.com/in/jack-yeung-083b23236/" rel="noopener noreferrer"&gt;Jack Yeung&lt;/a&gt;. Fostering an engineering culture that actively supports open-source benchmarking, technical knowledge sharing, and public writing is rare. Their full backing and encouragement made this research and blog series possible. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Author's Note: The architectural concepts, cryptography math, code, and benchmarking data in this series are 100% my original work. I utilized an LLM strictly as an editorial assistant to help structure and refine the prose of this article.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>zerotrust</category>
      <category>cloudnative</category>
      <category>cryptography</category>
    </item>
  </channel>
</rss>
