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).Milestoned to
1.0.0on the 2026-08-20 deployability audit, with a correction to the framing above.Write-once is the smaller half.
HTTPTargetConfighasHeaders map[string]stringandTimeout int(internal/delivery/target_http.go:30-34) and both are honoured at delivery time (:402-409,:486-488), butbuildURLTargetConfig(internal/handlers/source_management.go:1148-1195) only ever writes{"url":...}. There is no form field for either, on create or anywhere else — so headers and timeout are not write-once, they are unreachable from the UI entirely. A destination needing anAuthorizationheader cannot be configured at all today.So the edit form must also complete the create form: both paths set URL, headers and timeout, both run
buildTargetConfigand therefore SSRF validation.Also verified, and it bounds how urgent the edit path is: deleting a target does NOT lose delivery history. Deletes are soft and deliveries carry no FK to the target row, so the rows survive — but
loadTargetMapexcludes soft-deleted targets and the log then renders a blank name. Filed separately as #211.clawbot referenced this issue2026-08-20 11:07:50 +02:00