]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/Untrusted_push_in_Monotone.mdwn
good idea
[ikiwiki.git] / doc / todo / Untrusted_push_in_Monotone.mdwn
1 As noted in [[tips/untrusted_git_push]] an untrusted push capability was added recently, but only implemented in git.
2 (See also [[todo/rcs_updates_needed]])
3
4 This note describes (but does not implement) an approach for this with the [[rcs/monotone]] rcs backend.
5
6 ----
7
8 Monotone behaves a little differently to git in its networking.  Git allows anyone to try to push, and then
9 check whether it is ok before finally accepting it.  Monotone has no way to accept or reject revisions
10 in this way.  However, monotone does have the ability to mark revisions, and to ignore unmarked revisions.
11
12 This marking capability can be used to achieve a somewhat similar effect to what happens with git.  The
13 problem with this is that anyone could put anything into the monotone database, and while this wouldn't
14 affect ikiwiki, it seems bad to leave open, untrusted storage on the web.
15
16 The Plan
17 =====
18
19 In the `note_netsync_revision_received` hook in the monotone server, have the server check to make sure
20 that either a) the revision is signed by someone trusted or, b) the revision is checked using the same
21 hook that git uses in `pre-receive`.  If the revision passes the ikiwiki `pre-receive` check then the
22 monotone hook signs the revision.  This gives that revision the 'ikiwiki seal of approval'.
23
24 You'll also want to update the monotone trust hooks to only trust revisions signed by trusted people, or
25 ikiwiki.
26
27 Now anyone can upload a revision, but only those signed by a trusted person, or which pass the ikiwiki
28 check and so get signed by the ikiwiki key, will be seen by ikiwiki.