9P frontend #1811

Open
opened 2012-09-18 23:56:06 +00:00 by davidsarah · 2 comments
davidsarah commented 2012-09-18 23:56:06 +00:00
Owner

9P is a POSIXish remote filesystem protocol somewhat like SFTP (protocol spec). This ticket is to write a 9P frontend that would probably be implemented alongside other frontend protocols — web-API, SFTP and FTP — as part of a gateway node.

Just as we do for SFTP, we'd have to deal with the impedence mismatch between Tahoe's access control model and 9P's, by faking permissions sufficient to satisfy 9P clients. It is probably not necessary to distinguish owner, group and world permissions.

There is a py9p library we could use to implement the 9P server. It uses blocking socket calls but they're nicely factored into a single short class (py9p.Sock), so could easily be changed. It also depends on PyCrypto; again this dependency is fairly nicely factored (into py9p.pki and one method of py9p.sk1) so could be changed to use pycryptopp, say.

The local filesystem server example code seems as though it would be reasonably easy to adapt to call into the SFTP frontend's internal POSIXish interface (i.e. with the 9P server code taking the place of Twisted's SFTP server) instead of making OS calls.

[9P](http://9p.cat-v.org/) is a POSIXish remote filesystem protocol somewhat like SFTP ([protocol spec](http://man.cat-v.org/plan_9/5/intro)). This ticket is to write a 9P frontend that would probably be implemented alongside other frontend protocols — web-API, SFTP and FTP — as part of a gateway node. Just as we do for SFTP, we'd have to deal with the impedence mismatch between Tahoe's access control model and 9P's, by faking permissions sufficient to satisfy 9P clients. It is probably not necessary to distinguish owner, group and world permissions. There is a [py9p library](http://mirtchovski.com/p9/py9p/index.php) we could use to implement the 9P server. It uses blocking socket calls but they're nicely factored into a single short class ([py9p.Sock](https://bitbucket.org/f2f/py9p/src/5c2eb7c7f28b/py9p/py9p.py#cl-170)), so could easily be changed. It also depends on PyCrypto; again this dependency is fairly nicely factored (into [py9p.pki](https://bitbucket.org/f2f/py9p/src/5c2eb7c7f28b/py9p/pki.py) and [one method of py9p.sk1](https://bitbucket.org/f2f/py9p/src/5c2eb7c7f28b/py9p/sk1.py#cl-61)) so could be changed to use pycryptopp, say. The [local filesystem server example code](https://bitbucket.org/f2f/py9p/src/5c2eb7c7f28b/examples/localsrv.py) seems as though it would be reasonably easy to adapt to call into the [SFTP frontend's internal POSIXish interface](https://tahoe-lafs.org/trac/tahoe-lafs/browser/git/src/allmydata/frontends/sftpd.py#L947) (i.e. with the 9P server code taking the place of Twisted's SFTP server) instead of making OS calls.
tahoe-lafs added the
code-frontend
major
enhancement
1.9.2
labels 2012-09-18 23:56:06 +00:00
tahoe-lafs added this to the undecided milestone 2012-09-18 23:56:06 +00:00
davidsarah commented 2012-09-19 00:15:11 +00:00
Author
Owner

Replying to davidsarah:

There is a py9p library we could use to implement the 9P server.

... which is MIT-licensed, so no problem there.

Replying to [davidsarah](/tahoe-lafs/trac-2024-07-25/issues/6843): > There is a [py9p library](http://mirtchovski.com/p9/py9p/index.php) we could use to implement the 9P server. ... which is MIT-licensed, so no problem there.
davidsarah commented 2012-09-19 00:16:27 +00:00
Author
Owner

This is my fork of py9p on bitbucket: https://bitbucket.org/davidsarah/py9p

This is my fork of py9p on bitbucket: <https://bitbucket.org/davidsarah/py9p>
Sign in to join this conversation.
No Milestone
No Assignees
1 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#1811
No description provided.