PAR-153
0
Expose webhook configuration in economy-explorer (self-service /me/webhooks)
DoneNormalUnassignedEconomy Explorer
Goal
Let logged-in players manage their transaction-feed webhooks (PAR-151) from economy-explorer instead of raw API calls. Substrate/convenience UI over the same webhook_subscription table the dispatcher drives.
Decisions
- Owner-scoped, no API key. Webhooks owned by the player's Minecraft UUID, scoped to their personal account or any firm they have FINANCIAL/ADMIN access to (mirrors the financial-privacy gate). Needs
webhook_subscription.api_key_idmade nullable — via a new V14 ALTER (V13 is already deployed, do NOT edit it). - Delivery health view — read-only recent
webhook_deliveryrows per webhook. - Direct-DB writes (explorer's established pattern): server action → Kysely DAL → audit → revalidate.
Cross-repo
economy-flyway: V14ALTER TABLE webhook_subscription MODIFY api_key_id INT UNSIGNED NULL.treasury-rest-api:WebhookSubscription.apiKeyId→Long;WebhookService.requireOwnednull-safe (explorer rows not manageable via a REST key).economy-explorer:lib/sql/webhook.ts(DAL),lib/actions/webhooks.ts(actions + server-side scope authz),lib/util/ssrf.ts(TS SSRF port),app/me/webhooks/**(page + create form + row actions + delivery view),lib/db.ts(DB interface),/menav link.
Security
Re-validate scope server-side (own personal account / hasFirmFinancialAccess); SSRF guard on URLs (dispatcher re-checks at delivery); secret shown once; owner-scoped ownership on edit/delete; audit; noindex + login/link gate.
Follow-up to PAR-151. Plan: parallel-whistling-swing.md.
Resources
- commit3eab89e Merge pull request #13 from MCCitiesNetwork/developMCCitiesNetwork/treasury-rest-api
- commit884b2b8 Tolerate null api_key_id on webhook subscriptions (PAR-153)MCCitiesNetwork/treasury-rest-api
- commit5dd5f38 Merge pull request #12 from MCCitiesNetwork/developMCCitiesNetwork/economy-explorer
- PR · merged#12 Release: self-service webhook management at /me/webhooks (PAR-153)MCCitiesNetwork/economy-explorer
- commitc174c3b Self-service webhook management at /me/webhooks (PAR-153)MCCitiesNetwork/economy-explorer
Comments
No comments yet.
Activity
- ParadauxIO linked a commit — Commit 3eab89e — Merge pull request #13 from MCCitiesNetwork/develop
- ParadauxIO linked a commit — Commit 884b2b8 — Tolerate null api_key_id on webhook subscriptions (PAR-153)
- ParadauxIO linked a commit — Commit 5dd5f38 — Merge pull request #12 from MCCitiesNetwork/develop
- ParadauxIO changed status to Status → Done
- ParadauxIO linked a pull request — PR #12 merged — Release: self-service webhook management at /me/webhooks (PAR-153)
- ParadauxIO linked a commit — Commit c174c3b — Self-service webhook management at /me/webhooks (PAR-153)
- ParadauxIO linked a pull request — PR #12 open — Release: self-service webhook management at /me/webhooks (PAR-153)
- tesks changed status to Status → Pending Release
- ParadauxIO linked a commit — Commit c174c3b — Self-service webhook management at /me/webhooks (PAR-153)
- ParadauxIO linked a commit — Commit 884b2b8 — Tolerate null api_key_id on webhook subscriptions (PAR-153)
- tesks created the issue