RethinkDB Proxy
Reverse proxy for RethinkDB
Make your RethinkDB publicly accessible through limiting what kind of queries can be executed on your RethinkDB database.
Introduction by Example
First, start the proxy.
$ rethinkdb-proxy --port 8125
Using the proxy, getting all users in the users
table is allowed.
r;
But deleting the users is not:
;; r;
Running rethinkdb-proxy
CLI
rethinkdb-proxy comes with a CLI out-of-the box:
rethinkdb-proxy --port 8125
Module
You can also import rethinkdb-proxy into Node.js:
import rethinkDBProxy from 'rethinkdb-proxy';
rethinkDBProxy({ port: 8125, allowInsert: true });
Options
port
rdbHost
rdbPort
dbs
allowSysDbAccess
tables
allowWrites
allowInsert
allowUpdate
allowDelete
allowReplace
allowDbCreate
allowDbDrop
allowTableCreate
allowTableDrop
allowIndexes
allowIndexCreate
allowIndexDrop
allowIndexRename
allowReconfigure
allowRebalance
allowHttp
allowJavascript
Port
Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
port |
--port |
8125 |
Port in which to listen for driver connections. You should point your driver to this port.
RethinkDB Host
Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
rdbHost |
--rdb-host |
localhost |
connect |
Host in which RethinkDB is running.
RethinkDB Port
Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
rdbPort |
--rdb-host |
localhost |
connect |
Host in which RethinkDB is running.
Databases
Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
dbs |
--dbs |
[ ] |
Database to allow access to. By default, all database are allowed except rethinkdb
.
Allow System Database Access
Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowSysDbAccess |
--allow-sys-db-access |
false |
Allow access to the rethinkdb
database. This is not allowed by default, because
access to this database allows to delete all other data.
Tables
Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
tables |
--tables |
[ ] |
Tables to allow access to. Tables must include their database db.table
.
Allow Writes
Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowWrites |
--allow-writes |
false |
Allow all operations that write to the database (insert
, update
, delete
).
insert
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowInsert |
--allow-insert |
false |
insert |
Allow insert
queries.
update
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowUpdate |
--allow-update |
false |
update |
Allow update
queries.
delete
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowDelete |
--allow-delete |
false |
delete |
Allow delete
queries.
replace
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowReplace |
--allow-replace |
false |
replace |
Allow replace
queries.
dbCreate
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowDbCreate |
--allow-db-create |
false |
dbCreate |
Allow dbCreate
queries
dbDrop
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowDbDrop |
--allow-db-drop |
false |
dbDrop |
Allow dbDrop
queries
tableCreate
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowTableCreate |
--allow-table-create |
false |
tableCreate |
Allow tableCreate
queries.
tableDrop
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowTableDrop |
--allow-table-drop |
false |
tableDrop |
Allow tableDrop
queries.
Allow Indexes
Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowIndexes |
--allow-indexes |
false |
Allow all operations on indexes (indexCreate
, indexDrop
, indexRename
).
indexCreate
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowIndexCreate |
--allow-index-create |
false |
indexCreate |
Allow indexCreate
queries.
indexDrop
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowIndexDrop |
--allow-index-drop |
false |
indexDrop |
Allow indexDrop
queries.
indexRename
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowIndexRename |
--allow-index-rename |
false |
indexRename |
Allow indexRename
queries.
reconfigure
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowReconfigure |
--allow-reconfigure |
false |
reconfigure |
Allow reconfigure
queries.
rebalance
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowRebalance |
--allow-rebalance |
false |
rebalance |
Allow rebalance
queries.
http
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowHttp |
--allow-http |
false |
http |
Allow queries with the http
term.
js
Allow Module Parameter | CLI Parameter | Default | API Reference |
---|---|---|---|
allowJavascript |
--allow-javascript |
false |
js |
Allow queries with the js
term.