Commit Graph

55 Commits

Author SHA1 Message Date
Andras Bacsai 217541a987 fix(api): allow disabling build server mode 2026-06-03 13:48:31 +02:00
Andras Bacsai 09d8ba0d89 fix(api): prevent partial server updates on invalid disk schedule 2026-06-03 13:03:12 +02:00
Andras Bacsai 8b8ec9c4f9 Merge remote-tracking branch 'origin/next' into fix/api-update-server-private-key 2026-06-03 12:27:41 +02:00
Andras Bacsai 419a551d76 fix(server): return SSH username validation messages 2026-06-03 11:57:46 +02:00
Andras Bacsai bc2afdf02e fix(server): share SSH username validation
Centralize SSH username rules and sanitization so dotted usernames are
accepted consistently across API, onboarding, and Livewire server forms.
2026-06-03 11:38:48 +02:00
Yaroslav Novykov 36bf068814 fix(api): apply private_key_uuid in update_server
The endpoint validated private_key_uuid but dropped it from the update,
so the request silently no-op'd. Resolve the UUID to a team-scoped
PrivateKey and include private_key_id in the update payload.
2026-05-26 12:57:42 +03:00
ShadowArcanist ff4794ffec fix(server): allow dots in ssh username 2026-05-06 21:21:37 +05:30
Andras Bacsai 9bb819c33e feat(api): expose connection_timeout in servers API
Add connection_timeout to create_server docs, update_server allowed
fields, validation (integer 1-300), and advanced settings update path.
2026-04-28 15:43:58 +02:00
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
ShadowArcanist 791aa10b3f fix(validation): use int|string for Livewire numeric properties and remove nullable from API rules 2026-03-29 02:24:36 +05:30
ShadowArcanist 15a98b52c9 fix(validation): add input validation for server_disk_usage_check_frequency on API 2026-03-29 01:24:08 +05:30
ShadowArcanist c52a199120 fix(validation): add input validation for server advanced settings page 2026-03-29 01:14:08 +05:30
Andras Bacsai a94517f452 fix(api): validate server ownership in domains endpoint and scope activity lookups
- Add team-scoped server validation to domains_by_server API endpoint
- Filter applications and services to only those on the requested server
- Scope ActivityMonitor activity lookups to the current team
- Fix query param disambiguation (query vs route param) in domains endpoint
- Fix undefined $ip variable in services domain collection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:20:53 +01:00
Andras Bacsai b8390482b8 feat(server): allow force deletion of servers with resources
Add ability to force delete servers along with their defined resources:
- API: Accept ?force=true query parameter in DELETE /servers endpoint
- UI: Display checkbox option to delete all resources in deletion dialog

When force deletion is enabled, all associated resources are dispatched
via DeleteResourceJob before the server is removed, enabling one-step
deletion instead of requiring manual resource cleanup first.
2026-03-13 16:58:26 +01:00
Andras Bacsai 839635e9e8 chore: prepare for PR 2026-03-03 11:51:38 +01:00
Andras Bacsai 8e2f0836da chore: prepare for PR 2026-02-25 11:52:18 +01:00
Andras Bacsai 4ec32290cf fix(server): improve IP uniqueness validation with team-specific error messages
- Refactor server IP duplicate detection to use `first()` instead of `get()->count()`
- Add team-scoped validation to distinguish between same-team and cross-team IP conflicts
- Update error messages to clarify ownership: "already exists in your team" vs "in use by another team"
- Apply consistent validation logic across API, boarding, and server management flows
- Add comprehensive test suite for IP uniqueness enforcement across teams
2026-02-12 08:10:59 +01:00
Muhammed Mustafa AKŞAM 9b6d1613ed fix(docs): remove incorrect uuid format in openapi spec (#7419)
Co-authored-by: 🏔️ Peak <122374094+peaklabs-dev@users.noreply.github.com>
2026-01-04 16:16:19 +01:00
Andras Bacsai 6879ba87df Merge branch 'next' into fix/openapi 2025-10-13 10:42:05 +02:00
elmariss 737ec521b6 fix: missing 422 error code in openapi spec 2025-10-12 14:20:45 +02:00
Andras Bacsai bf5c08d071 work work on hetzner integration 2025-10-09 16:54:13 +02:00
Laurence 3f9228fb80 fix: Add 201 json code to servers validate api response 2025-04-19 12:17:21 +01:00
Andras Bacsai f35f45324b fix: server proxy set correctly through the API
fix: cannto delete localhost through the API.
2025-01-20 13:59:02 +01:00
Andras Bacsai 1fe4dd722b Revert "rector: arrrrr"
This reverts commit 16c0cd10d8.
2025-01-07 15:31:43 +01:00
Andras Bacsai 16c0cd10d8 rector: arrrrr 2025-01-07 14:52:08 +01:00
Andras Bacsai 4901b12279 fix: service status indicator + oauth saving 2024-12-13 12:03:10 +01:00
Andras Bacsai 3fa7d03db7 fix: root + read:sensive could read senstive data with a middlewarew 2024-12-09 11:10:35 +01:00
Andras Bacsai 78f0ac80c1 Merge branch 'next' into feat/deployment-token 2024-12-09 09:16:59 +01:00
Andras Bacsai 40af73cb7d fix: only return server uuid on server update 2024-11-25 13:41:59 +01:00
SierraJC fead884809 fix: missing uuid parameter on server API patch 2024-11-23 13:23:13 +11:00
SierraJC 379045c835 fix: incorrect server API patch response 2024-11-23 13:23:13 +11:00
SierraJC 4a45de5646 fix: empty server API response 2024-11-23 13:23:13 +11:00
Andras Bacsai 7dc65dfd79 fix: make sure important jobs/actions are running on high prio queue 2024-11-22 11:16:01 +01:00
Andras Bacsai 055c613ba5 feat: add proxy type change to create/update apis 2024-11-12 14:30:05 +01:00
Andras Bacsai 275edb6c1f put a few things on high queue 2024-11-06 12:33:56 +01:00
Kael 6520235667 middleware should allow, not deny 2024-10-30 19:06:50 +11:00
Lucas Michot d557a22b91 Remove all ray() calls 2024-10-28 13:51:23 +01:00
Andras Bacsai 2315bdb93f ui updates on server 2024-10-17 14:56:36 +02:00
Andras Bacsai 4c95647b96 feat: cleanup sentinel on server deletion
fix: Sentinel should not be enabled on build servers
2024-10-17 11:21:43 +02:00
Andras Bacsai 1f193d465d sentinel updates 2024-10-14 12:07:37 +02:00
Andras Bacsai 83549965ca Refactor instanceSettings() function for improved code readability 2024-10-01 10:37:40 +02:00
Andras Bacsai 63729c7bbf Merge pull request #3373 from mattstein/api-project-description
feat: Expose project description in API response
2024-09-10 08:49:08 +02:00
Matt Stein 44d417c07e Fix user-facing string case. 2024-09-09 09:38:40 -07:00
Andras Bacsai 25480fe624 fix: openapi endpoint urls 2024-09-04 10:09:10 +02:00
Andras Bacsai 59702c6dbc refactor: Update ProxyTypes enum values to use TRAEFIK instead of TRAEFIK_V2 2024-08-07 17:52:51 +02:00
Andras Bacsai 2ea146333e fix: uuid in api docs type 2024-07-24 21:10:32 +02:00
Andras Bacsai f1e5b61970 feat: update API endpoint summaries 2024-07-23 14:36:44 +02:00
Andras Bacsai 189a8347ed feat: add server api endpoints 2024-07-23 14:20:53 +02:00
Andras Bacsai 0f55e83591 revert: instancesettings 2024-07-12 15:45:36 +02:00
andrasbacsai fa895db76e Fix styling 2024-07-12 10:53:07 +00:00