feat(package): step-up for torb owner #287
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/280-owner-step-up"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #280
torb owner add|remove --step-up: the change approved with a passkey at the account page.fix(package): keep the registry's answer out of the work directory
0600, made anew) beforecurl/wgetwrite into it, and emptied after every request, since an answer can hold the token of trusted publishing or the secret of a step-up.uploaddirectory is0700; all three files are emptied even where one cannot be.tools/registry/tests/commands.test.trbchecks that the last answer is gone and its file is private.feat(package): step-up for torb owner
POST /api/1/step-up {call: "owners"}, then the user code and the page on standard output (the prompt on standard error only on a terminal), then one line of standard input (a pipe works too), thenTorb-Code: step-up:<secret>on the one call. The secret, id and expiry are never printed; the secret goes through the header file only.refusalOf, exit 1.--step-upwithlist,--step-upwith--code,--codefollowed by a flag.TORB_CODEis ignored with--step-up.tools/registry/tests/owner-step-up.test.trb: the registry in-process,torbas a child with open pipes, each grant approved with the recorded passkey ofpasskey-vectors. It covers an approved add (grant used), a second add needing a new grant (refused unapproved), an approved remove, an expired grant, end of input, an account without a passkey (409), an add without--step-up, and the usage errors. Acurlstand-in copies the header and answer files at call time, so the test knows every secret and checks it is in no argument, no output and no file left in the cache, and that the files are private.torb-owner.md"A passkey", RELEASE.md 7.13 row, registry README, regenerated skills, pdisc stamp.Reviewed by the architect agent before opening; its findings are addressed: a private upload directory, files made anew, cleanup of all three files, the
--code --step-upguard, the docs on an early Enter, the test reading one merged pipe, and file-mode checks. Follow-ups out of scope (not in this PR):exchange.jsonof trusted publishing is written with the default mode; refusal bodies reach the terminal unfiltered for every registry command; no ownership/symlink check on<cache>/upload.Overlap: #279 touches registry.trb, usage.trb, RELEASE.md 7.13 and the README; whichever lands second rebases.
Approved at
18a2495, CI green on this head.registry-commands.test.trb), plusowner-step-up.test.trb(approved add/remove, grant used up, unapproved/expired/EOF/no-passkey cases, no secret in args/output/files, private files) and the answer-file check incommands.test.trb.--step-upignoresTORB_CODE,--code --step-upand--step-upwithlistare usage errors, the secret is validated as one printable word and goes only through the header file; EOF/read errors send nothing.upload.trb): answer file private and emptied after every request,uploaddir 0700, all three files emptied even if one fails. Ok.torb-owner.md, RELEASE.md 7.13, registry README, skills and pdisc stamp updated; pdisc check green.Non-blocking:
exchange.jsonmode, unfiltered refusal bodies, no ownership/symlink check on<cache>/upload) deserve issues.torb owner --step-up: approve owner changes with a passkey #280