The Simplest Way to Make Fastly Compute Edge and Webauthn Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Running fastly compute edge and webauthn together checks user logins near the user. This setup stops bad traffic before it hits your main servers. Teams use this pair to check hardware keys and passkeys fast. Edge nodes run the login logic without calling a central server first. Users get fast logins and strong security across all regions. Your origin apps only handle traffic from checked users. How fastly compute edge and webauthn share login data The login flow starts when a user tries to

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Running fastly compute edge and webauthn together checks user logins near the user. This setup stops bad traffic before it hits your main servers.

Teams use this pair to check hardware keys and passkeys fast. Edge nodes run the login logic without calling a central server first. Users get fast logins and strong security across all regions. Your origin apps only handle traffic from checked users.

How fastly compute edge and webauthn share login data

The login flow starts when a user tries to log in. The edge node makes a random challenge for the user browser. The browser asks the user to touch a key or scan a face. The device signs the challenge with a private key stored on the device.

Next, the browser sends the signed response back to the edge node. The edge worker needs the public key to check this signature. Teams store these public keys in an edge data store. The edge code reads the public key and checks the cryptographic signature.

Permissions stay tight during this whole process. The edge service only needs read permissions for the public key store. Only the sign-up flow gets write permissions to add new keys. Once the signature passes the check, the edge node issues a session token. The request then moves to the backend app with a verified user identity.

Data masking also matters when logging these login events. If logs hold emails or phone numbers, masking rewrites matched fields in results. This keeps private user details safe during edge audits.

Common failure modes and how to scope edge roles

A common failure mode is using shared service accounts for edge stores. If one edge service has full admin rights, a bug can wipe keys. Teams also fail when they issue broad tokens that work across every app. Unlogged queries to the key store make it hard to spot attacks.

FIDO2 / WebAuthn + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Another risk comes from skipping challenge state checks at the edge. If the edge node does not track used challenges, attackers can replay logins. Clock drift between edge data stores and backend servers also breaks token checks. Teams must set strict timeouts on every login challenge.

To fix these issues, scope roles down to single tasks. Give the login worker read-only roles for the public key table. Put key registration in a separate worker with scoped write permissions. Use network rules so backend apps only accept traffic from verified edge nodes.

Keep edge tokens short and bind them to specific backend services. Log every key check with a user ID and timestamp. When logs capture card numbers or national IDs, masking rewrites matched fields in results. Review these logs every week to catch strange login patterns early.

Keeping public key stores in sync across regions

Edge apps run in many places around the world at once. When a user adds a new passkey, every edge node needs that key. If the store syncs too slow, the user cannot log in right away. Teams must pick edge storage that shares new data in seconds.

You also need a clear plan for lost user devices. When a user loses a key, the team must delete that public key. That deletion must reach every edge location right away to block bad logins. Testing how fast keys delete helps keep your login system safe.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Where should teams store public keys for edge checks?

Teams store public keys in an edge key-value store. This lets the edge worker read the key without calling the origin server.

How do edge workers prevent replay attacks during login?

The edge worker generates a fresh random number for each login attempt. It deletes the number right after one check so nobody can reuse it.

What happens if the edge key store goes offline?

The edge code can fall back to the main origin database for checks. Teams set strict alerts so they can fix the edge store fast.

The query runs. The emails stay hidden.