Enable Discovery debug logging for production troubleshooting

- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Application\Security\Events\Auth;
@@ -11,7 +12,8 @@ final class AccountLockedEvent
public readonly string $email,
public readonly string $reason,
public readonly int $failedAttempts
) {}
) {
}
public function getOWASPEventIdentifier(): OWASPEventIdentifier
{
@@ -33,13 +35,13 @@ final class AccountLockedEvent
return [
'username' => $this->maskEmail($this->email),
'lock_reason' => $this->reason,
'failed_attempts' => $this->failedAttempts
'failed_attempts' => $this->failedAttempts,
];
}
private function maskEmail(string $email): string
{
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
if (! filter_var($email, FILTER_VALIDATE_EMAIL)) {
return $email;
}

View File

@@ -1,10 +1,11 @@
<?php
declare(strict_types=1);
namespace App\Application\Security\Events\Auth;
use App\Application\Security\{OWASPSecurityEvent};
use App\Application\Security\ValueObjects\{OWASPEventIdentifier, OWASPLogLevel, MaskedEmail};
use App\Application\Security\ValueObjects\{MaskedEmail, OWASPEventIdentifier, OWASPLogLevel};
final class AuthenticationFailedEvent implements OWASPSecurityEvent
{
@@ -40,7 +41,7 @@ final class AuthenticationFailedEvent implements OWASPSecurityEvent
'email' => $this->maskedEmail->toString(),
'reason' => $this->reason,
'failed_attempts' => $this->failedAttempts,
'failure_reason' => $this->reason ?? 'invalid_credentials'
'failure_reason' => $this->reason ?? 'invalid_credentials',
];
}

View File

@@ -1,10 +1,11 @@
<?php
declare(strict_types=1);
namespace App\Application\Security\Events\Auth;
use App\Application\Security\{OWASPSecurityEvent};
use App\Application\Security\ValueObjects\{OWASPEventIdentifier, OWASPLogLevel, MaskedEmail};
use App\Application\Security\ValueObjects\{MaskedEmail, OWASPEventIdentifier, OWASPLogLevel};
final class AuthenticationSuccessEvent implements OWASPSecurityEvent
{
@@ -38,7 +39,7 @@ final class AuthenticationSuccessEvent implements OWASPSecurityEvent
return [
'username' => $this->maskedEmail->toString(),
'session_id' => hash('sha256', $this->sessionId), // Session-ID hashen für Sicherheit
'method' => $this->method
'method' => $this->method,
];
}

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Application\Security\Events\Auth;
@@ -10,7 +11,8 @@ final class LoginFailed implements SecurityEvent
{
public function __construct(
public string $email
) {}
) {
}
public SecurityEventType $type {
get {

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Application\Security\Events\Auth;
@@ -10,7 +11,8 @@ final class PasswordChangedEvent
public function __construct(
public readonly string $email,
public readonly string $method = 'self_service'
) {}
) {
}
public function getOWASPEventIdentifier(): OWASPEventIdentifier
{
@@ -31,13 +33,13 @@ final class PasswordChangedEvent
{
return [
'username' => $this->maskEmail($this->email),
'change_method' => $this->method
'change_method' => $this->method,
];
}
private function maskEmail(string $email): string
{
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
if (! filter_var($email, FILTER_VALIDATE_EMAIL)) {
return $email;
}

View File

@@ -1,10 +1,11 @@
<?php
declare(strict_types=1);
namespace App\Application\Security\Events\Auth;
use App\Application\Security\{OWASPSecurityEvent};
use App\Application\Security\ValueObjects\{OWASPEventIdentifier, OWASPLogLevel, MaskedEmail};
use App\Application\Security\ValueObjects\{MaskedEmail, OWASPEventIdentifier, OWASPLogLevel};
final class SessionTerminatedEvent implements OWASPSecurityEvent
{
@@ -38,7 +39,7 @@ final class SessionTerminatedEvent implements OWASPSecurityEvent
return [
'username' => $this->maskedEmail->toString(),
'session_id' => hash('sha256', $this->sessionId),
'termination_reason' => $this->reason
'termination_reason' => $this->reason,
];
}