fix(server): use native Spring Boot access-log retention for DSMS#1047
fix(server): use native Spring Boot access-log retention for DSMS#1047FelixTJDietrich merged 3 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughThe changes shift server access logging from Docker container log buffers (250 MB/30 MB) to native Tomcat access logging with 14-day automatic retention. Infrastructure is updated to support the new logging mechanism, and all compliance documentation and privacy statements are revised to reflect this change. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📚 Documentation Preview
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/admin/dsms/03-vt-dsms.md (1)
143-143:⚠️ Potential issue | 🟠 MajorUpdate the stale server-log data-category row.
Line 143 still mentions the old storage-cap model plus
user-agentandreferrer, but §13 and the Tomcat pattern no longer include those fields. This would make the DSMS submission internally inconsistent.Proposed documentation fix
-- **Server logs (per-service storage cap, oldest entries dropped automatically once exceeded; see §13):** IP address, timestamp, HTTP method, URL, status code, bytes transferred, user-agent, referrer. +- **Application-server security logs (native Tomcat access log; see §13):** IP address, timestamp, HTTP method, request path, protocol version, status code, response size, and server-side processing time.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/admin/dsms/03-vt-dsms.md` at line 143, The "Server logs (per-service storage cap, oldest entries dropped automatically once exceeded; see §13):" row is stale—remove the obsolete "per-service storage cap" phrase and drop the two fields no longer emitted by the Tomcat pattern (user-agent and referrer); update the field list to match §13/Tomcat (e.g., IP address, timestamp, HTTP method, URL, status code, bytes transferred) and add a short note pointing to §13 for retention/rotation details so the row aligns with current logging behavior.
🧹 Nitpick comments (1)
docs/admin/dsms/02-dsfa-prescreen.md (1)
57-57: Clarify scope of “server-log” vs “access-log” retention.Consider renaming this bullet to explicitly say access-log retention (or add a short clause about application/runtime logs) to prevent audit ambiguity about what is bounded by
max-days=14.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/admin/dsms/02-dsfa-prescreen.md` at line 57, Rename or clarify the bullet so it explicitly refers to access-log retention (not generic “server-log”) and/or add a short clause distinguishing access logs from other application/runtime logs; update the sentence that mentions server.tomcat.accesslog.max-days=14 to read something like “Bounded access-log retention (application access logs) via the application server’s native access-log retention (server.tomcat.accesslog.max-days=14) — application/runtime logs are out of scope” so auditors clearly know which logs the 14-day limit applies to.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@docs/admin/dsms/03-vt-dsms.md`:
- Line 143: The "Server logs (per-service storage cap, oldest entries dropped
automatically once exceeded; see §13):" row is stale—remove the obsolete
"per-service storage cap" phrase and drop the two fields no longer emitted by
the Tomcat pattern (user-agent and referrer); update the field list to match
§13/Tomcat (e.g., IP address, timestamp, HTTP method, URL, status code, bytes
transferred) and add a short note pointing to §13 for retention/rotation details
so the row aligns with current logging behavior.
---
Nitpick comments:
In `@docs/admin/dsms/02-dsfa-prescreen.md`:
- Line 57: Rename or clarify the bullet so it explicitly refers to access-log
retention (not generic “server-log”) and/or add a short clause distinguishing
access logs from other application/runtime logs; update the sentence that
mentions server.tomcat.accesslog.max-days=14 to read something like “Bounded
access-log retention (application access logs) via the application server’s
native access-log retention (server.tomcat.accesslog.max-days=14) —
application/runtime logs are out of scope” so auditors clearly know which logs
the 14-day limit applies to.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a2257b1e-92c2-4c89-8c42-19a052fb3e77
📒 Files selected for processing (9)
docker/compose.app.yamldocs/admin/dsms/02-dsfa-prescreen.mddocs/admin/dsms/03-vt-dsms.mddocs/admin/dsms/04-toms.mddocs/admin/dsms/README.mddocs/admin/dsms/SUBMISSION-GUIDE.mdserver/application-server/Dockerfileserver/application-server/src/main/resources/application-prod.ymlwebapp/public/legal/profiles/tumaet/privacy.md
|
🎉 This PR is included in version 0.62.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
This narrows the solution down to the smallest defensible change: use embedded Tomcat's native access-log retention for the application server, and make the legal / DSMS text match that reality. It intentionally removes extra env surface and avoids leaking implementation trivia into the public privacy notice.
What I changed after re-review
server.tomcat.accesslog.max-days=14.application-prod.ymlinstead of being spread across compose and.env.Why this is better
Official Spring Boot basis
Verified against Spring Boot documentation:
Loggingreference: Boot supports native file logging and Logback rolling-policy properties.Embedded Web Servershow-to: Tomcat access logging is a first-class built-in feature and supports custom patterns.Security/ proxy how-to:server.forward-headers-strategy=nativeandserver.tomcat.redirect-context-root=falseare the documented proxy-safe approach behind TLS-terminating proxies.How to test
npm run checkcd server/application-server && ./mvnw test -qIMAGE_TAG=latest APP_HOSTNAME=example.com docker compose -f docker/compose.app.yaml config --quietserver/application-server/src/main/resources/application-prod.ymlcontainsserver.tomcat.accesslog.enabled=trueandserver.tomcat.accesslog.max-days=14/var/log/hephaestus/access/and files older than 14 days are not retainedSummary by CodeRabbit
New Features
Documentation