Klav Atlas

klav-server

11 schemas in 1 file.

Mainmainfe8e2a0c8c24· 2026-12-05

Blast radius

0 direct · 0 transitive workspaces · 1 app affected

What a change to these 11 schemas can reach, from workspace dependencies, imports, call sites, and protocol edges.

Affected apps (rust)

APNs with a token signing key (`.p8`) from the Apple Developer account.

Framework
serde
Shape
›{5 fields }
key_path?: stringThe `.p8` file (PKCS#8 P-256 key). Read once at start-up; its contents are never logged.
key?: stringThe `.p8` contents (PEM), instead of `key_path`. Never logged.
key_id: stringIts key ID (10 characters, shown next to the key in the account).
team_id: stringThe Apple team ID.
topic: stringThe app's bundle ID (`apns-topic`).

Full server configuration.

Framework
serde
Shape
›{15 fields }
listen: stringAddress to listen on.
database_url: string`sqlite://…` or `postgres://…`.
data_dir: stringDirectory for server data (attachments; the SQLite file by default).
trust_forwarded_for: booleanUse the rightmost `X-Forwarded-For` address as the client IP. Enable only behind a reverse proxy that sets the header.
trusted_ip_header?: stringTake the client IP from this header (e.g. `x-real-ip` on Railway), which the reverse proxy in front sets to the client …
allow_registration?: booleanThe old switch for new accounts: `true` is `open` and `false` is `closed`. Set with `registration_mode`, the two must a…
registration_mode?: RegistrationModeHow new accounts are taken: `open`, `invite` or `closed` (ADR 0048 §1.1). Unset, it follows `allow_registration`, and w…
sessions: SessionConfigSession lifetimes.
retention: RetentionConfigTrash and purge.
log: LogConfigLogging.
limits: LimitsSize limits.
rate_limit: RateLimitConfigRate limits.
push: PushConfigPush notifications.
invites: InvitesConfigAuto-issued beta invites (ADR 0050).
hosted_proxy: HostedProxyConfigKlav Cloud's hosted proxy (ADR 0051 §8).

Klav Cloud's hosted proxy (ADR 0051 §8). Unset, the default and what every self-hosted server keeps, refuses every hosted registration and changes nothing else.

Framework
serde
Shape
›{1 field }
service_key?: stringThe Ed25519 public key of the enclave's service key, as 64 hex digits (`KLAV_HOSTED_PROXY_SERVICE_KEY`). Not a secret.

Auto-issued beta invites (ADR 0050): the internal route the site calls to issue a bound, single-use invite for a waitlist email, up to a cap.

Framework
serde
Shape
›{2 fields }
auto_token?: stringThe shared bearer secret of `POST /v1/internal/invites/auto`, at least [`MIN_AUTO_INVITE_TOKEN_BYTES`] bytes (`KLAV_AUT…
auto_max: numberHow many auto-issued invites may exist at once, not counting revoked ones (`KLAV_AUTO_INVITE_MAX`). `0`, the default, t…

Size limits.

Framework
serde
Shape
›{12 fields }
max_json_body_bytes: numberMaximum size of a JSON request body, in bytes.
max_meta_bytes: numberMaximum size of encrypted vault or project metadata, in bytes.
max_overview_bytes: numberMaximum size of an item overview section, in bytes.
max_details_bytes: numberMaximum size of an item details section, in bytes.
max_item_versions: numberPrevious versions kept per item (older ones are dropped).
max_attachment_bytes: numberMaximum size of one encrypted attachment, in bytes.
max_attachment_chunk_bytes: numberMaximum size of one upload chunk (request body), in bytes.
max_pending_upload_bytes: numberDeclared bytes of unfinished uploads allowed at once in the vaults of one account (uploads idle for a day are removed).
max_account_attachment_bytes: numberDeclared bytes of every attachment in the vaults an account owns that is not purged: finished, pending and those of tra…
max_account_vault_bytes: numberEncrypted bytes in the vaults an account owns, attachments aside: `overview`, `details` and `wrapped_key` of every item…
max_items_per_account: numberItems that are not purged (trashed ones count) in the vaults an account owns. `0` means unlimited.
max_vaults_per_account: numberVaults an account owns, deleted ones too until they are purged. `0` means unlimited.

Logging settings.

Framework
serde
Shape
›{2 fields }
format: LogFormatOutput format.
filter: string`tracing` filter directive, e.g. `info` or `klav_server=debug`.

Log output format.

Framework
serde
Shape
"json" | "pretty"

Push notifications for approvals (ADR 0018 §5). Without `apns`, the server sends nothing and everything else works as before.

Framework
serde
Shape
›{1 field }
apns?: ApnsConfigApple Push Notification service (token-based, `.p8`).

Rate limits (token buckets; `per_minute` is the refill rate and `burst` the bucket size).

Framework
serde
Shape
›{10 fields }
ip_per_minute: numberEvery request, per client IP.
ip_burst: numberBurst allowance per client IP.
auth_ip_per_minute: numberAuthentication endpoints (pre-login, sign-up, login, refresh), per IP.
auth_ip_burst: numberBurst for authentication endpoints, per IP.
auth_email_per_minute: numberAuthentication attempts per account e-mail (any IP).
auth_email_burst: numberBurst of authentication attempts per account e-mail.
account_per_minute: numberAuthenticated requests per account (all devices together).
account_burst: numberBurst of authenticated requests per account.
invite_ip_per_minute: numberInvite attempts per client IP: every `invite/check`, and every invite failure in `register/start` and `register/finish`…
invite_ip_burst: numberBurst of invite attempts per client IP.

How long deleted things are kept before they are purged.

Framework
serde
Shape
›{2 fields }
trash_days: numberDays an item stays in the trash (and a deleted vault stays restorable) before it is purged for good.
purge_interval_secs: numberSeconds between purge runs.

Session lifetimes.

Framework
serde
Shape
›{2 fields }
access_ttl_secs: numberLifetime of an access token, in seconds.
refresh_ttl_secs: numberLifetime of a refresh token, in seconds (sliding: every refresh starts a new period).