Files
nvrl 747332153c feat: mount spaces/folders over SFTP with SSH-key auth
Add an in-process SFTP server (russh) backed directly by the nodes
table, so a space can be edited from nvim or synced with sshfs without
a separate filesystem mirror. Access is authenticated by public key
against a new ssh_keys table, managed via :sshkey in the app; the
feature stays off until WORKSPACE_SFTP_BIND is set.
2026-09-21 15:36:36 +02:00

14 lines
626 B
SQL

-- Public keys allowed to mount the workspace over SFTP. A single-user
-- application still wants more than one key: one per machine that mounts it,
-- so losing a laptop means revoking one row rather than a shared secret.
CREATE TABLE ssh_keys (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
-- `ssh-ed25519 AAAA...`, comment stripped: the comment is not part of the
-- key and would otherwise make the same key look different twice.
public_key TEXT NOT NULL UNIQUE,
fingerprint TEXT NOT NULL UNIQUE,
created_at INTEGER NOT NULL,
last_used_at INTEGER
);