Skip to content

feat: implement Resilience4j fault tolerance and automated account lockout security - #37

Merged
podlLev merged 5 commits into
devfrom
fix/weather-api-resilience-and-account-lockout
Jul 23, 2026
Merged

podlLev merged 5 commits into
devfrom
fix/weather-api-resilience-and-account-lockout

Conversation

@podlLev

@podlLev podlLev commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Overview

This PR introduces Resilience4j fault tolerance patterns (Retry & Circuit Breaker) for external weather API integrations alongside automated account lockout defenses against credential brute-forcing attacks.


Key Changes

  • System Fault Tolerance & Resilience (Resilience4j):

    • Dependency Integration: Added resilience4j-spring-boot3 starter to enable declarative fault-tolerance annotations and configurations.
    • Smart Retry Predicate: Implemented WeatherApiRetryPredicate to conditionally trigger retries based on specific weather API response status codes or failure exceptions.
    • Circuit Breaker & Resilience Configuration: Configured circuit breaker trip thresholds and retry policies for the weather integration layer to protect upstream services during external outages, supported by unit test coverage.
  • Account Security & Brute-Force Defenses:

    • Schema Migration: Added failed_login_attempts and locked_until columns to the users table to track authentication failures and temporary lock periods.
    • Automated Account Lockout: Implemented security logic to automatically lock user accounts after a threshold of repeated failed sign-in attempts, neutralizing credential stuffing and brute-force attacks.

@podlLev podlLev self-assigned this Jul 23, 2026
@podlLev podlLev added feature New features, fresh endpoints, or user-facing functionality fix A bug fix or patch resolving a runtime error or misbehavior labels Jul 23, 2026
@podlLev
podlLev merged commit e5f01c6 into dev Jul 23, 2026
2 checks passed
@podlLev
podlLev deleted the fix/weather-api-resilience-and-account-lockout branch July 23, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features, fresh endpoints, or user-facing functionality fix A bug fix or patch resolving a runtime error or misbehavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant