forgejo/models/webhook
Gusted 4e83f85b75 feat: use keying for webhook secrets (#10059)
- Follow up of forgejo/forgejo!5041, forgejo/forgejo!6074, forgejo/forgejo!8692, forgejo/forgejo!9923
- The `webhook` table contains a encrypted header authorization.
- Use `keying` to safely store this secret and bound them to the table, column and row id
- The migration isn't spectacular but does closely follow what we learned in the previous three migrations: use a transaction and delete records when you can't decrypt them.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10059
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-12-22 15:51:37 +01:00
..
fixtures fix: paginate GET /api/v1/admin/hooks response (#9915) 2025-11-06 00:08:13 +01:00
hooktask.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
main_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
webhook.go feat: use keying for webhook secrets (#10059) 2025-12-22 15:51:37 +01:00
webhook_system.go feat: use keying for webhook secrets (#10059) 2025-12-22 15:51:37 +01:00
webhook_system_test.go fix: paginate GET /api/v1/admin/hooks response (#9915) 2025-11-06 00:08:13 +01:00
webhook_test.go feat: use keying for webhook secrets (#10059) 2025-12-22 15:51:37 +01:00