feat(logging): strengthen secret redaction and add admin controls (#12151)

This commit is contained in:
Andras Bacsai
2026-10-13 20:43:19 +02:00
committed by GitHub
parent 9302395063
commit 448dc8ea0a
92 changed files with 4582 additions and 417 deletions
@@ -0,0 +1,34 @@
<?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('application_settings', function (Blueprint $table) {
$table->boolean('redact_all_env_values_in_logs')->default(true);
});
Schema::table('services', function (Blueprint $table) {
$table->boolean('redact_all_env_values_in_logs')->default(true);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('application_settings', function (Blueprint $table) {
$table->dropColumn('redact_all_env_values_in_logs');
});
Schema::table('services', function (Blueprint $table) {
$table->dropColumn('redact_all_env_values_in_logs');
});
}
};
@@ -0,0 +1,36 @@
<?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
{
if (Schema::hasIndex('application_settings', ['application_id'])) {
return;
}
Schema::table('application_settings', function (Blueprint $table) {
$table->index('application_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
if (! Schema::hasIndex('application_settings', ['application_id'])) {
return;
}
Schema::table('application_settings', function (Blueprint $table) {
$table->dropIndex(['application_id']);
});
}
};
@@ -0,0 +1,50 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
private array $tables = [
'standalone_postgresqls',
'standalone_redis',
'standalone_mongodbs',
'standalone_mysqls',
'standalone_mariadbs',
'standalone_keydbs',
'standalone_dragonflies',
'standalone_clickhouses',
'standalone_sqlites',
];
/**
* Run the migrations.
*/
public function up(): void
{
foreach ($this->tables as $table) {
if (Schema::hasColumn($table, 'redact_all_env_values_in_logs')) {
continue;
}
Schema::table($table, function (Blueprint $table) {
$table->boolean('redact_all_env_values_in_logs')->default(true);
});
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
foreach ($this->tables as $table) {
if (! Schema::hasColumn($table, 'redact_all_env_values_in_logs')) {
continue;
}
Schema::table($table, function (Blueprint $table) {
$table->dropColumn('redact_all_env_values_in_logs');
});
}
}
};