@extends('layouts.contentLayoutMaster') @section('title', __('locale.menu.Security and Compliance')) @section('vendor-style') @if(($tab ?? '') === 'providers') @endif @endsection @section('page-style') @if(($tab ?? '') === 'providers') @endif @endsection @php $editableTabs = ['login', 'providers', 'abuse', 'api', 'devices']; $isEditableTab = in_array($tab, $editableTabs, true); $scoreTone = $dashboard['tone'] ?? 'secondary'; $twoFactor = $dashboard['two_factor_coverage'] ?? ['percent' => 0, 'enrolled' => 0, 'total' => 0]; $webhookFailures = $dashboard['webhook_failures'] ?? ['percent' => 0, 'label' => 'normal', 'tone' => 'success']; $openRisks = (int) ($dashboard['open_risks'] ?? 0); $statCards = [ [ 'label' => 'Security score', 'value' => ($dashboard['score'] ?? 0).'/100', 'sub' => ucfirst((string) ($dashboard['label'] ?? 'attention needed')), 'icon' => 'shield', 'border' => $scoreTone === 'success' ? 'success' : ($scoreTone === 'warning' ? 'warning' : 'danger'), 'tone' => $scoreTone, ], [ 'label' => 'Open risks', 'value' => number_format($openRisks), 'sub' => 'Last 30 days', 'icon' => 'alert-triangle', 'border' => $openRisks > 0 ? 'danger' : 'success', 'tone' => $openRisks > 0 ? 'danger' : 'success', ], [ 'label' => 'Blocked attempts', 'value' => number_format((int) ($dashboard['blocked_attempts_24h'] ?? 0)), 'sub' => 'Last 24 hours', 'icon' => 'slash', 'border' => ((int) ($dashboard['blocked_attempts_24h'] ?? 0)) > 0 ? 'warning' : 'success', 'tone' => 'warning', ], [ 'label' => 'Outbound holds', 'value' => number_format((int) ($dashboard['outbound_holds'] ?? 0)), 'sub' => 'Pending review', 'icon' => 'pause-circle', 'border' => ((int) ($dashboard['outbound_holds'] ?? 0)) > 0 ? 'danger' : 'success', 'tone' => ((int) ($dashboard['outbound_holds'] ?? 0)) > 0 ? 'danger' : 'success', ], [ 'label' => '2FA coverage', 'value' => ($twoFactor['percent'] ?? 0).'%', 'sub' => ($twoFactor['enrolled'] ?? 0).' / '.($twoFactor['total'] ?? 0).' admins', 'icon' => 'lock', 'border' => ($twoFactor['percent'] ?? 0) >= 80 ? 'success' : 'warning', 'tone' => ($twoFactor['percent'] ?? 0) >= 80 ? 'success' : 'warning', ], [ 'label' => 'Webhook failures', 'value' => ($webhookFailures['percent'] ?? 0).'%', 'sub' => ucfirst((string) ($webhookFailures['label'] ?? 'normal')), 'icon' => 'activity', 'border' => ($webhookFailures['tone'] ?? 'success') === 'success' ? 'success' : 'danger', 'tone' => $webhookFailures['tone'] ?? 'success', ], ]; $navTabs = [ 'summary' => 'Summary', 'login' => 'Login & MFA', 'providers' => 'OTP Providers', 'abuse' => 'Abuse Filters', 'api' => 'API & Webhooks', 'devices' => 'Devices', 'danger' => 'Danger Zone', ]; @endphp @section('content')
Manage security_* controls, OTP delivery providers, outbound abuse filters, and high-impact incident actions. Changes are recorded in the security audit trail.
@foreach($statCards as $card)

{{ $card['label'] }}

{{ $card['value'] }}

{{ $card['sub'] }}
@endforeach
@if(isset($errors) && $errors->any()) @endif @if($isEditableTab)
@csrf @include('admin.security.tabs._'.$tab)
@if($tab === 'providers') @include('admin.security.tabs._providers_tests') @endif @else @include('admin.security.tabs._'.$tab) @endif
@endsection @section('vendor-script') @if(($tab ?? '') === 'providers') @endif @endsection @section('page-script') @if(($tab ?? '') === 'providers') @endif @endsection