feat(security): add editable cloud credential pages

Add dedicated show/edit pages for cloud provider tokens and cloud-init
scripts, including descriptions and UUID routes.

Generate private keys directly from the index and surface cloud provider
API loading errors in server creation flows.
This commit is contained in:
Andras Bacsai committed 2026-07-08 12:58:27 +02:00
1 parent 7236cb8228
commit e200d881f5
36 files changed
+1196 -126

No files matched your search

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('cloud_provider_tokens', function (Blueprint $table) {
$table->text('description')->nullable()->after('name');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('cloud_provider_tokens', function (Blueprint $table) {
$table->dropColumn('description');
});
}
};
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('cloud_init_scripts', function (Blueprint $table) {
$table->string('uuid')->nullable()->unique()->after('id');
});
DB::table('cloud_init_scripts')
->whereNull('uuid')
->orderBy('id')
->each(function (object $script): void {
DB::table('cloud_init_scripts')
->where('id', $script->id)
->update(['uuid' => new_public_id()]);
});
}
public function down(): void
{
Schema::table('cloud_init_scripts', function (Blueprint $table) {
$table->dropUnique(['uuid']);
$table->dropColumn('uuid');
});
}
};