vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Replace the git-backed roster with a trusted keys directory
197ecaa29d992ecce2b6078803f3512f565f3672 · Keenan Nemetz · 17d ago · parent a5f19b3c
Replace the git-backed roster with a trusted keys directory The roster was 476 lines of CAS retries, tree building and snapshot reloading to store what amounts to username -> authorized_keys lines. Two of the three fields in meta.json were unused: ACLs key on username, never on id, and nothing ever set disabled. The git version was paying for history and tamper evidence that nothing consumed. Now: data/trusted_keys/keenan.keys # one authorized_keys line per device This is the AuthorizedKeysFile convention, so ssh-keygen -lf, ansible, rsync and an editor all work on it, and dropping a key in by hand is a supported way to add a user because the running instance re-reads the directory every five seconds. Adds are O_APPEND, so two processes cannot lose each other's writes; removes are read-modify-rename and assume a single operator. A file that does not parse, or the same key under two names, still refuses startup rather than silently changing who can authenticate. What the directory could not provide on its own is an audit trail, so key changes append a line to data/audit.log: timestamp, action, user, and key fingerprint. That is the git log we deleted, at about 15 lines instead of a commit graph. If a user must be blocked rather than removed, their keys are removed; there is no disabled flag until something needs one. Identity is now ~200 lines instead of 476, and the lost-update class of bug that the CAS loop made possible is gone with the loop. Verified by hand: fresh init shows data/ only holding audit.log, index.db, repos and trusted_keys; a key appended to the file by hand starts working within the poll interval without a restart; removing a key by CLI stops that key authenticating; audit.log records both.
internal/sshserver/sshserver_test.go +3−3
| @@ -60,11 +60,11 @@ type harness struct { | |||
| 60 | 60 | func newHarness(t *testing.T) *harness { | |
| 61 | 61 | t.Helper() | |
| 62 | 62 | dir := t.TempDir() | |
| 63 | sysRepo := filepath.Join(dir, "system.git") | ||
| 64 | if err := identity.Init(sysRepo); err != nil { | ||
| 63 | keysDir := filepath.Join(dir, "trusted_keys") | ||
| 64 | if err := identity.Init(keysDir); err != nil { | ||
| 65 | 65 | t.Fatal(err) | |
| 66 | 66 | } | |
| 67 | ident, err := identity.Open(sysRepo) | ||
| 67 | ident, err := identity.Open(keysDir) | ||
| 68 | 68 | if err != nil { | |
| 69 | 69 | t.Fatal(err) | |
| 70 | 70 | } | |