forgejo/routers/api/v1/utils
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
..
block.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
db_search_order.go feat: add sort parameter for users/search api endpoint (#8594) 2025-07-24 22:40:27 +02:00
git.go chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
hook.go feat: use keying for webhook secrets (#10059) 2025-12-22 15:51:37 +01:00
hook_test.go fix(api): set all hook event types (#9997) 2025-11-07 07:04:21 +01:00
main_test.go fix: url validation in webhook add/edit API (#7932) 2025-05-23 22:50:43 +02:00
page.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00