- ~300lines of JavaScript in the Copilot Studio Worker
- 2key slots, so credentials rotate without an outage
- 300 sreplay window on signed events
- 5 minbetween edge sweeps for events past their service window
A trimmed surface for Copilot Studio
Auth and access plane lets Microsoft Copilot Studio call tools in my private estate, and its connector behaves in ways its documentation does not describe.
I put a Cloudflare Worker in front of the estate as the connector's only public surface. The edge runtime has none of the usual crypto libraries, so tokens are verified with WebCrypto against signing keys cached in KV.
The edge logs showed what Copilot Studio actually sends: unauthenticated discovery probes, renamed parameters, and response caching on Microsoft's API hub.
I shape integrations from how a vendor's client behaves in practice.
Verifying signed events at the edge
FAFOHive sends signed social-platform events to agents, and delivery over the internet repeats and reorders. I ended the event plane at an edge listener built on a Worker with D1 and KV; an exact-body HMAC with a replay window makes at-least-once delivery safe to deduplicate.
each signed with a timestamped HMAC over the exact body
a 200 means stored, whether the delivery was new or a duplicate
It also serves a signed cross-provider pull feed. Senders retry only on network or 5xx failures, on a fixed schedule, and every attempt is persisted. Events may be redelivered any number of times; social actions are never repeated.