89 Commits
Author SHA1 Message Date
033f0c84da v4.7 (#12478)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
2026-11-06 14:25:02 +01:00
Andras Bacsai b7a2c75739 fix(github): check clock skew only from failed GitHub App responses
Stop calling /zen before each installation token request. A short
network problem to GitHub failed deployments with a cURL timeout on
/zen. assertGithubClockInSync now takes the failed response and reads
its Date header, so the "System time is out of sync" error still shows
when GitHub rejects the JWT.

Call it on failed JWT requests in the webhook installation check, the
permission job, the source connection test, and the server transfer
checklist. Remove the /zen fakes from the tests.
2026-11-03 19:29:45 +01:00
Andras Bacsai 18c5cf506b feat(api-tokens): edit a token in a modal that opens without a request 2026-10-30 14:27:58 +01:00
b85a9197a1 chore: merge main into next (#12382)
Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 21:10:39 +01:00
62b2a99a70 chore: merge main into next (#12351)
Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 22:25:43 +01:00
Andras BacsaiandClaude Opus 5.5 c467354d34 test: use the delete ability in delete permission tests
next requires the delete ability for delete endpoints and checks member
token access in EnsureTokenBelongsToCurrentTeamMember. Update the tests
from main to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:55:24 +01:00
Andras Bacsai 8eb33ddf31 Merge remote-tracking branch 'origin/next' into automation/sync-main-to-next 2026-10-26 12:12:20 +01:00
Andras Bacsai 7b83fa72eb feat(git): add HTTPS credentials for private repositories on custom Git hosts (#12328) 2026-10-26 10:50:24 +01:00
Andras Bacsai c465371356 Merge remote-tracking branch 'origin/main' into fix/secret-manager-request-timeout
# Conflicts:
#	other/nightly/versions.json
#	tests/Feature/Security/IntegrationTokenFormTest.php
#	versions.json
2026-10-21 22:44:50 +02:00
Andras Bacsai 87dade4517 fix(secret-manager): add configurable request timeout for Infisical and Vault 2026-10-20 13:00:38 +02:00
Andras BacsaiandClaude Opus 5.5 a82d32c946 chore: merge main into release/v4.5
Resolve conflicts between main's security fixes and v4.5 features:
- Keep v4.5 features (log redaction, multi-S3 backups, transfer flow,
  scheduled task modal, sidebar) and port main's fixes into them.
- Reuse RequiresDeployAbility for the Hostinger create endpoint.
- Align MCP tool abilities and descriptions with main's new deploy
  requirements, and use deploy tokens in the affected MCP tests.
- Drop the duplicate DockerCleanupJobTest helper and tests, and the
  exportBundle test for a method v4.5 removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:00:05 +02:00
e3d4411ff2 chore: merge main into release/v4.5 (#12192)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Furox <177975472+Furox-Art@users.noreply.github.com>
Co-authored-by: johandenhollander <johan.den.hollander@finalist.nl>
Co-authored-by: João Cruz <161638790+SrJooJ@users.noreply.github.com>
Co-authored-by: Saim Hashmi <hashmisaim037@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-18 23:43:20 +02:00
Andras Bacsai ecce3cb9b4 refactor(api): check token abilities through the token in ApiAbility (#12193) 2026-10-18 23:16:38 +02:00
Andras BacsaiandClaude Opus 5.5 4ce231702e fix(service): skip the predefined network connect for connected containers
A single service deploy with an unchanged config keeps the running
container, which is already on the network. The connect then logged a
false "already exists" error and a warning. Check the container's
networks first.

Closes #11295

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:28:38 +02:00
Andras BacsaiandClaude Opus 5.5 9809d6b445 fix(service): connect containers to the predefined network before they start
Create the containers with --no-start, connect them to the destination
network, then start them. A container that crashed before the late
connect was restarting, the connect failed silently, and it never
joined the network.

Closes #11371

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:07:52 +02:00
Andras Bacsai 521b3cb90f feat(mcp): add REST-backed resource management tools (#12163) 2026-10-14 13:26:12 +02:00
Andras Bacsai f37761253d feat(server): set up Cloudflare tunnels with API tokens (#12157) 2026-10-13 11:32:26 +02:00
Andras Bacsai 200af07225 Merge remote-tracking branch 'origin/release/v4.5' into automation/sync-main-to-release-v4.5 2026-10-12 21:38:45 +02:00
Andras Bacsai f87f80ae96 feat(dns): add opt-in Cloudflare proxy mode for new DNS records 2026-10-09 13:52:20 +02:00
Andras BacsaiandClaude Opus 5.5 6a0a4e889b fix(github): show why the GitHub App install callback fails instead of a bare 403
The install callback swallowed every verification error (clock skew, network,
missing key, GitHub API errors) and returned an opaque 403. It also compared
the state's team with the session team, so switching teams during the GitHub
install returned 403.

- Return the verification reason, log it, and redirect to the GitHub App page
  with an error toast (JSON requests still get 403 with the reason)
- Check membership of the state's team, and switch the session to it
- Show flashed errors on the GitHub App page

Fixes #12122

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 08:29:39 +02:00
Andras Bacsai e7025612b8 feat(hostinger): add cloud provider integration (#11176) 2026-10-07 13:14:04 +02:00
Andras Bacsai 5d20f54f71 fix(webhooks): use a neutral reply for manual webhooks without a match 2026-10-06 12:56:50 +02:00
Andras Bacsai 105584da06 fix(auth): check the resource team for cloud tokens and cloud-init scripts
The policies checked the admin role in the session team. A user who was
demoted in the owning team could still edit its cloud tokens and
cloud-init scripts after switching to a team they administer. View,
update and delete now need admin of the resource's team, as for
integration tokens.
2026-10-06 10:29:04 +02:00
Andras Bacsai c3a8a44e46 fix(audit): log security resource changes under the resource team
Integration token, cloud provider token and cloud-init script edits
were audit-logged under the session team. After a team switch in
another tab, the owning team missed the entry and the other team saw
the resource name.

- Use the team of the edited resource for every audit row
- Remove credentials, query and fragment from secret manager base URLs
  in the audit log
2026-10-06 10:29:04 +02:00
Andras Bacsai 16a8c7999d feat(audit): log account, resource, and instance settings changes
Add audit events for account actions, server and application settings,
services, destinations, storage, backup schedules, and scheduled tasks.
Track changed fields and skip unchanged saves without logging file content.

Add regression coverage for audit events and changed-field detection.
2026-10-04 17:32:50 +02:00
Andras BacsaiandClaude Opus 5.5 43b7405c4c fix(security): authorize integration token creation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:01:10 +02:00
Andras Bacsai a2cd6351b2 fix(databases): keep SSL certificate files and CA in sync with each engine
- Regenerate SSL Certificates now writes server.crt/server.key for every
  engine except MongoDB, which keeps the combined server.pem. Before, the
  button always wrote server.pem, so Postgres, MySQL, MariaDB, Redis, KeyDB
  and Dragonfly failed to start after a regenerate.
- The certificate renewal job uses the same rule, so MongoDB no longer
  switches to server.crt/server.key on renewal and fails on restart.
- Starting an SSL database writes the CA that signs its certificate to
  /data/coolify/ssl/coolify-ca.crt, so a stale CA file (for example one
  written by another server entry for the same host) no longer causes
  "certificate signature failure".
- Saving a custom CA certificate that does not match the stored CA
  private key is rejected.
- The CA file write commands live in SslHelper::caCertificateFileCommands().

Fixes #10388
Fixes #6771
Fixes #11926
2026-09-30 19:01:11 +02:00
Andras Bacsai f53a883a60 fix(secrets): require the secret again when a secret manager connection changes
Changing the Vault base URL or namespace, or the Infisical base URL or
client ID, sent the stored secret to the new settings. The secret must now
be entered again, and base URL changes are audit logged.
2026-09-30 18:10:10 +02:00
Andras BacsaiandClaude Opus 5.5 1ecd927ca3 fix(api): return the saved proxy configuration only with read:sensitive
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 13:10:25 +02:00
Andras BacsaiandClaude Opus 5.5 0448c6ca51 refactor(http): remove the TrustHosts middleware that never checked the host
TrustHosts skipped its check while the cache key instance_settings_fqdn_host
was empty, and only the skipped check filled that key. So since e1fe58639
(October 2025) no release restricted the Host header. Turning it on now would
lock out users who reach Coolify by server IP or another name when the domain
or proxy is broken.

Links in emails and notifications do not use the Host header: base_url()
uses the configured FQDN or the server IP (see ResetPasswordUrlTest). So
remove the middleware, its cache key and its tests. TrustProxies is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 12:00:16 +02:00
Andras Bacsai 1f4006ac49 test: remove tests that do not exercise app code
Remove tests that copy app logic into the test, grep PHP source as
text, only check literals, constants, class_exists or PHP built-ins,
duplicate other tests, or are always skipped. Keep source checks that
guard security and authorization rules.

Rename a duplicate Pest helper so the full suite loads, drop the
missing v5/Browser path, and remove the CLAUDE.md symlink in favor of
AGENTS.md. Correct AGENTS.md: Dusk is not installed and the upgrade
script is scripts/upgrade.sh.
2026-09-28 11:55:56 +02:00
Andras BacsaiandClaude Opus 5.5 a79ee909c6 chore: remove unused components and markup-only tests
- Delete Blade components, component classes, Livewire components and
  views that nothing uses after the redesign.
- Delete tests that only compare Blade/CSS source text; keep the source
  checks for authorization gates, stable wire:key values and escaping.
- Update stale tests to the current UI and behaviour.
- Update DESIGN.md to the current navigation and layout.
- Add a lesson: test behaviour, not source markup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 00:18:16 +02:00
Andras BacsaiandClaude Opus 5.5 eeda90a8a4 fix(webhooks): reject malformed payload values without a 500
Every webhook handler (GitHub, GitLab, Gitea, Bitbucket, GitHub App,
GitLab App) now reads the fields it uses through typed readers: refs,
titles, and actions must be strings, ids positive integers, commit
SHAs 7-64 hex characters, and URLs http(s). An invalid value returns
"Nothing to do. Invalid '<field>' in the request." without a
deployment. Signature checks and the failure lockout are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 14:37:21 +02:00
Andras Bacsai 2880a73684 fix(api): align token permission handling 2026-09-24 12:25:46 +02:00
Andras Bacsai d071a5df81 Improve Git source HTTP handling 2026-09-23 23:09:04 +02:00
Andras Bacsai e3ab63e7d8 fix(reverb): align ports, host validation, and dev instance tooling 2026-09-22 09:58:28 +02:00
Andras Bacsai 4e0687ccad fix(applications): validate custom internal container names
Use the shared Docker container-name rules for custom internal names
in the API and Advanced settings form. Quote container names in
deployment inspect, log, and stop commands.
2026-09-21 15:07:54 +02:00
Andras Bacsai 1c408fb408 feat(audit): expand event tracking and remove scheduled job monitoring
Add audit levels and record user, OAuth, DNS, notification, and settings changes while removing the obsolete scheduled job monitoring UI and services.
2026-09-21 12:23:42 +02:00
Andras Bacsai 7109a11826 fix: queue import cleanup and scope DNS record updates
Move database import temp/container cleanup into a queued listener with retries, and clear the import running state on failed restore starts. Tighten Cloudflare replace/delete to the current server IP and owning resource, notify when DNS jobs fail, and pass domain-removal confirmation through remove-by-key. Document import request oneOf schemas without extra properties.
2026-09-09 13:43:56 +02:00
Andras Bacsai ab3b3926aa feat: add database import API and Cloudflare DNS management
Queue database imports from upload, S3, or server paths via REST, and
manage Cloudflare DNS records from integration tokens and domain UIs.
2026-09-09 11:14:22 +02:00
Andras Bacsai 9ef1ab7649 Merge remote-tracking branch 'origin/next' into automation/sync-main-to-next
# Conflicts:
#	app/Actions/Database/StartDatabase.php
#	app/Jobs/ApplicationDeploymentJob.php
#	app/Livewire/Project/Shared/EnvironmentVariable/Show.php
#	app/Models/Application.php
#	app/Models/Service.php
#	app/Models/StandaloneClickhouse.php
#	app/Models/StandaloneDragonfly.php
#	app/Models/StandaloneKeydb.php
#	app/Models/StandaloneMariadb.php
#	app/Models/StandaloneMongodb.php
#	app/Models/StandaloneMysql.php
#	app/Models/StandalonePostgresql.php
#	app/Models/StandaloneRedis.php
#	resources/views/livewire/project/application/heading.blade.php
#	resources/views/livewire/project/service/heading.blade.php
#	tests/Feature/PersistentStorageVolumesLayoutTest.php
2026-09-02 21:19:57 +02:00
Andras Bacsai 63cbdd5c52 fix(security): preserve private key editor modal identity (#11497) 2026-08-25 20:51:59 +02:00
Andras Bacsai c1f29beff1 feat(audit): expose team events and log integration actions
Add an admin-only audit-events API endpoint and restrict audit-log UI access. Record integration token and secret manager changes, key access, and references in audit events.
2026-08-24 07:56:21 +02:00
Andras Bacsai 91d4467322 feat(secrets): resolve integrations across deployments and databases
Add secret manager integration links and API support, resolve referenced credentials in database startup commands, and improve environment variable handling and filtering.
2026-08-23 21:33:00 +02:00
Andras Bacsai 51461456f6 feat(secrets): resolve remote secret references at deployment
Add Doppler, Infisical, and Vault integrations with per-resource secret links, autocomplete, and deploy-time resolution for applications, services, and databases without persisting remote values.
2026-08-23 20:09:31 +02:00
Andras Bacsai ca5fcce39b Reapply "Merge branch 'next' into main"
This reverts commit 7bbd91175f.
2026-08-21 12:15:46 +02:00
Andras Bacsai 7bbd91175f Revert "Merge branch 'next' into main"
This reverts commit 2598f3e4c8, reversing
changes made to 83f1a2e503.
2026-08-21 12:12:56 +02:00
Andras Bacsai 81227670e6 Reapply "Merge origin/next into main"
This reverts commit 15359833d3.
2026-08-19 12:39:55 +02:00
Andras Bacsai 15359833d3 Revert "Merge origin/next into main"
This reverts commit 541d743907, reversing
changes made to bb1d3f13f2.
2026-08-19 12:33:16 +02:00
Andras Bacsai da8665330b feat(security): add integration token editing and rotation 2026-08-18 16:24:53 +02:00