Skip to content

Commit d175317

Browse files
committed
[Gradle Release Plugin] - pre tag commit: '4.3.1'.
1 parent d529853 commit d175317

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

CHANGELOG.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,78 @@
1+
## [4.3.1] - 2026-03-22
2+
### Features
3+
- No new user-facing features in this release.
4+
5+
### Fixes
6+
- WebAuthn (MariaDB row-size limit): Prevent silent table creation failures when using ddl-auto: update/create
7+
- What happened: Hibernate previously mapped attestationObject and attestationClientDataJson to VARBINARY(65535). Two such large inline columns can exceed MariaDB/InnoDB’s 65,535-byte row-size limit, causing user_credentials table creation to fail silently and leading to 500s on /user/auth-methods or /user/webauthn/credentials.
8+
- Implementation details:
9+
- In WebAuthnCredential:
10+
- publicKey, attestationObject, attestationClientDataJson are now annotated with @Column(length = Length.LONG32).
11+
- This forces Hibernate to use LONGBLOB on MariaDB/MySQL (stored off-page, avoiding row-size limits) and bytea on PostgreSQL.
12+
- Explicitly avoids using @Lob to prevent PostgreSQL OID mapping per Hibernate docs.
13+
- Added Javadoc to these fields explaining the rationale to prevent regressions.
14+
- Additional polish: import ordering standardized.
15+
- Migration:
16+
- If user_credentials was never created on MariaDB/MySQL, it will be created successfully on next startup with ddl-auto: update.
17+
- If the table exists with VARBINARY columns (e.g., created on a non-MariaDB DB), convert to LONGBLOB:
18+
- ALTER TABLE user_credentials
19+
MODIFY COLUMN public_key LONGBLOB NOT NULL,
20+
MODIFY COLUMN attestation_object LONGBLOB,
21+
MODIFY COLUMN attestation_client_data_json LONGBLOB;
22+
- With ddl-auto: update on MariaDB/MySQL, Hibernate will handle this automatically. No change required on PostgreSQL (remains bytea).
23+
24+
- OAuth2/OIDC attributes: Populate DSUserDetails.getAttributes() correctly and harden against mutation
25+
- What happened: DSUserDetails implemented OAuth2User/OidcUser but getAttributes() returned empty for OAuth2 and null for OIDC, breaking standard patterns like getAttribute("email").
26+
- Implementation details:
27+
- DSUserDetails constructors now initialize attributes properly:
28+
- New 3-arg constructor accepts provider attributes and defensively copies them.
29+
- OIDC constructor now falls back to ID token claims, then User entity fields if provider attributes are missing.
30+
- Added a buildFallbackAttributes(User) helper that maps User fields to standard claims (email, given_name, family_name, name) so attributes are never null.
31+
- LoginHelperService:
32+
- Added overloads: userLoginHelper(User, Map) and userLoginHelper(User, OidcUserInfo, OidcIdToken, Map) to propagate provider attributes into DSUserDetails.
33+
- Original overloads retained for local/password login compatibility.
34+
- DSOAuth2UserService and DSOidcUserService now pass through provider attributes to LoginHelperService.
35+
- Security hardening: DSUserDetails.getAttributes() now returns Collections.unmodifiableMap to prevent callers from mutating internal state.
36+
- Name claim building now ignores missing parts to avoid values like "Test null" or "null User".
37+
- Result: getAttribute("email") and other attribute access now work reliably for OAuth2/OIDC users, with immutable attribute maps.
38+
39+
- Dependencies: Remove redundant webauthn4j-core direct dependency
40+
- Spring Security’s spring-security-webauthn already brings webauthn4j-core transitively, and this project has no direct com.webauthn4j.* imports.
41+
- Reduces transitive footprint for consuming applications and avoids unnecessarily forcing an implementation dependency.
42+
43+
### Breaking Changes
44+
- None expected for typical usage.
45+
- Subtle behavior change: DSUserDetails.getAttributes() is now unmodifiable. If your application previously mutated the returned Map (not recommended), update your code to work with an immutable view.
46+
- Schema note: On MariaDB/MySQL, byte[] columns for WebAuthn credentials now use LONGBLOB. With ddl-auto: update, Hibernate will migrate automatically. If you manually manage schema, see the Migration section under Fixes for the ALTER TABLE commands.
47+
48+
### Refactoring
49+
- Minor code hygiene:
50+
- Import ordering standardized (alphabetical: jakarta < java < lombok < org).
51+
- Javadoc added to WebAuthnCredential’s byte[] fields explaining use of Length.LONG32.
52+
53+
### Documentation
54+
- README install snippets updated to reference version 4.3.1.
55+
- MIGRATION.md expanded with clear guidance for WebAuthn schema issues on MariaDB/MySQL, including SQL to convert existing VARBINARY columns to LONGBLOB and notes about PostgreSQL behavior.
56+
57+
### Testing
58+
- Database schema validation via Testcontainers (MariaDB and PostgreSQL):
59+
- Verifies all expected tables are created with ddl-auto: create on real containers.
60+
- Ensures WebAuthn byte[] columns are mapped to BLOB-compatible types (longblob on MariaDB, bytea on PostgreSQL), not inline VARBINARY.
61+
- Added testcontainers-junit-jupiter and testcontainers-postgresql dependencies.
62+
- Column mapping unit test ensures WebAuthnCredential byte[] fields use Length.LONG32.
63+
- DSUserDetails test suite substantially expanded:
64+
- Covers OAuth2, OIDC, and local paths; fallback behavior; getAttribute("email"); defensive copying; unmodifiable attributes; and name claim building with partial names.
65+
- Test polish:
66+
- Typed ArgumentMatchers to eliminate raw types in OAuth2/OIDC service tests.
67+
- LoginHelperService tests updated to use typed collections and doReturn stubbing to remove unchecked warnings.
68+
69+
### Other Changes
70+
- Build/versioning:
71+
- gradle.properties bumped to 4.3.1-SNAPSHOT.
72+
- Lombok upgraded from 1.18.42 to 1.18.44.
73+
- Repo hygiene:
74+
- .gitignore: added docs/superpowers/ to ignore tool-generated artifacts.
75+
176
## [4.3.0] - 2026-03-12
277
### Features
378
- RegistrationGuard SPI to gate all registration paths

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version=4.3.1-SNAPSHOT
1+
version=4.3.1
22
mavenCentralPublishing=true
33
mavenCentralAutomaticPublishing=true

0 commit comments

Comments
 (0)