Saving a source without HMAC verification fails with a server error #2112

Closed
opened 2026-11-22 00:20:20 +00:00 by sam · 1 comment
Owner

Why: PUT /api/sources/{name} with verification none or token returns 500 because the write leaves hmac_secret_sealed null where the column or query expects a value. Only sources verified by HMAC can be saved, so a token-verified webhook source can't be created or edited.

Done when: a source saves with each verification mode, the secret column is set only for HMAC, and a test with fakes covers each mode.

**Why**: PUT /api/sources/{name} with verification none or token returns 500 because the write leaves hmac_secret_sealed null where the column or query expects a value. Only sources verified by HMAC can be saved, so a token-verified webhook source can't be created or edited. **Done when**: a source saves with each verification mode, the secret column is set only for HMAC, and a test with fakes covers each mode.
sam added the bughigh labels 2026-11-22 00:20:20 +00:00
Author
Owner

Fixed in a420b742e: sourceToSave left the sealed HMAC secret as a nil slice for token and none sources, which the store wrote as NULL into a NOT NULL column. It now starts empty; a table test over none, token and hmac failed for none and token before the fix.

Fixed in a420b742e: sourceToSave left the sealed HMAC secret as a nil slice for token and none sources, which the store wrote as NULL into a NOT NULL column. It now starts empty; a table test over none, token and hmac failed for none and token before the fix.
sam closed this issue 2026-11-22 00:23:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#2112