Audit(#66): RevokeApiKey missing the Owner/Admin gate — any Member can kill tenant integrations #105

Closed
opened 2026-11-07 19:22:52 +01:00 by amiryahaya · 0 comments
Owner

Mint (ApiKeyFeature.cs:68) and Rotate (:167) call RequireOwnerOrAdminAsync; Revoke (:207-229) does not — introduced in 8.2 (PR #100).

Trigger: a Member-role user sends DELETE /api/keys/api-keys/{id} → 204; the production integration dies instantly and the rotation grace is wiped (PreviousSecretHash nulled).

Fix: the same RequireOwnerOrAdminAsync call at the top of RevokeApiKey.Handle + a Revoke_AsMember_Returns403 test.

M1.5 close audit (#66). Bug introduced in the 8.2 slice itself.

Mint (ApiKeyFeature.cs:68) and Rotate (:167) call RequireOwnerOrAdminAsync; Revoke (:207-229) does not — introduced in 8.2 (PR #100). **Trigger**: a Member-role user sends DELETE /api/keys/api-keys/{id} → 204; the production integration dies instantly and the rotation grace is wiped (PreviousSecretHash nulled). **Fix**: the same RequireOwnerOrAdminAsync call at the top of RevokeApiKey.Handle + a Revoke_AsMember_Returns403 test. M1.5 close audit (#66). Bug introduced in the 8.2 slice itself.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/failsulit#105
No description provided.