coolify/app
Andras Bacsai 00d6e83e7f fix(sentinel): auto-regenerate invalid or undecryptable tokens
Replace hard validation error with self-healing token logic. Tokens that
are null, empty, or fail decryption are now regenerated automatically
rather than crashing sentinel startup or metrics reads.

Token format changed from encrypted JSON payload to a plain 64-char
random string (Str::random), eliminating double-encryption issues and
simplifying the validation regex to cover the new character set.

New `ensureValidSentinelToken()` method on ServerSetting centralises
the get-or-regenerate contract; both StartSentinel and HasMetrics now
delegate to it. HasMetrics logs a warning when regeneration occurs so
operators know a sentinel container restart is required.

`isValidSentinelToken()` now accepts `?string` (null → false).

Adds feature tests covering: null/empty/undecryptable stored values,
idempotent return of valid tokens, RuntimeException only when
regeneration itself produces an invalid token, no double-encryption of
newly generated tokens, and cast round-trip consistency.
2026-04-29 16:44:12 +02:00
..
Actions fix(sentinel): auto-regenerate invalid or undecryptable tokens 2026-04-29 16:44:12 +02:00
Console feat(security): support expiration on API tokens with warning notifications 2026-04-20 14:28:38 +02:00
Contracts
Data refactor: simplify remote process chain and harden ActivityMonitor 2026-03-26 13:26:16 +01:00
Enums
Events Make proxy restart run as background job to prevent localhost lockout 2025-12-03 10:30:12 +01:00
Exceptions feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
Helpers feat(server): add configurable SSH connection timeout per server 2026-04-28 15:39:36 +02:00
Http feat(webhook): skip deployment on [skip ci]/[skip cd] commit markers 2026-04-29 09:12:24 +02:00
Jobs feat(webhook): skip deployment on [skip ci]/[skip cd] commit markers 2026-04-29 09:12:24 +02:00
Listeners fix(proxy): defer UI refresh until Traefik version check completes 2025-12-27 15:16:58 +01:00
Livewire fix(service): block UI editing of file volumes exceeding 5 MiB 2026-04-28 22:36:56 +02:00
Models fix(sentinel): auto-regenerate invalid or undecryptable tokens 2026-04-29 16:44:12 +02:00
Notifications feat(security): support expiration on API tokens with warning notifications 2026-04-20 14:28:38 +02:00
Policies chore: prepare for PR 2026-02-25 11:18:46 +01:00
Providers refactor(api): validate and throttle feedback endpoint 2026-04-19 14:41:47 +02:00
Repositories
Rules refactor(storage): tighten S3 endpoint URL validation 2026-04-20 11:50:19 +02:00
Services refactor: remove verbose logging and use explicit exception types 2026-03-20 15:57:26 +01:00
Support refactor(validation): tokenize shell-safe command pattern 2026-04-20 22:00:41 +02:00
Traits fix(sentinel): auto-regenerate invalid or undecryptable tokens 2026-04-29 16:44:12 +02:00
View/Components feat(forms): make textarea monospace opt-in and improve multiline toggle 2026-03-31 15:37:42 +02:00