SIGN IN SIGN UP

TUN-10801: Cache quick tunnel broker JWKS

## Summary

Adds the process-local broker JWKS cache used by protected Quick Tunnel assertion validation. Fetches keys only from the fixed broker endpoint with a five-second timeout, refuses redirects, bounds and validates responses, accepts only public P-256 ES256 signing keys, reuses cached keys, and refreshes once for an unknown key ID. Concurrent cache misses and refreshes are deduplicated.

## Stack

- Part 1/2: this MR
- Followed by: `afrigerio/TUN-10801-assertion-validation`

## Validation

- `make test lint`
- focused `go test -race ./connection` coverage for JWKS caching and refresh
A
Alessandro Frigerio committed
156742e3acd90768847f2356470806ba6ed8c5ca
Parent: 5539e45
Committed by Miguel da Costa Martins Marcelino <mdacostamartinsmarcelino@cloudflare.com> on 9/16/2026, 5:26:55 PM