yorvolabs / canary
Secure, auditable HTTP endpoints for health monitoring, cache management, and deployment automation in Symfony-based applications.
v1.1.0
2026-10-19 15:25 UTC
Requires
- php: ^8.2
- symfony/event-dispatcher: ^7.4
- symfony/http-foundation: ^7.4
- symfony/http-kernel: ^7.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Secure, auditable HTTP endpoints for health monitoring, cache management, and deployment automation in Symfony-based applications.
Features
- Health probes — liveness and readiness endpoints suitable for Kubernetes / load balancer checks
- Prometheus metrics — business KPIs and infrastructure metrics via
Accept: text/plaincontent negotiation - Cache management — OPcache reset and application cache clear via authenticated API calls
- Deploy lifecycle — pre-deploy readiness checks, post-deploy verification, maintenance mode toggle
- Diagnostics — environment snapshot, config validation, log tail (PII-masked), queue depth, plugin list
- Token-scoped auth — isolated Bearer tokens per endpoint group; constant-time comparison; IP allowlist
- Rate limiting — sliding-window per-IP limiter (file-based or bring your own Redis implementation)
- Audit log — every request (pass and fail) recorded with IP, scope, endpoint, status, duration
- Extensible — tagged-service interfaces for health checks, deploy hooks, diagnostic checks, config providers, audit loggers
Requirements
- PHP 8.2+
- Symfony 7.4+ (
http-foundation,http-kernel,event-dispatcher)
Installation
composer require yorvolabs/canary
For Shopware 6.6+, use the bridge package instead:
composer require yorvolabs/canary-bridge-shopware
Quick start
- Generate a token
php -r "echo bin2hex(random_bytes(32)) . PHP_EOL;"
- Set the environment variable
CANARY_TOKEN_MONITORING=<your-64-char-token>
- Wire the event subscriber (in your Symfony DI config)
YorvoLabs\Canary\Auth\RequestGuardSubscriber: tags: [kernel.event_subscriber]
- Make a request
curl -H "Authorization: Bearer $CANARY_TOKEN_MONITORING" \
https://your-app.com/canary/health/live
{"ok": true, "data": {"status": "alive"}, "meta": {"request_id": "canary-...", "duration_ms": 1}}
Documentation
Full documentation including all endpoints, configuration options, and extension guides: github.com/yorvolabs/canary-platform/tree/main/docs
| Page | Description |
|---|---|
| Getting Started | Install, configure, first request |
| API Reference | All endpoints, request/response shapes |
| Authentication | Token scopes, IP allowlist, security model |
| Configuration | All environment variables |
| Extending: Health Checks | Custom health checks |
| Extending: Deploy Hooks | Custom pre/post-deploy hooks |
| Extending: Diagnostic Checks | Custom diagnostic checks |
| Extending: New Bridge | Wire into a non-Shopware framework |
| Deployment Checklist | Pre-production checklist |
| CI/CD Integration | GitHub Actions, GitLab CI examples |
License
MIT — see LICENSE.