Repository navigation
Expand file tree
/
Copy pathextenddb.sample.toml
More file actions
executable file
·287 lines (268 loc) · 15.7 KB
/
Copy pathextenddb.sample.toml
File metadata and controls
executable file
·287 lines (268 loc) · 15.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# Copyright 2026 ExtendDB contributors
# SPDX-License-Identifier: Apache-2.0
# extenddb configuration — sample template
#
# Copy this file to extenddb.toml and edit as needed.
# Or run `extenddb init` to generate one automatically.
#
# SECURITY: This file may contain the encryption key for credential storage.
# Set permissions to 0600 (owner read/write only): chmod 600 extenddb.toml
# The server refuses to start if permissions are more permissive.
#
# All values shown are defaults. Uncomment and change to override.
#
# Environment variable overrides use the EXTENDDB__ prefix with __ as separator:
# EXTENDDB__SERVER__PORT=9000
# EXTENDDB__STORAGE__POSTGRES__CONNECTION_STRING="postgresql://..."
# EXTENDDB__AUTH__ENCRYPTION__KEY_FILE=/etc/extenddb/kek
# EXTENDDB__AUTH__ENCRYPTION__REQUIRE_LOCKED_MEMORY=true
# Path to the rendered documentation directory (HTML + PDF files).
# Generated by `python3 docs/build-docs.py`. When set, the web console
# serves documentation at /console/docs. When absent, the docs routes
# show a "not configured" message.
# `extenddb init` auto-discovers this directory if it exists.
# docs_dir = "/path/to/docs/rendered"
[server]
# bind_addr = "127.0.0.1" # Network interface to bind (default: localhost only)
# port = 18443 # HTTP port
# region = "us-east-1" # AWS region for ARN generation
# run_dir = "~/.extenddb/run" # Directory for PID file (~ is expanded to $HOME)
[storage]
# backend = "postgres" # Storage backend: "postgres" (default), "mongodb", or "sqlite".
# --- SQLite backend (developer mode) ---
# Select with `extenddb init --backend sqlite`. The database path can be given
# at init time (`extenddb init --sqlite-path <path>`, written into this file)
# or set here. At serve time, the EXTENDDB__STORAGE__SQLITE__PATH environment
# variable overrides this value.
# Use ":memory:" for an ephemeral in-memory database (data lost on shutdown).
# [storage.sqlite]
# path = "extenddb.sqlite"
[storage.postgres]
# Connection string points to the CATALOG database.
# The catalog stores table metadata and the data database connection info.
# Multiple independent catalogs can coexist on one PostgreSQL instance.
# connection_string = "postgresql://extenddb:extenddb-local-dev@localhost:5432/extenddb_catalog"
# pool_size = 20 # Maximum concurrent database connections
# for DynamoDB data operations. Default: 20.
# Minimum: 10 (smaller values are clamped with
# a startup warning). This value sizes TWO
# pools: one against the catalog database and
# one against the data database, which `init`
# always creates separately. Total PostgreSQL
# connections used: 2 * pool_size +
# catalog_pool_size + [backup] max_concurrent_jobs
# (one claim connection per running backup or
# restore job), plus one per vector index
# build running on this server and one while a
# schema migration runs. max_connections is
# per cluster, not per database, so both pools
# draw on the same budget. The claim connections,
# the build session and the migration connection
# sit OUTSIDE every pool, for different reasons.
# A build's ownership lock is SESSION-scoped, so
# it needs a session that ends when the build
# ends: a pooled connection returns to the pool
# still holding the lock. The migration lock is
# TRANSACTION-scoped and needs a pinned
# connection instead, because its explicit
# transaction must retain one PostgreSQL backend
# until COMMIT; a transaction-pooling proxy could
# otherwise let the lock move between backends.
# Increase for higher concurrency; ensure
# PostgreSQL max_connections >= 2 * pool_size
# + catalog_pool_size + max_concurrent_jobs +
# the number of vector index builds you expect
# to overlap. The defaults already need 64 of
# PostgreSQL's default 100.
# catalog_pool_size = 20 # Maximum concurrent connections for the
# management/catalog pool (authz, IAM, console).
# Defaults to pool_size if not set.
# Minimum: 10 (smaller values are clamped with
# a startup warning). With auth enabled, each
# DynamoDB request makes concurrent authz queries
# — size this to match expected concurrency.
[storage.mongodb]
# MongoDB connection string. Requires a replica set (even single-node).
# connection_string = "mongodb://localhost:27017/?replicaSet=rs0"
# max_connections = 50 # Maximum concurrent data-operation connections.
# max_catalog_connections = 20 # Shared catalog/auth pool for management and
# authorization traffic; size for their combined
# concurrency.
# transaction_read_concern = "snapshot"
# Read concern for the multi-document transactions
# backing conditional writes, TransactWriteItems,
# TransactGetItems, and idempotency tokens. Accepted
# values: "snapshot", "majority", and "local".
# "snapshot" is the default, fidelity-preserving mode.
# Some MongoDB-wire-compatible backends (e.g.
# DocumentDB) reject "snapshot" transactions with
# CommandNotSupported (115); set this to "majority"
# or "local" only when required. Both lose the
# single point-in-time guarantee; "local" may read
# data later rolled back after failover.
[auth]
# provider = "builtin" # Auth provider:
# "builtin" — SigV4 verification with local credential
# store and IAM policy evaluation.
# Authentication is mandatory. The server refuses to start
# with provider = "none". Run `extenddb init` to create the
# encryption key and admin user before first start.
[auth.cache]
# In-memory stale-while-revalidate caches sit between the request hot path
# and the catalog database. Each request would otherwise issue ~6 catalog
# queries during auth/authz; caching reduces this to ~0 in steady state.
#
# Self-induced changes (admin API mutations) propagate instantly via
# write-through invalidation. Off-instance changes (multi-node deployments
# or direct DB writes) take up to `ttl_seconds` to propagate.
# enabled = true # Master kill switch. When false, the
# cache wrappers bypass moka entirely
# (no lookup, no insert, no LRU pressure)
# and forward every request to the catalog.
# Use during incident response.
# ttl_seconds = 60 # Hard TTL — entries older than this trigger
# a fresh, request-blocking load.
# soft_ttl_seconds = 30 # Stale-but-usable threshold. Older entries
# are returned immediately while a background
# task refreshes them. Set equal to
# ttl_seconds to disable refresh-ahead.
# negative_ttl_seconds = 5 # Negative-cache TTL for "not found" results.
# Short by design so newly-created entities
# become usable quickly.
# max_entries = 10000 # Per-cache LRU cap.
# The release before this one refuses an [auth.encryption] table, even an
# empty one, so the header stays commented until key_file is set.
# [auth.encryption]
# key_file = "/etc/extenddb/kek" # set after `extenddb encryption-key switch --yes`; unset keeps the catalog key
# require_locked_memory = true # with key_file set, refuse to start when the key store cannot be locked
# Management web console is served at /console/ on the same port as the
# DynamoDB API. No separate configuration needed — it uses the same bind
# address and port as [server]. The console requires auth.provider = "builtin"
# (it authenticates against the admin_users and iam_users tables).
# Provisioned throughput throttling via in-memory token buckets.
# When enabled, tables with provisioned capacity are rate-limited to their
# configured RCU/WCU. On-demand tables use default ceilings (12,000 RCU /
# 4,000 WCU). Account-level aggregate limits also apply.
# Disabled by default — enable for production-like behavior.
# throttling_enabled = false
[server.tls]
# TLS is mandatory. The server refuses to start with enabled = false.
# cert_path = "~/.extenddb/tls/cert.pem" # PEM certificate file
# key_path = "~/.extenddb/tls/key.pem" # PEM private key file
# `extenddb init` generates a self-signed certificate automatically.
# Replace with a CA-signed certificate for production use.
[limits]
# All defaults match real DynamoDB limits.
# Override only for testing edge cases.
#
# max_attribute_name_bytes = 65535 # REQ-LIM-004: 64 KB
#
# Preview extension: allow multi-part (composite) keys on base tables.
# GSIs always support multi-part keys regardless of this setting.
# allow_multipart_table_keys = false
[logging]
# level = "info" # Log level: trace, debug, info, warn, error
# format = "pretty" # Log format: "pretty" (human) or "json" (structured)
#
# Logging output is determined by the launch mode:
# extenddb serve → syslog (facility: daemon, ident: extenddb)
# Read logs with: journalctl -t extenddb
# No configuration needed — output always goes to syslog.
# [backup]
# Backup and restore jobs and the reconciler. Every key has a default; the
# section may be left out. stale_job_after_secs must be at least three
# heartbeat periods, the larger of heartbeat_interval_secs and the 15 s the
# in-catalog jobs heartbeat at (45 at the least); max_concurrent_jobs is
# at most 1024; on PostgreSQL pool_size and catalog_pool_size are raised to
# at least 2 * max_concurrent_jobs + 10.
# data_file_target_bytes = 67108864 # Uncompressed bytes per data file (minimum 32 MiB)
# heartbeat_interval_secs = 15 # Job heartbeat timer
# stale_job_after_secs = 300 # Heartbeat age after which a job's owner is dead
# failed_row_retention_secs = 604800 # FAILED tombstones kept for the operator (7 days)
# reconcile_interval_secs = 60 # Reconciler cycle
# max_concurrent_jobs = 4 # Backup and restore jobs running at once on this instance
# spool_path = "/var/lib/extenddb/spool" # Restore download area for an S3 store; required
# # with an S3 store except on file-backed SQLite, where
# # it defaults to backup-spool/ beside the database file
# [backup.store]
# Where CreateBackup writes its backups on PostgreSQL, SQLite and MongoDB
# (CreateBackup answers CREATING and a job of the server uploads; Cassandra
# writes in-catalog backups with or without a store), and where restores and
# deletes of store-backed backups read. Absent on file-backed SQLite: a filesystem
# store at backups/ beside the database file. Absent on PostgreSQL, MongoDB,
# Cassandra and an in-memory SQLite database: no store, and CreateBackup
# writes in-catalog backups with a deprecation warning. kind = "disabled"
# opts out on any backend. Instances that share a catalog must share one
# store root (an S3 bucket and prefix, or a shared mount).
# kind = "filesystem" # "filesystem" | "s3" | "disabled"
# [backup.store.filesystem]
# path = "/var/lib/extenddb/backups" # Must exist, owned by the extenddb user, mode 0700
# [backup.store.s3]
# bucket = "my-extenddb-backups"
# prefix = "extenddb/" # Optional key prefix
# region = "us-east-1" # Optional; the AWS SDK's chain otherwise
# endpoint = "http://127.0.0.1:9000" # Optional, for an S3-compatible server
# force_path_style = true # Required with an http:// endpoint
# upload_part_size_bytes = 8388608 # 5 MiB to 5 GiB
# max_concurrent_uploads = 4
# Import/Export file operations are disabled by default (secure default).
# Configure allowed directories separately for imports and exports.
# All file paths are canonicalized and must resolve under one of the
# configured roots. Symlinks escaping a root are rejected.
#
# Files are namespaced per account beneath each root: a caller in account
# 111122223333 may only read and write under <root>/111122223333. A path that
# resolves elsewhere is rejected, so tenants sharing an instance cannot read or
# overwrite each other's files. Export refuses to overwrite an existing file.
#
# On Unix, export files are created with mode 0600, and the directories the
# server creates to hold import and export files are created with mode 0700: a
# missing import or export root, created at startup, and the account directory
# an export creates under each export root. Missing parent directories of a
# root are created 0755. A directory that already exists keeps its mode. The
# umask can only narrow these modes. At startup the server warns about a root
# with a parent directory that group or others can write to without the
# sticky bit, since another user could replace the root through it.
#
# [import]
# paths = ["/var/lib/extenddb/imports"]
#
# [export]
# paths = ["/var/lib/extenddb/exports"]
#
# max_import_bytes = 10737418240 # 10 GB default
#
# Deprecated: import_export_root sets a single root for both import and export.
# It fills only a list that the sections leave empty, so with both [import] and
# [export] present it does nothing, and with neither present it makes the import
# and export roots the same directory. The server logs which of those happened at
# startup. Prefer the sections above; this key will be removed.
#
# It is a top-level key, so it has to appear before the first [section] header of
# this file. Uncommenting it here would place it inside the preceding table and
# the server would refuse to start with "unknown field import_export_root".
# import_export_root = "/var/lib/extenddb/data"
# Runtime settings are managed via `extenddb settings set <key> <value>`, not this file.
# See docs/getting-started.md for available runtime settings and their defaults.
# --- Production Configuration Example ---
# Uncomment and adapt the following for production deployments:
#
# [server]
# bind_addr = "0.0.0.0"
# port = 18443
#
# [server.tls]
# cert_path = "/etc/extenddb/tls/cert.pem"
# key_path = "/etc/extenddb/tls/key.pem"
#
# [storage.postgres]
# connection_string = "postgresql://extenddb:<password>@db.example.com:5432/extenddb_catalog?sslmode=require"
# pool_size = 50
# catalog_pool_size = 50
#
# [auth]
# provider = "builtin"
#
# [logging]
# level = "info"
# format = "json"