Commit graph

66 commits

Author SHA1 Message Date
Andras Bacsai
f267a28cb2
fix: harden GetLogs Livewire component properties (#9229) 2026-03-29 21:29:23 +02:00
Andras Bacsai
72118d61f9 feat(databases): add public port timeout configuration
Add support for configuring public port timeout on databases via API:
- Add public_port_timeout field to schema documentation with 3600s default
- Add validation rules (integer|nullable|min:1)
- Update all database type configurations to support the field
- Add comprehensive test coverage for the feature
2026-03-28 17:08:02 +01:00
Andras Bacsai
67a4fcc2ab fix: add mass assignment protection to models
Replace $guarded = [] with explicit $fillable whitelists across all
models. Update controllers to use request->only($allowedFields) when
assigning request data. Switch Livewire components to forceFill() for
explicit mass assignment. Add integration tests for mass assignment
protection.
2026-03-28 12:32:57 +01:00
Andras Bacsai
f9a9dc80aa fix(api): add volume name validation to storage API endpoints
Apply the same Docker volume name pattern validation to the API
create and update storage endpoints for applications, databases,
and services controllers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 12:17:39 +01:00
Andras Bacsai
3fdce06b65 fix(storage): consistent path validation and escaping for file volumes
Ensure all file volume paths are validated and properly escaped before
use. Previously, only directory mount paths were validated at the input
layer — file mount paths now receive the same treatment across Livewire
components, API controllers, and the model layer.

- Validate and escape fs_path at the top of saveStorageOnServer() before
  any commands are built
- Add path validation to submitFileStorage() in Storage Livewire component
- Add path validation to file mount creation in Applications, Services,
  and Databases API controllers
- Add regression tests for path validation coverage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 23:44:37 +01:00
Andras Bacsai
99043600ee fix(backup): validate MongoDB collection names in backup input
Add validateDatabasesBackupInput() helper that properly parses all
database backup formats including MongoDB's "db:col1,col2|db2:col3"
and validates each component individually.

- Validate and escape collection names in DatabaseBackupJob
- Replace comma-only split in BackupEdit with format-aware validation
- Add input validation in API create_backup and update_backup endpoints
- Add unit tests for collection name and multi-format validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:52:06 +01:00
Andras Bacsai
ae33447994 feat(storage): add storage endpoints and UUID support for databases and services
- Add storage endpoints (list, create, update, delete) to DatabasesController
- Add storage endpoints (list, create, update, delete) to ServicesController
- Add UUID field and migration for local_persistent_volumes table
- Update LocalPersistentVolume model to extend BaseModel
- Support UUID-based storage identification in ApplicationsController
- Update OpenAPI documentation with new storage endpoints and schemas
- Fix application name generation to extract repo name from full git path
- Add comprehensive tests for storage API operations
2026-03-23 15:15:02 +01:00
Andras Bacsai
c00d5de03e feat(api): add database environment variable management endpoints
Add CRUD API endpoints for managing environment variables on databases:
- GET /databases/{uuid}/envs - list environment variables
- POST /databases/{uuid}/envs - create environment variable
- PATCH /databases/{uuid}/envs - update environment variable
- PATCH /databases/{uuid}/envs/bulk - bulk create environment variables
- DELETE /databases/{uuid}/envs/{env_uuid} - delete environment variable

Includes comprehensive test suite and OpenAPI documentation.
2026-03-19 23:29:50 +01:00
Andras Bacsai
eb96c9550b
fix(api): add docker_cleanup parameter to stop endpoints (#8899) 2026-03-11 10:18:22 +01:00
🏔️ Peak
3ff2743e01
fix(api): encoding checks (#7944) 2026-01-13 16:53:11 +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
claude[bot]
21a7f2f581 fix(api): add docker_cleanup parameter to stop endpoints
Add optional docker_cleanup query parameter to the stop endpoints for
Services, Applications, and Databases. This allows API users to control
whether docker cleanup (pruning networks, volumes, etc.) is performed
when stopping resources.

The parameter defaults to true for backward compatibility.

API Usage:
- Stop without docker cleanup: GET /api/v1/{resource}/{uuid}/stop?docker_cleanup=false
- Stop with docker cleanup (default): GET /api/v1/{resource}/{uuid}/stop

Fixes #7758

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Andras Bacsai <andrasbacsai@users.noreply.github.com>
2026-01-01 12:03:13 +00:00
Andras Bacsai
5fd8cff7c7
Merge pull request #7002 from W8jonas/fix/api-destination-uuid-databases
fix api - set destination_uuid when creating databases
2025-11-01 13:46:47 +01:00
Zach Silveira
b72f93faab fix api call booleans not being used 2025-10-26 11:25:44 -04:00
Jonas Nascimento
62e1883709
fix api - set destination_uuid when creating databases 2025-10-25 01:09:55 -03:00
Andras Bacsai
473c32270d Changes auto-committed by Conductor 2025-10-16 11:01:58 +02:00
elmariss
737ec521b6 fix: missing 422 error code in openapi spec 2025-10-12 14:20:45 +02:00
Andras Bacsai
db2d44ca1f fix(api): correct OpenAPI schema annotations for array items
- Replace OA\Schema with OA\Items for array items in DatabasesController
- Replace OA\Items with OA\Schema for array type properties in GithubController
- Update generated OpenAPI documentation files (openapi.json and openapi.yaml)
2025-09-30 11:19:39 +02:00
Andras Bacsai
7f30afb823 fix(databases): restrict database updates to allowed fields only
- Modified the update_by_uuid method to use only the specified allowed fields from the request for database updates, enhancing data integrity and security.
2025-09-23 11:38:08 +02:00
Andras Bacsai
238957132c feat(databases): enhance backup update and deletion logic with validation
- Added authorization checks for updating and deleting backups in DatabasesController.
- Implemented validation for S3 storage UUID when saving backups, ensuring it belongs to the current team.
- Improved error handling during backup deletion with transaction management for better data integrity.
2025-09-22 19:43:15 +02:00
Andras Bacsai
33d25f418e refactor(databases): update backup queries to use team-specific method
- Modified backup retrieval logic in DatabasesController to utilize the new ownedByCurrentTeamAPI method for improved access control based on team ID.
- Enhanced code consistency and maintainability by centralizing team-based filtering in the ScheduledDatabaseBackup model.
2025-09-22 17:47:46 +02:00
Andras Bacsai
bb06a74fee refactor(databases): streamline backup queries to use team context
- Updated backup retrieval logic in DatabasesController to utilize the new ownedByCurrentTeam method for improved access control.
- Enhanced code readability and maintainability by centralizing team-based filtering in the ScheduledDatabaseBackup model.
2025-09-22 17:45:37 +02:00
Andras Bacsai
5c6ab50332 fix(databases): update backup retrieval logic to include team context
- Modified backup configuration queries in the DatabasesController to filter by team ID, ensuring proper access control.
- Enhanced S3 storage retrieval to use the current team context for better data integrity.
- Added a relationship method in ScheduledDatabaseBackup model to associate backups with teams.
2025-09-22 17:44:26 +02:00
Andras Bacsai
ed2ba832a8 refactor(databases): remove deprecated backup parameters from API documentation
- Removed obsolete backup-related parameters from the OpenAPI specification in the DatabasesController.
- Streamlined the API documentation to enhance clarity and focus on current functionality.
2025-09-22 17:41:20 +02:00
Andras Bacsai
0539dedaa0 feat(databases): enhance backup management API with new endpoints and improved data handling
- Refactored backup configuration retrieval and update logic to use UUIDs instead of IDs.
- Added new endpoint to list backup executions for a specific backup configuration.
- Improved error handling and validation for backup operations.
- Updated API documentation to reflect changes in parameter names and descriptions.
2025-09-22 13:14:45 +02:00
Andras Bacsai
2abcfd2f1c
Merge branch 'next' into feat/manage-db-using-api 2025-09-22 10:18:43 +02:00
Andras Bacsai
b1334a1bc6 feat(auth): implement comprehensive authorization checks across API controllers 2025-08-23 18:51:10 +02:00
🏔️ Peak
2a526c54d5
fix(docker): volumes get delete when stopping a service if Delete Unused Volumes is activated (#6317) 2025-08-04 21:15:56 +02:00
DanielHemmati
2bf6a9cb2c undo changes to update_by_uuid method 2025-05-22 14:39:36 +02:00
DanielHemmati
be104cd612 feat(api): add endpoint to update backup configuration by UUID and backup ID; modify response to include backup id 2025-05-22 14:36:14 +02:00
DanielHemmati
166e5ad227 remove dd 2025-04-25 17:31:04 +02:00
DanielHemmati
b4119fe012 change the order of update 2025-04-25 17:31:04 +02:00
DanielHemmati
71ff19e746 get all of the backups 2025-04-25 17:31:04 +02:00
DanielHemmati
81180af27d add ability to get backup now and get all schedule backup 2025-04-25 17:31:04 +02:00
DanielHemmati
2a06a392d5 Implement backup delete 2025-04-25 17:31:04 +02:00
DanielHemmati
5dff22d345 implement backup config via api 2025-04-25 17:31:04 +02:00
DanielHemmati
da487f609a implmenet Get /database/:uuid/backups api 2025-04-25 17:31:04 +02:00
DanielHemmati
2e0d432886 add backup config info to 2025-04-25 17:29:30 +02: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
9e3467578f feat: add environment_uuid support and update API documentation
- Introduced `environment_uuid` as a required field in various API endpoints and schemas.
- Updated descriptions to clarify that either `environment_name` or `environment_uuid` must be provided.
- Modified routes and controller methods to accommodate the new UUID parameter.
- Adjusted frontend components to utilize `environment_uuid` for better consistency and clarity.
- Removed deprecated fields related to environment handling.

This change enhances the API's flexibility in identifying environments, improving overall usability.
2024-12-17 13:42:16 +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
c9d47e0a67
Merge pull request #4449 from SierraJC/fix/mysql-mongo-db-api
Fix: API - MySQL & MongoDB invalid fields
2024-12-05 12:57:11 +01:00
Andras Bacsai
58988d3686 fix: a few inputs 2024-12-02 22:50:03 +01:00
SierraJC
f279729f08
fix: incorrect MongoDB init API property 2024-12-01 10:19:15 +11:00
SierraJC
b3f968db76
fix: missing mysql_password API property 2024-12-01 10:18:36 +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
275edb6c1f put a few things on high queue 2024-11-06 12:33:56 +01:00
Andras Bacsai
0aa2ba6923 fix: db/service start should be on high queue 2024-11-06 12:30:10 +01:00