rqlite is a lightweight, open-source, fault-tolerant relational database built on SQLite and the Raft consensus protocol.
Versions 10.7.2 through 10.8.1 focus on four core themes: a security fix for clusters which use authentication with read replicas, tighter limits on what SQL statements and diagnostic endpoints can reach, a cap on the size of requests between nodes, and further fixes to the rewriting of time functions. Version 10.7.5 also makes replacing a database via a load, boot, or restore more robust.
There are no API changes in this series, though a few defaults are now stricter, as described below. All operators are strongly encouraged to upgrade to 10.8.1 due to the security fixes included in this series.
A Security Fix for Read-Replica Joins
Version 10.7.5 resolves a moderate-severity vulnerability affecting clusters which use authentication. rqlite allows you to grant a credential permission to join a cluster only as a read replica. Previously, if a joining node presented the node ID or Raft address of an existing node, rqlite removed the existing node and replaced it with the new one, without checking what kind of node was being replaced. As a result a credential which was only permitted to add read replicas could remove a voting node from the cluster, something which normally requires the separate remove permission.
Version 10.7.5 ensures that a joining node can only replace a node of the same type, and can replace at most one node. A join which is rejected leaves the cluster unchanged.
Keeping SQL Inside the Database
Version 10.6.3 blocked SQLite ATTACH statements on the query database connection. Version 10.8.1 completes that work. A user with execute permission could still use ATTACH, or VACUUM INTO, to read or create SQLite files elsewhere on the host filesystem. rqlite now refuses both statements on every database connection, however the filename is supplied. A plain VACUUM continues to work as before.
Less Exposed by Default
Version 10.8.0 changes the diagnostic information a node serves over HTTP. pprof profiling data was previously always available under /debug/pprof. It is now served only if the node is started with the new -http-pprof flag, which is off by default. If you collect profiles from running nodes, add this flag when you upgrade. The same release removes the node’s command line from the expvar output at /debug/vars. Both kinds of information could be considered sensitive, so rqlite now restricts access by default.
Limiting the Size of Internode Requests
Nodes in a cluster send requests to each other, for example when a follower forwards a write to the Leader. Previously a node placed no upper bound on the size of a request it would accept from another node, and it reserved memory for the entire request as soon as it learned the size — before any of the data had arrived.
Version 10.7.3 fixes this. A node now allocates memory only as the data arrives, and enforces a maximum request size, closing the connection if a request exceeds it. The limit defaults to 1GB and can be changed at launch time via the -node-max-request-size flag. If you load datasets approaching 1GB in size into a cluster, you may need to increase this limit.
Time Functions and Deterministic Writes
rqlite rewrites non-deterministic functions before a statement is written to the Raft log, so that every node stores exactly the same value. Several gaps in the rewriting of time functions were resolved:
- Implicit current time: Version 10.7.3 rewrites time functions which default to the current time, such as
datetime()andunixepoch('subsec'). Previously only functions which named the current time explicitly were rewritten. - One time per statement: Version 10.7.4 captures the current time once per statement, which matches how SQLite itself behaves.
- Timezones: Version 10.7.4 also normalizes the timezone used for Julian Day calculations, fixing a bug in rewriting when the nodes of a cluster run in different timezones.
Next Steps
Several other correctness and data integrity fixes landed across the series. For full details, see the CHANGELOG. To discuss these releases or ask questions, join the rqlite Slack channel.