mirror of
https://github.com/narrrl/narl-workspace.git
synced 2026-11-03 16:41:27 +01:00
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.
This commit is contained in:
1 parent
ab8712559e
commit
747332153c
12 files changed
+1950
-93
No files matched your search
@@ -0,0 +1,13 @@
|
||||
-- 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
|
||||
);
|
||||
Reference in new issue
Block a user