feat(admin): proactive Stripe key permission self-test on /admin/stripe (BUNYIP-532) #530
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/BUNYIP-532-stripe-permission-self-test"
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?
What and why
Resolves BUNYIP-532. The reported incident: an admin saved a Stripe restricted key that was missing the "Webhook Endpoints" permission, and creating a webhook endpoint then failed. BUNYIP-516 already explains such a failure with bunyip-authored copy that names the exact permission, but only reactively, at the moment the admin attempts the operation. This adds a proactive self-test so the admin catches a missing or wrong permission up front, before a customer or a webhook hits it.
What ships
Explicitly out of scope (follow-up)
Live-probing the checkout-time permissions. The dunite-stripe methods for Customers / Checkout Sessions / Subscriptions / Invoices collapse Stripe's error into a generic internal / not-found error, so a 403 (missing permission) cannot be told apart from a 404 (object absent) there. Classifying them needs a dunite-stripe change (a classified read probe per resource, or a deliberately-invalid create that forces a 400 when authorized vs a 403 when not, which would also catch a Read-only grant where Write is needed). Until then the panel lists them as required without testing them. I can open a dunite ticket for this if you want it.
Tests and verification
just check-containergreen (fmt + clippy -D warnings + workspace tests). serde-compat guard green (all new response fields default).🤖 Generated with Claude Code
https://claude.ai/code/session_01GkNbvEq6awuMRULFCiYKe3