Firetool

Home / Features / Security rules editor

Security rules

A Firestore security rules editor on your desktop

Open the rules Firebase has for a Firestore database or a Storage bucket, try requests against them in a simulator, compare earlier versions, check them for errors and deploy a change, with the same production checks as your data and the old rules kept so you can put them back.

Why here

Rules next to the data they protect

Security rules decide who can read and write every document and file, so a wrong line can lock out your app or open your data to anyone. Firetool shows the rules that are live right now, in the same window as the collections they cover, and treats a deploy like any other change to production: it is checked, confirmed and written to the audit log.

Edit and check

Firebase checks the rules before anything goes live

Right-click a database in the sidebar and choose Security rules…, or use Tools, Security rules…. Edit the rules, then choose Check: Firebase compiles them and lists every error and warning with its line and column. Click one to go there. Checking saves nothing.

  • Firestore rules for each database, including named ones
  • Storage rules for each bucket
  • Shows since when the rules have been live
  • Colours for keywords, methods, strings, comments, path variables and request / resource
The security rules editor in Firetool with Firestore rules for users, orders and products, and the message that Firebase found no errors

Simulator (new in 3.0)

Try a request before you deploy

Pick get, list, create, update or delete, a document path (or a Storage file path), and who is asking: not signed in, or signed in with a user ID, an email and custom claims. Add the stored and the written document as JSON where they matter. Firebase checks the request against the rules in the editor, deployed or not, and answers Allowed or Denied.

  • Every expression Firebase evaluated, with its value, true or false
  • Each one linked to its line in the rules
  • Debug messages and errors
  • Nothing is read or changed, and it works in the Free edition
Try a request in the simulator
The rules simulator in Firetool: an update to an orders document is Denied, with the evaluated lines marked true or false

Deploy safely

The checks a production change deserves

Production asks first

On a project marked production, Firetool asks you to type the project ID before the rules go live, and asks for a reason when your policy says so.

See what changes

New in 4.5.1: the Deploy confirm reads the live rules again and shows them against the editor, only the changed lines with a few around each.

No overwriting someone else

If the rules were changed in the Firebase console or with the CLI after you opened them, the confirm says so, shows their rules as the live ones and keeps Deploy off, so their change isn't lost.

Compare and promote

New in 4.5.1: the Compare view shows another project's or database's live rules (or another bucket's, for Storage) against the editor. Put theirs in this editor copies them here; Open … with these rules opens the other side in a new tab with this editor's text. Nothing goes live until you press Deploy there, with all the checks above. Compare environments

History and compare

New in 3.0: the project's earlier rules, newest first, with the live one marked, including rules deployed from the Firebase console or CLI. Compare with the editor shows the lines that differ; Put back in the editor loads one to check and deploy.

Put the old rules back

Every deploy goes in the audit log with the rules it replaced. Put back these rules… opens them in the editor, ready to check and deploy again.

Roles and read-only

A Viewer, a read-only project or the Free edition can open and check rules but not deploy them.

Questions

Security rules in Firetool: common questions

Does Firetool change my firestore.rules file?

No. Firetool works with the rules that are live in Firebase. If you also deploy from a file with the Firebase CLI, copy your change into the file, or the next CLI deploy puts the file's version back.

Can I test a request against my rules?

Yes. The Simulator tries a get, list, create, update or delete against the rules in the editor, deployed or not, signed in or not, and shows Allowed or Denied with the lines Firebase evaluated and their values. It reads and changes nothing.

What access does my Google account need?

Firebase Rules Viewer to open the rules, and Firebase Rules Admin (or Owner or Editor) to deploy them.

Does deploying rules need Pro?

Yes. Opening, checking, comparing and simulating rules work in the Free edition; deploying needs Pro, which every computer can try free for 30 days.

Try it on your own data

Free for Windows, macOS and Linux, with every Pro feature for the first 30 days.