feat(Production): Complete production deployment infrastructure

- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
This commit is contained in:
2025-10-25 19:18:37 +02:00
parent caa85db796
commit fc3d7e6357
83016 changed files with 378904 additions and 20919 deletions

View File

@@ -10,8 +10,7 @@ final readonly class CsrfTokenGenerator
{
public function __construct(
private RandomGenerator $random
) {
}
) {}
/**
* Generate a new CSRF token.
@@ -20,7 +19,7 @@ final readonly class CsrfTokenGenerator
*/
public function generate(): CsrfToken
{
$tokenValue = bin2hex($this->random->bytes(32));
$tokenValue = $this->random->hex(32);
return CsrfToken::fromString($tokenValue);
}

View File

@@ -7,33 +7,40 @@ namespace App\Framework\Security\RequestSigning\Migrations;
use App\Framework\Database\ConnectionInterface;
use App\Framework\Database\Migration\Migration;
use App\Framework\Database\Migration\MigrationVersion;
use App\Framework\Database\Schema\Blueprint;
use App\Framework\Database\Schema\Schema;
final class CreateSigningKeysTable implements Migration
{
public function up(ConnectionInterface $connection): void
{
$sql = <<<SQL
CREATE TABLE IF NOT EXISTS signing_keys (
key_id VARCHAR(255) NOT NULL,
key_material TEXT NOT NULL,
algorithm VARCHAR(50) NOT NULL,
expires_at TIMESTAMP NULL DEFAULT NULL,
is_active BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
$schema = new Schema($connection);
PRIMARY KEY (key_id),
INDEX idx_signing_keys_active_expires (is_active, expires_at),
INDEX idx_signing_keys_created (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
SQL;
$schema->createIfNotExists('signing_keys', function (Blueprint $table) {
$table->string('key_id', 255)->primary();
$table->text('key_material');
$table->string('algorithm', 50);
$table->timestamp('expires_at')->nullable();
$table->boolean('is_active')->default(true);
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->nullable();
$connection->query($sql);
$table->index(['is_active', 'expires_at'], 'idx_signing_keys_active_expires');
$table->index('created_at', 'idx_signing_keys_created');
$table->engine('InnoDB');
$table->charset('utf8mb4');
$table->collation('utf8mb4_unicode_ci');
});
$schema->execute();
}
public function down(ConnectionInterface $connection): void
{
$connection->execute("DROP TABLE IF EXISTS signing_keys");
$schema = new Schema($connection);
$schema->dropIfExists('signing_keys');
$schema->execute();
}
public function getVersion(): MigrationVersion

View File

@@ -13,8 +13,7 @@ final readonly class SigningString
{
public function __construct(
private Request $request,
) {
}
) {}
/**
* Build the signing string from specified headers