Skip to content
← Public packages

@kentcdodds/cloudflare-connect-pse-hyperframes

I Built Your Personal Software Ecosystem: Kent C. Dodds's Cloudflare Connect 2026 talk deck, built with HyperFrames. How Kody gives every user one of everything on Cloudflare.

FollowForkOpen app

Files

20-secret-gateway.html

49 lines · 3.9 KB · HTML
<section data-id="secret-gateway" data-label="How the gateway works" data-steps="2" class="slide gw">
	<style>
		.gw .node { min-width: 330px; padding: 28px 38px; }
		.gw .agent { --accent: var(--sky); }
		.gw .handle { font-family: var(--mono); font-size: 32px; color: var(--string); }
		.gw .rules { display: grid; gap: 8px; margin-top: 4px; font-family: var(--mono); font-size: 32px; text-align: left; }
		.gw .rule { padding: 4px 14px; border-radius: 10px; color: var(--body); }
		.gw .rule i { font-style: normal; font-weight: 700; margin-left: 14px; }
		.gw .rule.ok i { color: var(--green); }
		.gw .rule.no i { color: var(--danger); }
		.gw .rule[data-hot="1"].ok { background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--ink); }
		.gw .rule[data-hot="1"].no { background: color-mix(in srgb, var(--danger) 24%, transparent); color: var(--ink); }
		.gw .states { display: grid; }
		.gw .state { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
		.gw .host { min-width: 440px; }
		.gw .host .bearer { font-family: var(--mono); font-size: 32px; color: var(--string); }
		.gw[data-blocked="1"] .host { --accent: var(--danger); border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
		.gw[data-blocked="1"] .host .t { color: var(--danger); }
		.gw .legend { position: absolute; left: 20px; top: 545px; translate: 0 -50%; display: grid; font-size: 44px; font-weight: 600; color: var(--body); line-height: 1.25; }
		.gw .legend > span { grid-area: 1 / 1; }
		.gw .legend b { display: block; color: var(--green); }
		.gw .legend .bad b { color: var(--danger); }
	</style>
	<h2 data-enter>How the gateway works</h2>
	<div class="stage" data-enter>
		<svg class="wires" aria-hidden="true">
			<path class="wire" data-name="a-dw" data-from="agent" data-to="dw"></path>
			<path class="wire" data-name="dw-gw" data-from="dw" data-to="gw"></path>
			<path class="wire" data-name="gw-host" data-from="gw" data-to="host" data-route="v"></path>
		</svg>
		<div class="node agent" data-node="agent" style="left: 190px; top: 190px"><span class="t"><span class="ico ico-claude"></span>Agent</span><span class="d">never sees<br>the value</span></div>
		<div class="node cf" data-node="dw" style="left: 760px; top: 190px"><span class="t">Dynamic Worker</span><span class="handle">credential('github')</span><span class="d">holds a handle only</span></div>
		<div class="node cf" data-node="gw" style="left: 1380px; top: 190px"><span class="t"><span class="ico ico-cloudflare"></span>Kody gateway</span><span class="rules"><span class="rule ok" data-rule="ok">api.github.com<i>&#10003;</i></span><span class="rule no" data-rule="no">paste.example<i>&#10005;</i></span></span><span class="d">adds the key</span></div>
		<div class="node host" data-node="host" style="left: 1380px; top: 560px">
			<span class="t" data-host>api.github.com</span>
			<span class="states"><span class="state" data-until="0"><span class="bearer">Bearer &bull;&bull;&bull;&bull;9f3c</span><span class="d">200 OK, 5 repos</span></span><span class="state" data-step="1"><span class="bearer">not sent</span><span class="d">0 bytes, no key</span></span></span>
		</div>
		<p class="legend"><span data-until="0"><b>Approved host:</b> the key is added at the boundary</span><span class="bad" data-step="1"><b>Unapproved host:</b> nothing leaves</span></p>
	</div>
	<p class="brand">kody.codes</p>
	<aside class="notes">
		The module runs in a Dynamic Worker. github.fetch does not hit GitHub. It hits Kody's
		gateway, carrying only the credential's handle. The gateway checks the credential's hosts,
		then places the value on the request at the boundary: Authorization Bearer by default.
		GitHub answers 200 and the response comes back the same way. A host outside the
		credential's hosts gets nothing: host_not_allowed, and the key is withheld. Steal this
		even without Kody: name at the boundary, materialize at egress.
	</aside>
</section>