coolify/config
Andras Bacsai a2096c6f68 feat(observability): add structured audit log channel for API and webhook events
Introduce a dedicated `audit` log channel (daily rotation, configurable retention via
LOG_AUDIT_DAYS) and a small `auditLog()` / `auditLogWebhookFailure()` helper used to
record state-changing API operations and webhook events.

Instrumented:

- API mutation endpoints (create / update / delete / start / stop / restart) across
  applications, services, databases (incl. backups, env vars, storage), servers,
  projects + environments, scheduled tasks, private keys, GitHub apps, cloud provider
  tokens, Hetzner server provisioning, instance enable/disable.
- Webhook signature verification outcomes for GitHub, GitLab, Bitbucket, Gitea and
  Stripe, plus the Sentinel push endpoint.
- Authentication and authorization outcomes via the global exception handler and
  the `ApiAbility` middleware (unauthenticated, ability-denied, policy-denied).

The helper is wrapped in try/catch so logging failures never affect the request
path. Successful operations log at `info`; suspicious/denied requests log at
`warning`. Operators wanting a failures-only feed can set `LOG_AUDIT_LEVEL=warning`.

Includes a feature test suite covering the helper, the webhook providers and the
new auth/authorization log paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 14:50:37 +02:00
..
api.php refactor(core): rename API rate limit ENV 2025-06-18 15:23:44 +02:00
app.php refactor(configuration): centralize configuration management in ConfigurationRepository 2025-03-24 21:01:27 +01:00
auth.php better emails 2023-09-01 15:52:18 +02:00
broadcasting.php rename soketi container to realtime 2023-12-08 14:57:11 +01:00
cache.php Fix styling 2024-06-10 20:43:34 +00:00
chunk-upload.php feat(core): You can validate compose files with docker compose config 2025-02-27 11:29:04 +01:00
constants.php fix(terminal): add WS heartbeat and fix proxy idle disconnects 2026-04-28 10:35:32 +02:00
cors.php init of v4 🌮 2023-03-17 15:33:48 +01:00
database.php fix(database): handle PDO constant name change for PGSQL_ATTR_DISABLE_PREPARES 2026-03-03 09:04:45 +01:00
debugbar.php feat(core): You can validate compose files with docker compose config 2025-02-27 11:29:04 +01:00
deprecations.php chore(swarm): mark docker swarm as deprecated 2026-04-17 23:41:39 +02:00
filesystems.php Remove webhook maintenance mode replay feature 2025-12-02 13:36:32 +01:00
fortify.php rate limit things 2023-08-15 14:27:45 +02:00
hashing.php init of v4 🌮 2023-03-17 15:33:48 +01:00
horizon.php chore: prepare for PR 2026-02-23 13:24:49 +01:00
livewire.php Disable legacy_model_binding flag in Livewire config 2025-10-13 15:44:23 +02:00
logging.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
mail.php fix(mail): Set default mailer to array when not specified 2025-02-27 12:56:44 +01:00
purify.php fix: sanitize error output in server validation logs 2026-03-26 18:36:36 +01:00
queue.php Add dynamic timeout for deployments 2024-02-08 12:34:01 +01:00
ray.php chore: Enable Ray by default and update Dockerfile with latest versions of PACK and NIXPACKS 2024-09-06 10:21:02 +02:00
sanctum.php update packages 2024-07-10 13:10:21 +02:00
sentry.php use config instead of env() 2024-11-12 15:53:05 +01:00
services.php feat(user): add changelog read tracking and unread count method 2025-08-12 10:06:19 +02:00
session.php Change default session driver from Redis to database 2025-12-16 12:11:59 +01:00
subscription.php remove unnecessary things 2024-11-11 10:23:03 +01:00
telescope.php add min process for horizon 2024-11-02 18:32:45 +01:00
testing.php Added a basic login test and also added 2 small variables to dev .env file 2024-09-06 14:16:40 +02:00
view.php init of v4 🌮 2023-03-17 15:33:48 +01:00