Fri 07 Mar 2008 03:44:08 AM UTC, comment #1:
This report is not very clear. As monotone folks know, monotone's
standalone netsync server does this fine, in its way. What is needed is a
reasonable way to host separate db's on a server for separate projects.
For authenticated access, ssh:// db uris work fine to tie into separate
per-db authentication (via filesystem permissions and ssh server controls)
and that matches what hosting folks expect from other systems.
For anonymous access, none of the several options have worked out well.
I think the clearly best solution would be to support mtn://host/dbname
uris for the netsync protocol and have that protocol start with dbname
selection before any other handshake (so different dbname's can even have
different server keys). On the server side, lua can map dbname to db file
and other hook set (details can almost all be done in lua).
One thing I tried was to set up a single anonymous-only mirror db served by
regular netsync and not allowing any normal writes. This would be a big
soup db of all projects' branch names thrown together, so it's still not so
hot, but survivable since people use reasonable branch name conventions. I
tried to make the mirror get auto-updated by the netsync server running via
ssh on the authenticated-access writable db, using lua hooks and
server_request_sync. But that hit the weird bugs with handling pipe fds
that I posted on monotone-devel about.
The next plan was a ssh://anonymous@host/dbfile uri. My first hope for
that was that just by changing the forced mtn command not to use
--no-transport-auth, the connection would like anonymous netsync and just
win. But, insanely, the protocol doesn't self-identify with auth vs noauth
handshake, so the opposite ends are just confused. (Unless I make every
user install extra lua magic to make it not expect --no-transport-auth.)
I'll cons another ssh-based kludge plan. But this is far too much work.
|