Teach rotate-token the rclone remote stanza so the site hosting credential rotates like the other host secrets #42
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/nexus#42
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?
Let the shared-hosting FTP credential that
allod site deployreads rotate throughrotate-token, so the one secret behind publishing follows the same tooled lifecycle as the forge tokens instead of a hand recipe in the deployment's secrets repository.Primary goals:
rclone-remote-stanzabesideraw-forgejo-tokenandcredential-store-url(scripts/rotate-token:259-261,:337-345). The plaintext is the complete[shared]stanza thatallod site configwrites (type = ftp,host,user,pass,explicit_tls = true; allod/toolscmd/allod/site_config.go,remoteStanza), so the decrypted file is byte-compatible with what rclone reads at its default config path and no activation step reshapes it.credential-store-urlalready does, decrypt the existing stanza to carryhostanduserforward, prompt only for the new password, and re-encrypt to the existing recipients. Retyping two correct fields to change a third is how the last live credential failure happened (allod/tools#163).rclone obscure -on stdin, never on argv, and never printed.allod site check, which authenticates the remote without publishing (allod/tools#162). rclone itself rides on theallodwrapper's PATH and not the operator's (nix/home.nix:92-114), so any rclone command in the advice would becommand not found.secret_path,format,targets[].deployed_path), so--groupselects it and dry runs list it. Whether that registry stays Forgejo-named or grows a sibling for non-forge credentials is the open shape question; the default is the smallest change that letsprepare_itemaccept the new format.Current state and specifics
prepare_itemdies on any format other than the two it knows (scripts/rotate-token:259-261), and the per-item rotation switch has no branch for a stanza (:337-345). The credential-store branch already shows the pattern this needs: decrypt with the host identity, parse the fields to carry forward, take one new secret on a hidden prompt, rebuild the plaintext, encrypt to the recipients extracted fromsecrets.nix.The host does not have
rcloneon the operator's PATH by design, so the script needs it as a runtime input of the provisioning-scripts package or must reach it through the wrapper. Adding it to the script's own inputs is the smaller and more honest change: the wrapper's PATH is an implementation detail ofallod, not a contract.The public secrets template (
allod/secrets) has no site-hosting entry, and a deployment that publishes nothing should not gain one. The format lands here; the registry entry and the age file are each deployment's own.Trigger: the first rotation of a site hosting credential after it has been created once by hand. Until that rotation is needed, the documented recipe (read the password silently, pipe through
rclone obscure -into the stanza, pipe intoagefor the host key) is the path, and this issue is not blocking anything.Scope
In: the format, its prompt and parse, the obscure step, the verification hint, and the registry shape that selects it.
Out: deployment-side wiring of the age file to rclone's config path, which is each deployment's private composition; creating a credential from nothing (
allod site configowns that today, and an import of an existing config file into an age secret can follow separately); and any change to whatallod sitereads, which is settled by allod/tools#164.