You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -320,8 +320,12 @@ This link also explains how to setup CurveZMQ encryption and ZAP authentication
320
320
321
321
# Docker Examples
322
322
323
+
The following `docker-compose` examples using the docker image `aosing/sqlite_rx`
324
+
325
+
`sqlite-server` CLI is used in all the docker examples
323
326
324
327
## In-memory SQLite Database
328
+
325
329
```yaml
326
330
version: "3"
327
331
services:
@@ -335,6 +339,8 @@ services:
335
339
336
340
## On Disk SQLite Database
337
341
342
+
docker volume is used to persist the database file on the host's file system
343
+
338
344
```yaml
339
345
340
346
version: "3"
@@ -352,9 +358,21 @@ volumes:
352
358
data: {}
353
359
```
354
360
361
+
- Named docker volume `data` is mounted to `/data` location in the container
362
+
- `sqlite-server` CLI accepts `--database` option which is the database path in the container.
363
+
Form is `/data/<dbname>.db`
364
+
355
365
356
366
## SQLite Database server with CurveZMQ encryption
357
367
368
+
CurveZMQ is a protocol for secure messaging across the Internet that closely follows the CurveCP security handshake. `curve-keygen` is a script (packaged with sqlite_rx) which is modeled after `ssh-keygen` to generate public and private keys.
369
+
Curve Key Generation uses an OpenSSH like directory: `~/.curve`
370
+
371
+
We need public keys for both servers and clients. We differentiate this by running the `curve-keygen` script in either client or server mode.
372
+
373
+
Once the keys have been generated, we can enable `CurveZMQ` encryption in the following
374
+
way
375
+
358
376
```yaml
359
377
360
378
version: "3"
@@ -373,8 +391,19 @@ volumes:
373
391
data: {}
374
392
```
375
393
394
+
- `sqlite-server` CLI accepts `--curvezmq` boolean flag to enable encryption
395
+
- `sqlite-server` CLI accepts `--key-id` which is the server key id available at `/root/.curve` location
396
+
- `/Users/as/.curve` (on host machine) is mapped to `/root/.curve` in the docker container.
397
+
398
+
376
399
## SQLite Database server with CurveZMQ encryption and ZAP authentication
377
400
401
+
ZeroMQ Authentication protocol
402
+
403
+
Setting `--zap = True` will restrict connections to clients whose public keys are in the `/root/.curve/authorized_clients/` directory. Set this to `False` to allow any client with the server's
404
+
public key to connect, without requiring the server to possess each client's public key.
0 commit comments