The Simplest Way to Make Apigee and Webauthn Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use Apigee and WebAuthn in production to check user hardware keys before routing API calls. This setup stops stolen passwords from reaching backend services. Modern apps face constant login attacks from bots and bad actors. Standard passwords cannot stop these automated threats on their own. Hardware keys and passkeys change how users log in to apps. They replace shared secrets with public and private key pairs. The browser creates a unique signature for the specific web domain. Next, you

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.

Teams use Apigee and WebAuthn in production to check user hardware keys before routing API calls. This setup stops stolen passwords from reaching backend services.

Modern apps face constant login attacks from bots and bad actors. Standard passwords cannot stop these automated threats on their own. Hardware keys and passkeys change how users log in to apps. They replace shared secrets with public and private key pairs. The browser creates a unique signature for the specific web domain. Next, your API layer must check that signature before passing traffic.

How Apigee and WebAuthn handle login and data flow

WebAuthn runs in the browser and talks to a local key or biometric sensor. When a user logs in, the identity server sends a random challenge string. The user touches their hardware key or scans their face to sign it. The browser sends this signed challenge back to the login server.

Apigee sits in front of your backend services and manages API traffic. It does not store the public keys for passkeys directly inside its own database. Instead, it routes the initial login call to a dedicated identity provider. That identity server checks the signed challenge against the stored public key.

Once the check passes, the identity server creates a signed JSON token. This token contains claims that prove the user logged in with a passkey. The client app sends this token on every new API call. Apigee reads the token signature and checks those security claims on each request. If a route needs strong proof, the API layer checks the token age. If the token is valid, the API layer sends the call upstream.

Common failure modes and how to scope roles

Many teams fail by trusting broad tokens across all backend routes. A user logs in once and gets a token that lasts all day. If an attacker steals that session token, they bypass the passkey check. Teams also share one service account between the API layer and backend apps. This shared role makes it impossible to see which human ran a query.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged queries create another major blind spot for security teams. When the API layer forwards traffic, backend databases only see the shared role. They do not record the human user ID or the passkey check status. If a breach happens, auditors cannot trace the bad query to a person. Also, raw query results might return sensitive emails or card numbers to the caller.

To fix this, scope your API tokens to tight roles and short lifetimes. Require a fresh WebAuthn challenge before running high-risk calls like money transfers. Pass the verified user identity in signed headers to the backend service. Set up data masking rules to rewrite phone numbers or national IDs in results. Restrict network paths so backend servers only accept calls from your API tier. Never let external traffic hit the identity server or backend databases directly.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Does Apigee store WebAuthn public keys directly?

No, an external identity server stores the public keys and checks signatures. The API tier checks the resulting token on each request.

How do we require a passkey check for high-risk API routes?

Check the auth context claim inside the user token at the API tier. Reject the call if the token lacks a recent passkey check claim.

Why do backend logs miss the user identity after a passkey login?

Backend apps often use one shared database account for all incoming API calls. You must pass the user ID from the token into the database log.

The query runs. The emails stay hidden.