Require a second factor
Choose All of: Record owner; Signed in with 2FA in the rule picker. All must pass: the owner, signed in with a second step (aal2). A password alone is refused with a 403.
Step-up in your app
When a person is signed in ataal1, don’t make them sign out. Catch the refusal, explain, and take them through the second step (the flow is in Two-step verification), then retry:
(await pawabase.auth.mfa.status()).aal is aal2 once the second step is done.
Only your servers
Choose Secret keys & Studio in the rule picker. Nothing from a browser can do it. Wrap it in a route that checks everything and uses a secret key.Admin with a second factor and a company address
Pick List and add Users with roleadmin, Signed in with 2FA, and a Custom condition with $auth.email ends with @yourcompany.com. Also turn on Require a verified email in Restrictions.
Keys with a specific scope
For an integration key:- All of these rules pass:
- Key has scope
orders:export - Uses a secret key
- Key has scope
Limit by caller kind
Allow people, not anonymous or service callers:- Caller kind is
user
Allow from known addresses
- Compare values:
$request.ipstarts with203.0.113.
Make it hard to delete
- Leave
deleteoff and use soft delete. - Or all of: Record owner; Signed in with 2FA.
- Back up before bulk removals (Backups).
Audit it
Sensitive writes should leave a trail. Subscribe a flow to the table’s events and record theactor, the record and the time in an audit_log table only service can write (pattern). Also watch sign-in activity.
Alert on it
Use Auth webhooks foruser.mfa_disabled, user.disabled, session.reuse_detected, and a webhook on your sensitive table’s events to notify your team.
Two-step verification
The step-up flow.
Roles
Staff roles.