The Simplest Way to Make Compass and Fido2 Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

You pair Compass and Fido2 by tying your database client to an identity provider. This setup requires a hardware key touch before an engineer can read or write data. Teams use Compass to inspect collections, build queries, and check index performance. Adding a Fido2 key stops phishing attacks and blocks stolen passwords at login. Your team gets fast local database work while security teams get strong user checks. How logins and data flow between Compass and Fido2 Compass does not talk to a F

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.

You pair Compass and Fido2 by tying your database client to an identity provider. This setup requires a hardware key touch before an engineer can read or write data.

Teams use Compass to inspect collections, build queries, and check index performance. Adding a Fido2 key stops phishing attacks and blocks stolen passwords at login. Your team gets fast local database work while security teams get strong user checks.

How logins and data flow between Compass and Fido2

Compass does not talk to a Fido2 hardware key on its own. Instead, you link your database cluster to a central identity provider first. The identity provider checks the Fido2 key during the browser login flow.

An engineer starts a login inside the Compass desktop app on their laptop. The app opens a browser window to the company identity provider right away. The user taps their physical Fido2 security key or uses a built-in biometric sensor.

Once the key check passes, the identity provider sends a token back to Compass. The database checks this token and maps the user to a set role. That role controls which collections and documents the user can read or change. Data then flows between the database cluster and the local client over encrypted network links.

Common failure modes and how to scope roles

Many teams set up strong Fido2 checks but leave shared database passwords active. Engineers often bypass the browser login and paste a shared connection string instead. When that happens, you lose track of who ran a delete query.

Another common mistake is giving broad admin roles to every single federated user. If every engineer gets write permissions on production, a single bad query can break apps. Browser tokens can also stay valid for days if you do not limit them. A long session life weakens the value of touching a hardware key.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix this, turn off static password logins for human users on production clusters. Force every person on the team to log in through the identity provider. Map each identity group to a strict database role with read-only permissions by default. Keep token lifetimes short so users must touch their Fido2 key each morning.

Protecting sensitive fields during local database checks

Even with hardware keys and read-only roles, raw production documents hold risky data. When an engineer opens a user collection in Compass, the screen shows full records. Those records often include emails, phone numbers, card numbers, and national IDs.

Standard database roles work at the collection level, not the field level. A support engineer who needs to check an order status sees payment details too. Data masking solves this by rewriting matched fields in query results before they reach the screen. Teams can also require peer reviews before anyone runs an update command.

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 Compass use a Fido2 key without an identity provider?

No, the desktop client does not read hardware keys directly for database logins. You must connect your database to an identity provider that supports WebAuthn and Fido2.

How do we stop engineers from sharing database connection strings?

Disable static password accounts for human users and enforce federated logins for all teams. Also require a fresh Fido2 check for each new workday session.

What happens to sensitive fields when a user queries a collection?

Without field rules, the client displays every field inside the returned document. Adding data masking rewrites emails, phone numbers, and card numbers in the query output.

The query runs. The emails stay hidden.