Firebasers -
We are in the process of making our Security Rules both easier to write and more powerful. To that end, we've built a tool that allows you to write your security rules in a more user-friendly syntax and then compiles that syntax into JSON.
This tool is called the Blaze compiler, and we're making the beta version of it available immediately here:
The headline features are:-
- Rules are specified in a more user-friendly YAML syntax
- Terser security expression syntax (e.g array notation for child dereferencing)
- Reusable predicates (boolean functions) within expressions, allowing for rules re-use
- Reusable models allow schema to be written once and used multiple places
- Access control is now a separate concern from constraints
- Inline tests to help verify correctness at compile time
- Specify Firebase layout with typed JSON schema models
- Embed global functional constraints in the schema
I'm very keen to hear your thoughts and improvements. Please post your thoughts to the group or email me directly (
tlark...@firebase.com). Don't hold back -- we want to make writing Firebase rules the best possible experience, so if there's anything you like, dislike, or think can be improved, we want to know about it.
I am maintaining a change log at the top of the readme so you can see at a glance whether the syntax has changed significantly if something evolves (I'll also post updates to this thread).
Please remember that this is a work-in-progress, so you'll likely find some rough edges (for starters, the error messages are still a bit lacking). Also keep in mind that we're doing a ton of other work on our end to improve all aspects of authentication and security, and we know this compiler is just a start. Expect to see our security features improve by leaps and bounds over the coming months.
I hope to hear from you soon -