feat: API key management — list + revoke endpoints #605
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/api-key-management"
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?
Changes
V1_ALLOWED_SCOPESto includediscovery:writelistCredentials(UUID userAccountId)returning all user keys (including revoked) with metadataGET /api/api-credentials— lists all user's API keysDELETE /api/api-credentials/{id}— revokes a key, returns 204 (idempotent)Acceptance Criteria
discovery:writecan be used when creating API keysGET /api/api-credentialsreturns all user's keys with metadataDELETE /api/api-credentials/{id}revokes a key (204 response)authenticatealready filtersrevoked_at IS NULL)Notes
revoke()already existed in service layer — only controller wiring was added- Expand V1_ALLOWED_SCOPES to include discovery:write - Add GET /api/api-credentials listing all user keys with metadata - Add DELETE /api/api-credentials/{id} for revocation (idempotent, 204) - Add ApiCredentialView DTO (no raw tokens exposed)