Add extensive test coverage for the API rate limiting middleware:
- Rate limit enforcement: request blocking, window expiration, disable flag
- Rate limit headers: X-RateLimit-Limit/Remaining/Reset, Retry-After
- Tier-based limits: free/starter/pro/agency/enterprise with correct limits
- Workspace-scoped limits: isolation between workspaces
- Burst allowance: effective limits with burst multiplier
- Quota exceeded responses: 429 status, JSON error format, retry info
- API key-based limiting: isolation between keys
- IP-based limiting: for unauthenticated requests
- Per-endpoint limits: config-based endpoint-specific limits
- Rate limit bypass: when disabled globally
Uses Pest syntax with describe/it blocks and MockTieredWorkspace
class for testing tier-based rate limits.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- P1-002: API key security tests verified (bcrypt, rotation)
- P1-003: Webhook signature tests verified (HMAC-SHA256)
- P1-004: IP whitelisting with IPv4/IPv6 CIDR support
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Mod\Api -> Core\Api
- Mod\Tenant -> Core\Tenant
Part of namespace restructure to align with L1/L2 module conventions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive API documentation strategy for api.host.uk.com including
OpenAPI/Scramble setup, SDK generation configs for 11 languages, and
multi-registry publishing workflow.
Include updated code review documenting Wave 2 improvements bringing the
Api module to 92/100 production readiness with all P1 issues resolved.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move API module from src/Mod/Api/ to src/Api/ and update namespace
from Core\Mod\Api\ to Core\Api\ as part of monorepo separation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add WebhookPayloadTemplate model with builtin template support
- Add WebhookTemplateService for template rendering (Mustache, JSON)
- Add WebhookSecretRotationService with grace period handling
- Add WebhookTemplateController and WebhookSecretController API endpoints
- Add WebhookTemplateManager Livewire component for admin UI
- Add CleanupExpiredSecrets console command
- Add BuiltinTemplateType and WebhookTemplateFormat enums
- Add migrations for api tables and secret rotation fields
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>