Central Security Centre

* Security policy management
* Minimum password-length policy
* Mixed-case, number, and symbol requirements
* Password expiry and history settings
* MFA requirement policy
* Failed-login and lockout settings
* Session idle-time policy
* Single-session policy
* Automatic successful-login recording
* Automatic failed-login recording
* Automatic logout recording
* Authentication history
* IP allow and deny rules
* IPv4 CIDR support
* Administration and login rule scopes
* Trusted-device storage and revocation
* Security middleware registration
* Administration navigation
* Security permissions
* Module registration and tests
This commit is contained in:
Mark Gregory
2026-07-24 12:30:40 +01:00
parent 86f2bc75aa
commit 7fb71c4d24
21 changed files with 270 additions and 3 deletions
@@ -0,0 +1,15 @@
<?php
namespace Modules\Security\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Modules\Security\Services\IpRuleService;
use Symfony\Component\HttpFoundation\Response;
final class EnforceIpRestrictions
{
public function __construct(private readonly IpRuleService $rules) {}
public function handle(Request $request, Closure $next, string $scope='admin'): Response
{
abort_if($this->rules->isBlocked((string)$request->ip(),$scope),403,'Access is not permitted from this IP address.');
return $next($request);
}
}