No target edit form: a target's destination URL, headers and timeout are write-once #127
Reference in New Issue
Block a user
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?
Surfaced while implementing #126.
internal/server/routes.goregisters onlyPOST /source/{sourceID}/targets,.../targets/{targetID}/toggleand.../targets/{targetID}/delete. There is no target edit route, andtemplates/source_edit.htmledits the webhook's name, description and retention only.So a target's configuration cannot be changed after creation — to fix a typo in a destination URL, an operator deletes the target and recreates it. Today the stored value is at least readable on the source detail page; once #126 masks it, it becomes write-once and unrecoverable from the UI entirely.
That is the direct cost of the masking decision in #115, and this issue is what repays it.
Definition of done
GETandPOST /source/{sourceID}/targets/{targetID}/edit, with atemplates/target_edit.htmlthat pre-fills the stored destination URL, headers and timeout.buildTargetConfigso SSRF validation applies on edit exactly as on create. An edit path that skips SSRF validation would reopen a closed hole.Implementation requirements
next, PR based onnext, single commit, title ending(closes #N).TODO.md(see #112).make checkplus the Docker lint path with the cache defeated (#119).