Fix: Unauthenticated /api/tracking endpoints expose retained request telemetry including client IP addresses - #315
Conversation
…ent data Co-Authored-By: Wes Convery <2wconvery@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
||
| @RestController | ||
| @RequestMapping(path = "/api/tracking") | ||
| @ConditionalOnProperty(name = "ftgo.api-tracking.endpoints.enabled", havingValue = "true") |
There was a problem hiding this comment.
There was a problem hiding this comment.
Agreed that the opt-in path is still unauthenticated, but adding authentication is out of scope for this minimal remediation: the application has no Spring Security (or any auth) dependency today, so introducing one would change the security model of every endpoint in the monolith, not just /api/tracking.
What this PR does close: the endpoints are off by default (ftgo.api-tracking.endpoints.enabled=false), and the persisted telemetry no longer contains query strings or full client IPs, so even when an operator opts in the exposed data is coarsened. Gating diagnostics behind authentication would be the right follow-up — flagging it for the repo owners rather than bundling an auth stack into this fix.
Co-Authored-By: Wes Convery <2wconvery@gmail.com>
Co-Authored-By: Wes Convery <2wconvery@gmail.com>
Summary
Finding: Unauthenticated /api/tracking endpoints expose retained request telemetry including client IP addresses (NS terms / data-flow gap) in COG-GTM/ftgo-monolith.
ApiTrackingInterceptorpersistedremoteAddr, the fullqueryStringandUser-Agentfor every request to/**, andApiTrackingControllerre-published those rows over unauthenticated/api/tracking/*with unbounded lookback (the app has no security starter orWebSecurityConfigurer).Fix approach: close the exposure and shrink what is retained —
ftgo.api-tracking.endpoints.enabled=falseis set explicitly inapplication.propertiesso the boundary is visible in config; operators that need the read API must opt in (behind their own access control). Request/response timing, status and correlation-ID tracking are unchanged.Link to Devin session: https://app.devin.ai/sessions/77249313a8fd4c14b8ebc931630a71f3
Open in Devin Desktop: https://app.devin.ai/desktop/session/77249313a8fd4c14b8ebc931630a71f3?variant=devin
Requested by: @WesternConcrete
Devin Review