The Simplest Way to Make GCP Secret Manager and Webauthn Work Like They Should
Teams pair gcp secret manager and webauthn to verify users before apps fetch secrets. This setup requires a hardware key touch before any system reads sensitive data. Cloud vaults store database keys, API tokens, and certificates in one safe place. Hardware keys prove that a real person approved the login request. Together, they stop attackers who steal passwords or session cookies from reading secrets. This guide explains how both tools pass identity data and how to avoid setup mistakes. How
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 pair gcp secret manager and webauthn to verify users before apps fetch secrets. This setup requires a hardware key touch before any system reads sensitive data.
Cloud vaults store database keys, API tokens, and certificates in one safe place. Hardware keys prove that a real person approved the login request. Together, they stop attackers who steal passwords or session cookies from reading secrets. This guide explains how both tools pass identity data and how to avoid setup mistakes.
How gcp secret manager and webauthn share identity data
The workflow starts when an engineer or app asks for a stored secret. First, the identity provider prompts the user to log in with WebAuthn. The user touches a hardware key or uses a device sensor to sign in. The browser checks the domain name and sends a signed proof to the server. This step stops phishing attacks because the key checks the exact site address.
Next, the identity system trades that proof for a short-lived cloud token. That token carries the user identity and the hardware check status inside its claims. The app then sends this token to the Google Cloud API. Cloud IAM reads the token and checks the role rules for that specific secret. If the role matches and the check passes, the vault returns the secret value.
Each step leaves a clear audit log in the cloud console. Security teams can see which person touched a key and which secret they read. No one stores static cloud keys on a laptop during this entire flow.
Common failure modes and how to scope roles
Many teams break this clean flow by using one shared service account. They put a strong WebAuthn check on the front door of an internal app. Then the app uses one broad cloud role to read every secret in the project. If an attacker finds a bug in that app, they can read all secrets. The hardware key check at login cannot stop an overly broad backend role.
Another common mistake is long token lifetimes after the first hardware check. If a session token lasts for days, an attacker can steal it from memory. They can then read secrets for days without touching the hardware key again. Teams should set short session times for any role that reads production secrets.
GCP Secret Manager + FIDO2 / WebAuthn: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix these risks, split secrets into small groups by app and team. Create separate cloud roles for each group and block wildcard permissions. Require a fresh WebAuthn check every time a human asks for a production key. Lock down network paths so only approved servers can call the secret API. Turn on data access logs in Google Cloud to track every read request.
Designing a clean approval flow for engineers
Automated apps do not have fingers to touch a hardware key. They should use workload identity tied to their specific server role. Human engineers, Still, often need to run a database task or check a token. Give humans a clear path that demands a WebAuthn tap right before the task runs.
Do not let engineers download raw secret values to their local machines. Once a secret sits in a local text file, cloud audit logs lose track of it. Instead, keep the secret in memory only for the duration of the approved command. When the task finishes, drop the secret and close the session right away.
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
Can GCP Secret Manager talk to a WebAuthn key directly?
No, the secret vault does not run browser prompts on its own. An identity provider or workforce pool must check the hardware key first and issue a cloud token.
How do we stop shared service accounts from bypassing WebAuthn?
Remove broad service account keys from user laptops and shared servers. Map each human user to a distinct cloud identity that requires a passkey check before reading secrets.
What happens if an engineer loses their hardware security key?
Admins should let users register two keys or a backup device sensor. If both are lost, an admin revokes the old key and checks identity before adding a new one.
Related guides
In this post