Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/ADMIN_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ To enable the admin API, and manage namespaces, two extra flags need to be passe
- `--admin-listen-addr <addr>:<port>`: the address and port on which the admin API should listen. It must be different from the user API listen address (which defaults to port 8080).
- `--enable-namespaces`: enable namespaces for the instance. By default namespaces are disabled.

**The admin API has no authentication unless you also set `--admin-auth-key <key>` (or the `LIBSQL_ADMIN_AUTH_KEY` environment variable).** Without it, anyone who can reach `--admin-listen-addr` can create, delete, and fork any namespace, and can rewrite a namespace's own config, including its `jwt_key` (which controls who can authenticate to that namespace's user-facing API) and `heartbeat_url`/`dump_url` (both of which cause the server to make an outbound request to a URL in the request body). Always set `--admin-auth-key` when `--admin-listen-addr` is reachable from anywhere other than a fully trusted local process, and prefer binding it to a loopback or private-network address rather than `0.0.0.0`.

## Routes

```HTTP
Expand Down
8 changes: 8 additions & 0 deletions docs/DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ the Ed25519 public key in URL-safe base64.

You can also pass the key directly in the env variable SQLD_AUTH_JWT_KEY.

### `LIBSQL_ADMIN_AUTH_KEY`

Auth key for the admin API (`SQLD_ADMIN_LISTEN_ADDR`). The admin API has no
authentication at all unless this is set, and it manages every namespace on
the instance (create/delete/fork, and per-namespace config including
`jwt_key`). If you set `SQLD_ADMIN_LISTEN_ADDR` to anything reachable outside
a fully trusted local process, set this too. See `docs/ADMIN_API.md`.

## Environment variables

### `SQLD_NODE`
Expand Down
Loading