advancedScenario Questions

Scenario 22: Your login endpoint is being hit thousands of times per minute from a botnet trying common password lists against real usernames.

This is credential stuffing/a dictionary attack against your login endpoint. Layer defenses: per-IP and per-account rate limiting at the gateway, temporary account lockout after repeated failures (isAccountNonLocked()), a CAPTCHA challenge after a failure threshold, and anomaly monitoring for spikes of failed logins across many accounts from a small set of IPs.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Scenario 23: Your 'Login with Google' button works fine in Chrome but fails silently in Safari with strict cookie settings enabled.← Back to all Spring Security questions