coolify/app/Models
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
..
Application.php refactor(webhook): encrypt manual webhook secrets and tighten HMAC verification 2026-04-19 12:52:23 +02:00
ApplicationDeploymentQueue.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
ApplicationPreview.php refactor(volumes): validate input and escape shell args 2026-04-20 11:27:10 +02:00
ApplicationSetting.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
BaseModel.php refactor: rename name method to sanitizedName in BaseModel for clarity 2024-12-10 08:50:07 +01:00
CloudInitScript.php refactor: improve cloud-init script UX and remove description field 2025-10-11 11:16:28 +02:00
CloudProviderToken.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
DiscordNotificationSettings.php refactor: define explicit fillable attributes on all Eloquent models 2026-03-29 21:25:41 +02:00
DockerCleanupExecution.php feat(deployments): support Docker image tags for preview deployments 2026-03-30 13:35:35 +02:00
EmailNotificationSettings.php refactor: define explicit fillable attributes on all Eloquent models 2026-03-29 21:25:41 +02:00
Environment.php Merge remote-tracking branch 'origin/next' into pr-7764-shadow/add-shared-server-env 2026-03-31 13:51:06 +02:00
EnvironmentVariable.php Merge remote-tracking branch 'origin/next' into pr-7764-shadow/add-shared-server-env 2026-03-31 10:52:31 +02:00
GithubApp.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
GitlabApp.php refactor: define explicit fillable attributes on all Eloquent models 2026-03-29 21:25:41 +02:00
InstanceSettings.php refactor: define explicit fillable attributes on all Eloquent models 2026-03-29 21:25:41 +02:00
LocalFileVolume.php fix(service): block UI editing of file volumes exceeding 5 MiB 2026-04-28 22:36:56 +02:00
LocalPersistentVolume.php refactor: define explicit fillable attributes on all Eloquent models 2026-03-29 21:25:41 +02:00
OauthSetting.php feat(auth): Add Clerk OAuth Provider (#5553) 2025-06-18 14:29:46 +02:00
PersonalAccessToken.php Fix styling 2024-06-10 20:43:34 +00:00
PrivateKey.php fix(ssh): handle chmod failures gracefully and simplify key management 2026-03-16 21:27:10 +01:00
Project.php Merge remote-tracking branch 'origin/next' into pr-7764-shadow/add-shared-server-env 2026-03-31 13:51:06 +02:00
ProjectSetting.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
PushoverNotificationSettings.php refactor: define explicit fillable attributes on all Eloquent models 2026-03-29 21:25:41 +02:00
S3Storage.php refactor(storage): tighten S3 endpoint URL validation (#9668) 2026-04-20 11:51:51 +02:00
ScheduledDatabaseBackup.php fix(backups): enforce retention and clean up stale executions 2026-04-03 11:33:21 +02:00
ScheduledDatabaseBackupExecution.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
ScheduledTask.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
ScheduledTaskExecution.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
Server.php refactor(server): dispatch event for reachability notifications, drop retry loop 2026-04-28 15:28:22 +02:00
ServerSetting.php fix(sentinel): auto-regenerate invalid or undecryptable tokens 2026-04-29 16:44:12 +02:00
Service.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
ServiceApplication.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
ServiceDatabase.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
SharedEnvironmentVariable.php fix(deployment): resolve shared env vars using main server 2026-03-31 11:07:52 +02:00
SlackNotificationSettings.php refactor: define explicit fillable attributes on all Eloquent models 2026-03-29 21:25:41 +02:00
SslCertificate.php fix(ssl): when regenerating SSL certs the cert is not singed with the new CN 2025-02-07 19:36:52 +01:00
StandaloneClickhouse.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
StandaloneDocker.php refactor: scope destination and resource lookups by current team 2026-04-19 11:55:12 +02:00
StandaloneDragonfly.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
StandaloneKeydb.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
StandaloneMariadb.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
StandaloneMongodb.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
StandaloneMysql.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
StandalonePostgresql.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
StandaloneRedis.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
Subscription.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
SwarmDocker.php refactor: scope destination and resource lookups by current team 2026-04-19 11:55:12 +02:00
Tag.php fix(models): replace forceFill/forceCreate with fill/create and add fillable guards 2026-03-31 13:45:31 +02:00
Team.php fix(team): mark servers unreachable when subscription ends 2026-04-15 15:12:29 +02:00
TeamInvitation.php Update app/Models/TeamInvitation.php 2025-09-25 11:33:32 +02:00
TelegramNotificationSettings.php refactor: define explicit fillable attributes on all Eloquent models 2026-03-29 21:25:41 +02:00
User.php refactor(auth): upgrade email verification hash to sha256 2026-04-20 12:09:48 +02:00
UserChangelogRead.php feat(changelog): implement automated changelog fetching from GitHub and enhance changelog read tracking 2025-08-12 10:07:11 +02:00
WebhookNotificationSettings.php fix: update webhook notification settings migration to use updateOrInsert and add logging 2025-11-25 15:35:01 +01:00