Commit graph

35 commits

Author SHA1 Message Date
Andras Bacsai
e20327b9c4 fix: add authorization checks to database Livewire components
Added authorization checks to 11 database-related Livewire components
that were loading sensitive database configuration without verifying
user permissions.

Changes:
- Added authorize('view', $database) to all 8 database type General.php mount() methods
- Added authorization to Configuration.php before loading database
- Added authorization to BackupEdit.php before loading backup config
- Added authorization to Import.php before loading database resource

This prevents unauthorized users from accessing database credentials,
connection strings, and configuration details.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 17:33:42 +02:00
Andras Bacsai
74c70b431c fix: prevent TypeError in database General components with null server
Nullable server + guard to avoid TypeError/NPE. Don't terminate the app, terminate the bug.

Changes:
- Made Server property nullable (?Server $server = null) in all 8 database General components
- Added guard clause in mount() to check for null server before accessing it
- Displays user-friendly error message when destination server is not configured
- Prevents crashes in methods like isLogDrainEnabled() and sslCertificates()

Fixed components:
- Mariadb, Dragonfly, Clickhouse, Keydb
- Mysql, Mongodb, Redis, Postgresql

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 17:04:48 +02:00
Andras Bacsai
a15ab54495 refactor: migrate database components from legacy model binding to explicit properties
- Remove global 'refresh' event listeners from all database General components
- Migrate Redis, MySQL, MariaDB, MongoDB, PostgreSQL, and KeyDB components to use explicit public properties instead of wire:model="database.field"
- Implement syncData() method in each component for manual data synchronization between properties and Eloquent models
- Update all validation rules, messages, and attributes to reference new property names
- Update Blade views to bind inputs to explicit properties (e.g., id="name" instead of id="database.name")
- Prepare codebase for disabling Livewire's legacy_model_binding configuration option

This refactoring resolves form field reset issues caused by global refresh events
and follows Livewire 3 best practices for component property management.
2025-10-13 10:01:17 +02:00
Andras Bacsai
f4e5c195fe refactor: replace direct SslCertificate queries with server relationship methods for consistency 2025-10-09 17:00:05 +02:00
Andras Bacsai
adb8f9d88e feat(auth): implement authorization checks for database management 2025-08-23 18:50:35 +02:00
Andras Bacsai
5c4a265542 refactor(validation): implement centralized validation patterns across components
- Introduced `ValidationPatterns` class to standardize validation rules and messages for various fields across multiple components.
- Updated components including `General`, `StackForm`, `Create`, and `Show` to utilize the new validation patterns, ensuring consistent validation logic.
- Enhanced error messages for required fields and added regex validation for names and descriptions to improve user feedback.
- Adjusted styling in the `create.blade.php` view for better visual hierarchy.
2025-08-19 14:15:31 +02:00
Andras Bacsai
f31624c6eb fix(General): change redis_password property to nullable string 2025-04-06 21:13:15 +02:00
Andras Bacsai
3be6be4c1b refactor(database): require PEM key file for SSL certificate regeneration 2025-03-27 10:02:25 +01:00
Andras Bacsai
1857a54d92 refactor(database): update import statements for Auth in database components 2025-03-26 18:31:42 +01:00
Andras Bacsai
44bf3f4ee3 refactor(database): streamline event listeners in Redis General component 2025-03-26 18:30:52 +01:00
Andras Bacsai
d7ded7f8e5 refactor(database): enhance SSL configuration handling for various databases 2025-03-26 17:24:46 +01:00
Andras Bacsai
950acffe0b refactor(database): streamline SSL configuration handling across database types 2025-03-17 15:15:54 +01:00
peaklabs-dev
225f24e650
chore: improve code quality suggested by code rabbit 2025-02-19 18:04:58 +01:00
peaklabs-dev
4547647e98
feat(ssl): improve Redis and remove modes 2025-02-10 19:23:39 +01:00
peaklabs-dev
484fc5140b
fix(ssl): rename Redis mode to verify-ca as it is not verify-full 2025-02-08 16:43:15 +01:00
peaklabs-dev
7b30b1aff1
feat(ssl): Full SSL support for Redis 2025-02-07 22:36:36 +01:00
Andras Bacsai
52a38f238b fix(redis): update environment variable keys from standalone_redis_id to resourceable_id 2025-01-22 11:54:53 +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
2809083f61 Refactor Redis password handling and migration to use environment variables 2024-10-21 13:43:34 +02:00
Andras Bacsai
6c82d0ae5f Refactor Redis password handling and migration to use environment variables 2024-10-21 12:36:09 +02:00
Andras Bacsai
bf7b0f9e06 fix: redis database user and password 2024-10-21 12:13:42 +02:00
peaklabs-dev
85c3270dcc
update helper and disable input if variable is shared 2024-10-16 13:44:17 +02:00
peaklabs-dev
6f97d589ae
feat: variabel sync and support shared vars 2024-10-16 13:29:13 +02:00
peaklabs-dev
03b736177d
Merge branch 'coollabsio:main' into fix-redis-db-ui 2024-09-26 20:02:05 +02:00
Andras Bacsai
b570ccd7d3 format 2024-09-23 19:51:31 +02:00
ayntk-ai
a2ba67ea34
Add redis username 2024-08-21 19:19:36 +02:00
Andras Bacsai
f106e6e37b feat: add custom docker container options to all databases 2024-08-16 13:56:47 +02:00
Andras Bacsai
c39d6dd407 feat: token permissions
feat: handle sensitive data
feat: handle read-only data
2024-07-02 12:15:58 +02:00
Thijmen
d86274cc37 Fix styling 2024-06-10 20:43:34 +00:00
Andras Bacsai
4667f96b40 feat: db proxy logs 2024-06-09 21:33:17 +02:00
Andras Bacsai
c20aa0b256 Refactor method names to use camel case 2024-03-04 11:01:14 +01:00
Andras Bacsai
8385bbb0a0 feat: gzip enabled & stipprefix setting
refactor: code
2024-03-04 10:46:13 +01:00
Andras Bacsai
c7218f2856 Update success messages 2024-02-22 14:53:42 +01:00
Andras Bacsai
718603e37e wip: migrate to livewire 3 2023-12-07 19:06:32 +01:00