mikoweb/ccdn-user-security-bundle
A Symfony bundle that adds complete user account security: registration, login and logout, password reset, account confirmation by email, password strength rules, and role-based access control. It plugs into existing Symfony apps to handle common authentication workflows without building them from s...
This is a Symfony2 bundle, not a Composer library you can drop into a Laravel app. If you're working in Laravel, treat it as a reference implementation of a pattern (login-failure throttling) rather than something you require. If you are on a legacy Symfony 2.8/3.x project, it is installable but abandoned — see Gotchas before committing.
Minimal steps (Symfony 2.8-era project):
mikoweb/ccdn-user-bundle (the user/auth provider). You need that bundle installed and its login form/route working first — the security bundle hooks into that login flow. It will not do anything useful as a standalone package.composer require mikoweb/ccdn-user-security-bundle — check the fork's composer.json first; expect PHP 5.5+/Symfony 2.x constraints that will conflict with anything modern.app/AppKernel.php:
new CCDNUser\SecurityBundle\CCDNUserSecurityBundle(),
app/config/config.yml under ccdn_user_security — the primary knobs are the login-failure tracking settings (max failures, reset window, block/ban behaviour). Copy the bundle's DependencyInjection/Configuration.php defaults rather than guessing keys.php app/console doctrine:schema:update --force (or generate a migration). This creates the LoginFailure table.ccdn_user_security_login_failure rows.Where to look first:
DependencyInjection/Configuration.php — the authoritative list of config keys and defaults.Resources/config/services.yml — which listeners/subscribers are wired and their service IDs (this is how you override behaviour).Entity/LoginFailure.php + repository — the tracked data model.EventListener/ — where the auth events are intercepted.First use case: cap repeated failed logins for a username/IP, block for a cooldown period, and purge old records. That's the whole scope — it does not do password policy, 2FA, or session hardening.
Laravel equivalent for the same use case: RateLimiter + the throttle middleware + Illuminate\Auth\Events\Failed, or just use Fortify/Laravel UI's built-in lockout (Auth::attempt with RateLimiter::tooManyAttempts). The concepts map one-to-one; the code does not.
LoginFailure row and increments on repeat. In Laravel you'd mirror this on Illuminate\Auth\Events\Failed and Login (to reset counters):
Event::listen(Failed::class, fn ($e) => LoginAttempt::record($e->credentials['email'], request()->ip()));
Event::listen(Login::class, fn ($e) => LoginAttempt::clear($e->user->email, request()->ip()));
RateLimiter::tooManyAttempts($key, $max) (or the bundle's repository lookup) at the top of the login controller/middleware.where('created_at', '<', now()->subHours(24))->delete()).services.yml. If you need to change blocking behaviour, extend the listener class and redefine the service.RateLimiter::hit($key, $decaySeconds) with escalating decay plus a CAPTCHA challenge, rather than a permanent disable flag on the user row.username, ip_address, and created_at. Without them, every login does a full table scan once the failure table grows — a self-inflicted DoS.framework.trusted_proxies; in Laravel configure TrustProxies middleware. Otherwise X-Forwarded-For is attacker-controlled and per-IP limits vanish.Configuration.php in that fork before copying examples from blog posts — the defaults may differ from what the README shows.LoginFailure rows actually appear after a failed login — don't assume registration = protection.findRecent queries; keep them in the repository so you can swap the storage later without touching listeners.composer.json constraints to your Symfony LTS and PHP version, run the existing tests, and pin the fork by commit hash. Treat it like patching a vendored library, not like upgrading a maintained package.How can I help you explore Laravel packages today?