Implementing Password Leak Detection in Spring Boot 3.3 with HaveIBeenPwned

This article explains how Chrome's built‑in password leak alert works and demonstrates how to integrate the same compromised‑password checking into a Spring Boot 3.3 application using the HaveIBeenPwned API, complete with code examples and screenshots.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
Implementing Password Leak Detection in Spring Boot 3.3 with HaveIBeenPwned

Chrome Browser Password Leak Check

Chrome includes a password leak detection feature that alerts users when their saved passwords have been exposed in data breaches.

Chrome password leak warning screenshot
Chrome password leak warning screenshot

Spring Boot 3.3 Password Leak Check

Demo

When a user enters a compromised password, the Spring Security login filter triggers a check and returns a warning.

The provided password is compromised, please change your password
Spring Boot password leak warning
Spring Boot password leak warning

Implementation

@Bean
public CompromisedPasswordChecker compromisedPasswordChecker() {
    return new HaveIBeenPwnedRestApiPasswordChecker();
}

Uses the HaveIBeenPwned API (api.pwnedpasswords.com) to verify passwords.

pwnedpasswords Service

Checks whether a password appears in known breach databases by querying the service with the password hash.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Spring BootSecurityhaveibeenpwnedPassword Leak Detection
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.