coolify/app/Traits
Andras Bacsai 90ddbb3572 feat(security): support expiration on API tokens with warning notifications
Add optional expiration to personal API tokens. Users pick a duration
(1/7/30/60/90 days or Never) at creation time. Expired tokens are
rejected by Sanctum, pruned hourly by sanctum:prune-expired, and a
team notification fires ~24h before expiry so owners can rotate
before API calls start failing.

- ApiTokens Livewire component stores expires_at from expiresInDays
- Rework issued-tokens UI from card grid to table (matches other views)
- New ApiTokenExpirationWarningJob scheduled hourly (idempotent via RateLimiter)
- New ApiTokenExpiringNotification (email/discord/telegram/slack/pushover)
- api_token_expiring added to alwaysSendEvents so users cannot silence
  expiry warnings from the per-event notification toggle UI
- sanctum:prune-expired cadence moved from daily to hourly

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 14:28:38 +02:00
..
AuthorizesResourceCreation.php feat(auth): introduce resource creation authorization middleware and policies for enhanced access control 2025-08-26 10:27:38 +02:00
CalculatesExcludedStatus.php fix: don't show health status for exited containers 2025-11-24 09:09:37 +01:00
ClearsGlobalSearchCache.php feat(global-search): integrate projects and environments into global search functionality 2025-09-30 13:37:03 +02:00
DeletesUserSessions.php Changes auto-committed by Conductor 2025-10-16 09:51:37 +02:00
EnvironmentVariableAnalyzer.php fix(environment-variables): correct method call syntax in analyzeBuildVariable function 2025-09-23 11:40:56 +02:00
EnvironmentVariableProtection.php feat(deployment): add SERVICE_NAME variables for service discovery 2025-09-08 15:22:44 +02:00
ExecuteRemoteCommand.php feat(deployment): add command_hidden flag to hide command text in logs 2026-03-25 16:48:49 +01:00
HasConfiguration.php feat(core): wip version of coolify.json 2025-01-21 14:09:12 +01:00
HasMetrics.php fix(sentinel): add token validation to prevent command injection 2026-03-10 22:19:19 +01:00
HasNotificationSettings.php feat(security): support expiration on API tokens with warning notifications 2026-04-20 14:28:38 +02:00
HasSafeStringAttribute.php feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00
SaveFromRedirect.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
SshRetryable.php refactor(ssh-retry): remove Sentry tracking from retry logic 2026-02-15 14:00:27 +01:00