How to Configure MFA Policy

Published
Length
3 min read

Luis Felipe Dias

All posts

An mfa policy controls how users prove who they are with a second check. You set it up by linking factor rules to user groups and risk levels. Passwords alone fail when attackers steal or guess them. A strong second step stops bad actors before they reach your systems. Teams need clear rules that cover every human user and admin role. Good rules balance strong security with fast daily logins for your staff. How an mfa policy works and safe defaults The rule checks who the user is and where t

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.

An mfa policy controls how users prove who they are with a second check. You set it up by linking factor rules to user groups and risk levels.

Passwords alone fail when attackers steal or guess them. A strong second step stops bad actors before they reach your systems. Teams need clear rules that cover every human user and admin role. Good rules balance strong security with fast daily logins for your staff.

How an mfa policy works and safe defaults

The rule checks who the user is and where they log in from. Then it asks for a second proof before it grants entry. This setup affects human users, contractors, and admins who touch core tools. Automated workloads and service accounts use keys or tokens instead of human prompts.

Start with safe defaults when you build your first rule set. Require a second factor for every human user without exception. Pick phishing-resistant factors like hardware keys or device passkeys for admin roles. Avoid text message codes or voice calls whenever you can. Attackers can intercept phone codes through SIM swaps or fake login pages. Time-based authenticator apps work well as a baseline for standard staff.

Set short session times so users must prove their identity again after idle hours. Block legacy protocols that bypass second factor prompts during sign-in. Group users by role so admins face stricter checks than read-only staff. Always register at least two backup factors per user during onboarding. This prevents lockouts when someone loses a phone or breaks a hardware key.

Choosing factor types and scoping user groups

Not every role faces the same level of risk each day. Engineers with prod database permissions need stronger checks than staff reading internal docs. Scope your strictest rules to groups that hold write or delete rights. You can also trigger extra prompts when a login looks unusual. Changes in country, IP address, or device health should force a fresh check.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Keep emergency recovery paths tight and well documented for your support desk. Attackers often call help desks and pretend to be locked-out workers. Require video checks or manager sign-off before you reset a lost factor. Create two break-glass admin accounts that use long offline hardware keys. Store those backup keys in a physical safe for true outages only. Alert your security team the moment anyone uses a break-glass account.

Testing rules and what keeps the session active after login

Test every new rule on a small pilot group before a full rollout. Watch your sign-in logs to spot failed prompts or loops right away. Check that every login event writes a clear log with the factor type used. Auditors will ask for proof that every admin used a strong factor. Review your factor logs each month to find inactive devices or weak settings.

Still, a login check only guards the front door of your systems. Once a user passes the prompt, static rules stop watching what they do. An engineer with a valid session can still run risky commands or queries. They might drop a table or pull sensitive customer emails by mistake. Malware on a laptop can also hijack an active session after sign-in. You need controls inside the session to approve actions and mask sensitive fields. Masking rewrites matched fields like card numbers or national IDs in query results.

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 sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses 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

Which users should get the strictest factor rules first?

Start with system admins, cloud engineers, and anyone with prod data permissions. Give these groups hardware keys or passkeys before you update standard user groups.

How do we handle service accounts that cannot answer prompts?

Exclude non-human accounts from interactive prompts and place them in a separate group. Secure them with short-lived tokens, strict IP limits, and regular key rotation instead.

What happens after a user passes the second factor check?

The identity provider grants a session token and steps out of the way. You still need command logging, action approvals, and data masking for active sessions.

The query runs. The emails stay hidden.