Skip to content
quarry Artifact [d14a917882]
Login

Artifact [d14a917882]

Artifact d14a91788241850c2b6c69f8ad5935ed309586c4d63864a567b0cc28d5e74dfb:

Ticket change [d14a917882] - New ticket [32801e6bd2] Private repositories: visibility flag and read gating. by dmestas on 2026-08-17 23:42:03.
D 2026-08-17T23:42:03.283
J comment Every\srepository\squarry\sserves\sis\sfully\spublic.\sThere\sis\sno\svisibility\sflag,\sand\snothing\sgates\sa\sread:\s26\sof\sthe\s38\sregistered\sops\sare\s`ops.Anonymous`,\sand\s`gate()`\sis\sonly\sever\scalled\son\swrite\spages.\n\n##\sThe\srole\salready\sexists\sand\sdoes\snothing\n\n`oltp.Role`\sis\s`NoRole\s|\sRead\s|\sWrite\s|\sRepoAdmin`,\sordered\sso\sa\scomparison\sanswers\s"is\sthis\senough?".\s`Read`\sis\sgrantable\stoday\s—\n\n\s\s\s\squarry\saccount\sgrant\s--user\salice\s--repo-name\slibfossil\s--role\sread\n\n—\sand\sit\schanges\snothing,\sbecause\sno\sread\spath\sconsults\sit.\sThat\sis\sworse\sthan\snot\shaving\sit:\san\soperator\scan\sgrant\s`read`\son\sa\srepository,\sbelieve\sthey\shave\sscoped\saccess,\sand\shave\spublished\snothing\sof\sthe\ssort.\n\n##\sWhat\sfossil\sdoes\n\nFossil\shas\sno\svisibility\sflag\seither.\sPrivacy\sfalls\sout\sof\sits\scapability\smodel:\sa\srepository\sis\spublic\sbecause\sthe\spseudo-users\s`nobody`\s(unauthenticated)\sand\s`anonymous`\s(logged\sin,\sunidentified)\shold\sread\scapabilities.\sIn\sthe\scorpus\severy\sclone\scarries:\n\n\s\s\s\snobody\s\s\s\s\s\sgjorz\s\s\s\s\s--\sg\sclone,\sj\sread\swiki,\so\scheck-out,\sr\sread\stickets,\sz\sdownload\n\s\s\s\sanonymous\s\s\shz\s\s\s\s\s\s\s\s--\sh\shyperlinks,\sz\sdownload\n\nTake\s`o`/`g`\sfrom\s`nobody`\sand\sthe\srepository\sis\sprivate.\sSo\sfossil's\sanswer\sto\s"is\sthis\srepo\spublic"\sis\s"what\scan\sthe\sanonymous\suser\sdo",\swhich\sis\sone\smechanism\sdoing\stwo\sjobs.\n\nQuarry\sdoes\snot\shave\sto\scopy\sthat.\sA\svisibility\sflag\splus\sthe\sexisting\sRole\sladder\sis\ssimpler\sand\ssays\swhat\sit\smeans.\sBut\sthe\sfossil\sbehaviour\sis\swhat\san\simported\srepository\swill\sarrive\sexpecting,\sso\sthe\smapping\shas\sto\sbe\sdeliberate\srather\sthan\saccidental.\n\n##\sWhat\sis\sneeded\n\n1.\s**Visibility\son\sthe\srepository.**\sForge\sconfiguration,\sso\sOLTP\sbeside\s`mirror`\sand\s`webhook`\s—\snot\sthe\sindex,\swhich\sis\sdisposable,\sand\snot\sthe\sstore,\swhich\squarry\sdoes\snot\swrite\sto\sdirectly.\n2.\s**Read\sgating\sin\sthe\sops\slayer.**\sPer-repository,\snot\sper-op:\sthe\scheck\sis\s"may\sthis\sidentity\sread\sthis\srepository",\sand\sit\sbelongs\swhere\s`d.repo(name)`\salready\sresolves\sthe\sstore,\sso\sa\snew\sop\scannot\sforget\sit.\sAn\sop-by-op\s`Auth`\schange\swould\sbe\s26\schances\sto\smiss\sone.\n3.\s**Repo\slist\sfiltering.**\s`repo.list`,\sthe\sfleet\spage\sand\ssearch\smust\snot\sleak\sthe\sNAMES\sof\sprivate\srepositories\sto\san\sanonymous\sreader.\sName\sleakage\sis\sthe\susual\sway\sthis\sfeature\sis\sgot\swrong.\n4.\s**The\ssync\spath.**\s`xfer`\sfronts\s`zit\sclone`/`pull`\sover\sHTTP.\sA\sprivate\srepository\smust\srefuse\san\sunauthenticated\sclone,\sor\sthe\sweb\sgate\sis\sdecoration.\n5.\s**404,\snot\s403,\sfor\sa\sprivate\srepository\san\sidentity\scannot\ssee.**\sA\s403\sconfirms\sthe\srepository\sexists,\swhich\sis\sexactly\swhat\sa\sprivate\srepository\sshould\snot\sconfirm.\n\n##\sOrdering\snote\n\nStep\s3\sand\sstep\s4\sare\sthe\sones\sthat\smake\sthis\sreal.\sA\svisibility\sflag\sthat\shides\spages\sbut\sleaves\s`/api/v1/repos`\sand\sthe\sclone\sendpoint\sopen\shas\snot\smade\sanything\sprivate;\sit\shas\sonly\smade\sit\sinconvenient\sto\sfind.\n
J status Open
J title Private\srepositories:\svisibility\sflag\sand\sread\sgating
K 32801e6bd26375f738d030800aa88cce548b9db0
U dmestas
Z e11e0d343273f3c717ea2debee9576b7