Skip to content

Commit dc3a6c3

Browse files
committed
docs: add 4.2.0 changelog entry and update WebAuthn documentation
Add comprehensive CHANGELOG entry for the WebAuthn/Passkey feature and 14 PR review fixes. Update README version references to 4.2.0 for Spring Boot 4+ snippets and add cleanup note to WebAuthn features. Add automatic deletion cleanup note to CONFIG important notes.
1 parent 007774b commit dc3a6c3

3 files changed

Lines changed: 57 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
## [4.2.0] - 2026-02-21
2+
### Features
3+
- WebAuthn / Passkey support (opt-in, disabled by default)
4+
- Passwordless authentication via platform authenticators (Touch ID, Face ID, Windows Hello) and roaming security keys (YubiKey)
5+
- Synced passkey support (iCloud Keychain, Google Password Manager, etc.)
6+
- Passkey management REST API under `/user/webauthn/*` (auth required):
7+
- GET `/user/webauthn/credentials` — List user's registered passkeys
8+
- GET `/user/webauthn/has-credentials` — Check if user has any passkeys
9+
- PUT `/user/webauthn/credentials/{id}/label` — Rename a passkey (max 64 chars)
10+
- DELETE `/user/webauthn/credentials/{id}` — Delete a passkey (with last-credential protection)
11+
- `WebAuthnAuthenticationToken` — Custom authentication token that distinguishes passkey sessions from password-based sessions, enabling downstream code to check how a user authenticated
12+
- Automatic cleanup of passkey data when a user account is deleted via `WebAuthnPreDeleteEventListener` (listens for `UserPreDeleteEvent`)
13+
- Configuration properties under `user.webauthn.*` (enabled, rpId, rpName, allowedOrigins)
14+
- Database schema additions: `user_entities` and `user_credentials` tables with `ON DELETE CASCADE` for referential integrity
15+
16+
### Fixes
17+
- Safety and input handling
18+
- Safe-parse `AuthenticatorTransport` enum values to prevent `IllegalArgumentException` on unknown transport types
19+
- Default passkey label to "Passkey" when no label is provided instead of leaving it blank
20+
- Trim passkey labels before enforcing the 64-character length limit
21+
- Fixed TOCTOU race condition in last-credential protection by recounting credentials inside the `@Transactional` boundary
22+
- Data integrity
23+
- Added `ON DELETE CASCADE` to WebAuthn foreign keys so credential data is cleaned up at the database level when a user is deleted
24+
- Added `WebAuthnPreDeleteEventListener` to clean up WebAuthn user entities and credentials via JPA before user deletion, complementing the cascade
25+
- API quality
26+
- `transports` field in credential responses is now `List<String>` instead of a single comma-delimited string
27+
- Added `@NotBlank` validation on path variable parameters in management API endpoints
28+
- `WebAuthnManagementAPIAdvice` is now `@ConditionalOnProperty(name = "user.webauthn.enabled")` so it is not loaded when WebAuthn is disabled
29+
- Design improvements
30+
- `WebAuthnException` now extends `RuntimeException` (was checked `Exception`), simplifying error handling throughout the WebAuthn stack
31+
- User handle generation uses `SecureRandom` bytes instead of deterministic user ID mapping, improving privacy
32+
- Credential operations use `@Transactional(propagation = MANDATORY)` to enforce that callers provide a transaction context
33+
34+
### Breaking Changes
35+
- None. WebAuthn is a new opt-in feature disabled by default. Existing APIs and behavior are unchanged.
36+
37+
### Documentation
38+
- Added WebAuthn/Passkey sections to README (setup, features, API endpoints) and CONFIG (settings, examples, important notes)
39+
- Updated CHANGELOG with 4.2.0 entry
40+
41+
### Testing
42+
- New test suites for all WebAuthn components:
43+
- `WebAuthnManagementAPITest` — REST endpoint behavior, validation, error handling
44+
- `WebAuthnCredentialManagementServiceTest` — Service-layer logic, TOCTOU protection, transports parsing
45+
- `WebAuthnAuthenticationSuccessHandlerTest` — Authentication token creation, user resolution
46+
- `WebAuthnUserEntityBridgeTest` — User entity bridge and handle generation
47+
- `WebAuthnPreDeleteEventListenerTest` — Cleanup on user deletion
48+
49+
### Other Changes
50+
- Version bumped to 4.2.0-SNAPSHOT in gradle.properties
51+
- Test output noise reduced with context-aware verbosity for expected WebAuthn exceptions
52+
153
## [4.1.0] - 2026-02-02
254
### Features
355
- GDPR compliance (opt‑in, disabled by default)

CONFIG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ WebAuthn requires two additional tables: `user_entities` and `user_credentials`.
103103
- Users must be authenticated before they can register a passkey. Passkeys enhance existing authentication, not replace initial registration.
104104
- You must add `/webauthn/authenticate/**` and `/login/webauthn` to your `unprotectedURIs` for passkey login to work.
105105
- Passkey labels are limited to 64 characters.
106+
- When a user account is deleted, all associated WebAuthn credentials and user entities are automatically cleaned up via the `UserPreDeleteEvent` listener. The database schema also uses `ON DELETE CASCADE` as a safety net.
106107

107108
## Mail Configuration
108109

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ Spring Boot 4.0 brings significant changes including Spring Security 7 and requi
129129
<dependency>
130130
<groupId>com.digitalsanctuary</groupId>
131131
<artifactId>ds-spring-user-framework</artifactId>
132-
<version>4.1.0</version>
132+
<version>4.2.0</version>
133133
</dependency>
134134
```
135135

136136
**Gradle:**
137137
```groovy
138-
implementation 'com.digitalsanctuary:ds-spring-user-framework:4.1.0'
138+
implementation 'com.digitalsanctuary:ds-spring-user-framework:4.2.0'
139139
```
140140

141141
#### Spring Boot 4.0 Key Changes
@@ -206,7 +206,7 @@ Follow these steps to get up and running with the Spring User Framework in your
206206

207207
**Spring Boot 4.0 (Java 21+):**
208208
```groovy
209-
implementation 'com.digitalsanctuary:ds-spring-user-framework:4.1.0'
209+
implementation 'com.digitalsanctuary:ds-spring-user-framework:4.2.0'
210210
```
211211

212212
**Spring Boot 3.5 (Java 17+):**
@@ -607,6 +607,7 @@ Passwordless authentication using biometrics (Touch ID, Face ID, Windows Hello),
607607
- Passkey management REST API (list, rename, delete credentials)
608608
- Last-credential protection (prevents lockout if user has no password)
609609
- Synced passkey support (iCloud Keychain, Google Password Manager, etc.)
610+
- Automatic cleanup of passkey data when a user account is deleted
610611
- Disabled by default; must be explicitly enabled with required database tables
611612

612613
**Setup:**

0 commit comments

Comments
 (0)