'tahoe mount' command #1357

Open
opened 2011-02-04 04:00:27 +00:00 by davidsarah · 6 comments
davidsarah commented 2011-02-04 04:00:27 +00:00
Owner

(/tahoe-lafs/trac-2024-07-25/issues/6415)#comment:1 suggested a tahoe mount command, which would mount a Tahoe directory at a local mount point.

tahoe mount [OPTIONS] [-o MOUNT_OPTION[,...]] TAHOE_PATH MOUNT_POINT

(As for all other CLI commands, TAHOE_PATH could be given relative to the default tahoe: alias, an explicit alias, or an explicit URI.)

I propose implementing this using SFTP+sshfs. The SFTP frontend would be changed to allow logging in with an arbitrary cap URI as root directory (#1356). Then the above mount command would be implemented by invoking sshfs with the -o password_stdin option, and passing the URI on stdin. This avoids exposing the URI via the command line. Because any aliases in TAHOE_PATH are resolved by tahoe mount, it also avoids ambient authority weaknesses, even when an attacker is not prevented from connecting to the SFTP server.

The host and port of the SFTP server would be obtained by determining the node directory as usual, and looking for a tahoe.cfg with an sftpdport setting in that directory. (It might be useful to allow specifying this in a separate sftp.url file analogous to node.url, I'm not sure.)

(/tahoe-lafs/trac-2024-07-25/issues/6415)#comment:1 suggested a `tahoe mount` command, which would mount a Tahoe directory at a local mount point. ``` tahoe mount [OPTIONS] [-o MOUNT_OPTION[,...]] TAHOE_PATH MOUNT_POINT ``` (As for all other CLI commands, TAHOE_PATH could be given relative to the default `tahoe:` alias, an explicit alias, or an explicit URI.) I propose implementing this using SFTP+sshfs. The SFTP frontend would be changed to allow logging in with an arbitrary cap URI as root directory (#1356). Then the above mount command would be implemented by invoking `sshfs` with the `-o password_stdin` option, and passing the URI on stdin. This avoids exposing the URI via the command line. Because any aliases in `TAHOE_PATH` are resolved by `tahoe mount`, it also avoids ambient authority weaknesses, even when an attacker is not prevented from connecting to the SFTP server. The host and port of the SFTP server would be obtained by determining the node directory as usual, and looking for a `tahoe.cfg` with an `sftpdport` setting in that directory. (It might be useful to allow specifying this in a separate `sftp.url` file analogous to `node.url`, I'm not sure.)
tahoe-lafs added the
code-frontend-cli
major
defect
1.8.2
labels 2011-02-04 04:00:27 +00:00
tahoe-lafs added this to the 1.9.0 milestone 2011-02-04 04:00:27 +00:00
davidsarah commented 2011-02-04 04:31:48 +00:00
Author
Owner

Replying to davidsarah:

Then the above mount command would be implemented by invoking sshfs with the -o password_stdin option, and passing the URI on stdin.

Note that this doesn't preclude supporting other ways to mount a Tahoe filesystem using the same tahoe mount syntax, if we implement other FUSE interfaces in future. There could be a tahoe.cfg setting to specify the command that is executed. For example:

[mount]
# What command will 'tahoe mount' use to mount the filesystem?
# This command will take the root URI on stdin. For SFTP, the root URI
# is the password. For example, when using sshfs you should pass the
# '-o password_stdin' option. The variables $MOUNTPOINT and $SFTPPORT
# can be used to specify the mount point, and SFTP port number if needed.

command = sshfs uri@127.0.0.1 $MOUNTPOINT -p $SFTPPORT -o password_stdin,reconnect,big_writes
Replying to [davidsarah](/tahoe-lafs/trac-2024-07-25/issues/6419): > Then the above mount command would be implemented by invoking `sshfs` with the `-o password_stdin` option, and passing the URI on stdin. Note that this doesn't preclude supporting other ways to mount a Tahoe filesystem using the same `tahoe mount` syntax, if we implement other FUSE interfaces in future. There could be a `tahoe.cfg` setting to specify the command that is executed. For example: ``` [mount] # What command will 'tahoe mount' use to mount the filesystem? # This command will take the root URI on stdin. For SFTP, the root URI # is the password. For example, when using sshfs you should pass the # '-o password_stdin' option. The variables $MOUNTPOINT and $SFTPPORT # can be used to specify the mount point, and SFTP port number if needed. command = sshfs uri@127.0.0.1 $MOUNTPOINT -p $SFTPPORT -o password_stdin,reconnect,big_writes ```
davidsarah commented 2011-07-24 22:38:43 +00:00
Author
Owner

Out of time for 1.9.

Out of time for 1.9.
tahoe-lafs modified the milestone from 1.9.0 to 1.10.0 2011-07-24 22:38:43 +00:00
tahoe-lafs modified the milestone from 1.11.0 to 1.12.0 2013-08-13 23:04:09 +00:00

Milestone renamed

Milestone renamed
warner modified the milestone from 1.12.0 to 1.13.0 2016-03-22 05:02:25 +00:00

renaming milestone

renaming milestone
warner modified the milestone from 1.13.0 to 1.14.0 2016-06-28 18:17:14 +00:00

Moving open issues out of closed milestones.

Moving open issues out of closed milestones.
exarkun modified the milestone from 1.14.0 to 1.15.0 2020-06-30 14:45:13 +00:00
Owner

Ticket retargeted after milestone closed

Ticket retargeted after milestone closed
meejah modified the milestone from 1.15.0 to soon 2021-03-30 18:40:19 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1357
No description provided.