Let allod site check, update and rotate the hosting credential #163
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#163
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Give the hosting credential a full lifecycle in
allod site, so it can be checked, changed and rotated without re-entering every field or reaching for rclone directly.Primary goals:
--forcealready overwrites (cmd/allod/site_config.go:63,93), but it reads as an escape hatch rather than as the way to update a credential, and it is only mentioned in the refusal message.Current state and specifics
allod site config(cmd/allod/site_config.go:59) creates the remote and refuses when one exists unless--force(cmd/allod/site_config.go:93). So updating is possible but has three rough edges:--force, retype host and user toonix shell nixpkgs#rclone -c rclone config showallodcommand, nothing secret printedThe third one is the sharpest. rclone is installed on the
allodwrapper's PATH and not the operator's, so the natural debugging move fails withrclone: command not foundand the operator has to know to reach fornix shell. That is a reasonable place to keep rclone, and it means this namespace has to expose whatever inspection is legitimately needed.Whether the check belongs as
allod site config --check, a separateallod site check, or as a flag on deploy is open; the constraint is that it must not publish and must not print the password.Scope
In: verification, update and rotation of the credential this namespace owns, and whatever inspection replaces reading rclone's config by hand.
Out: the deploy preflight's own authentication, which is
allod/tools#162 and which this should reuse rather than duplicate. Storing the credential outside rclone's config file isallod/tools#164.Two measurements from the live failure that prompted this issue.
Storage is correct, so the lifecycle commands are about wrong values rather than corrupted ones.
allod site configatcf384e8was driven end to end against a real rclone withTr1cky!Pass#with$pecials;rclone revealreturned it exactly. Obscuring, the terminal read, and the stanza writer all round-trip. That whole path had only ever been tested against stubs, so it was worth checking before building a "check" command on the assumption that what is stored is what was typed.What actually failed live was a wrong username: this hosting exposes the FTP account under more than one plausible form, and the wrong one is indistinguishable from the right one until the server refuses it. So the verify command's job is to ask the server, and its output has to name which field it is complaining about as far as the protocol allows —
530alone sends the operator to re-enter all three.--forceretyping everything is the sharp edge here. The live fix required re-entering host, user and password to correct one of them. Re-typing two already-correct fields to change a third is how a second error gets introduced during recovery, and it happened against a domain that was down at the time.One defect to fix wherever inspection lands.
cmd/allod/site_config.go:130printsCheck it with: rclone lsd shared:on success. That command does not exist for the operator — rclone is on theallodwrapper's PATH, not the user's, so it returnsrclone: command not found. This issue's inspection command should replace that line rather than sit beside it.