rules
Firebase Security Rules provide access control and data validation in a simple yet expressive language. They are used to secure products such as Cloud Storage and Cloud Firestore.
This documentation is divided into two sections:
- Interfaces - data types common to all products that use Security Rules.
- Namespaces - data types and functions that are product or context specific.
Interfaces
Boolean
Primitive type representing a boolean value, true
or
false
.
Bytes
Type representing a sequence of bytes.
Duration
Time duration with nanosecond accuracy.
Float
Primitive type representing a 64-bit IEEE floating point number.
Integer
Primitive data type representing a signed 64-bit integer value.
LatLng
Latitude and longitude geopoint.
List
Heterogeneous list of items.
Map
Key-value mapping.
MapDiff
Object representing the difference between rules.Map objects.
Number
A value of type Integer
or type Float
.
Path
Directory-like pattern for the location of a resource.
Set
Unordered, heterogeneous list of unique items.
String
Primitive type representing a string value.
Timestamp
Timestamp in UTC with nanosecond accuracy.
Namespaces
debug
Security Rules language debug statement
duration
Globally available duration functions.
firestore
Variables and functions available in Cloud Firestore rules.
hashing
Globally available hashing functions.
latlng
Globally available latitude-longitude functions.
math
Globally available mathematical functions.
timestamp
Globally available timestamp functions.