|
| 1 | +## [3.4.1] - 2025-09-04 |
| 2 | +### Features |
| 3 | +- No new feature functionality introduced in these commits. |
| 4 | + |
| 5 | +### Fixes |
| 6 | +- Hardened audit logging to prevent NullPointerException on first-time OAuth registration when the user ID is null (Fixes #210). |
| 7 | + - FileAuditLogWriter: |
| 8 | + - Null-safe extraction of user fields. New subject resolution order for the 4th pipe-delimited field: user ID (if present) → email (if ID is null) → "unknown". |
| 9 | + - Catches and logs IOException and any other Exception to ensure audit failures never impact application flow. |
| 10 | + - Uses log.error for audit system failures. |
| 11 | + - AuditEventListener: |
| 12 | + - Wraps event handling in try/catch to suppress and log unexpected errors from configuration checks or writer failures. |
| 13 | + - Impact: |
| 14 | + - Prevents application crashes during first-time OAuth registration or other scenarios where user.getId() is null. |
| 15 | + - Compatibility note for log consumers: the user identifier field may now contain an email address or the literal "unknown" when no numeric ID is available. If your log processing expects a numeric ID, update parsers accordingly. |
| 16 | + |
| 17 | +### Breaking Changes |
| 18 | +- None. |
| 19 | + |
| 20 | +### Refactoring |
| 21 | +- None. |
| 22 | + |
| 23 | +### Documentation |
| 24 | +- Updated README dependency coordinates to version 3.4.1 for both Maven and Gradle. |
| 25 | + |
| 26 | +### Testing |
| 27 | +- Substantial test coverage added around audit logging for null-safety and robustness: |
| 28 | + - AuditEventListenerTest: |
| 29 | + - Ensures events with a user that has a null ID are handled and logged. |
| 30 | + - Verifies exceptions thrown by the writer are suppressed and do not propagate. |
| 31 | + - Verifies exceptions during audit configuration checks are suppressed and the writer is not called. |
| 32 | + - New FileAuditLogWriterTest (403 lines): |
| 33 | + - Null-safety cases: null user, null ID, null ID + null email, normal user with ID. |
| 34 | + - Error handling: IOException on write, uninitialized writer, unexpected exceptions during event access. |
| 35 | + - Setup and configuration: disabled logging, null config object, empty log file path. |
| 36 | + - Writer lifecycle: flush and cleanup behaviors. |
| 37 | +- Overall increases resilience and confidence in the audit subsystem through 15+ targeted test cases. |
| 38 | + |
| 39 | +### Other Changes |
| 40 | +- Bumped project version to 3.4.1-SNAPSHOT in gradle.properties via Gradle Release Plugin (development iteration; no runtime behavior change). |
| 41 | + |
1 | 42 | ## [3.4.0] - 2025-09-03 |
2 | 43 | ### Features |
3 | 44 | - Proxy-aware URL and IP detection |
|
0 commit comments