Add timeouts to outbound fetches (OIDC discovery/token/JWKS, geocoding) #31
Labels
No labels
bug
decision
docs
enhancement
integration
ops
security
tech-debt
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/BatteryStorageCalculator#31
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
None of the backend's outbound calls set a timeout:
geocode.js:27(Nominatim),auth.js:158(OIDC discovery),auth.js:175(token exchange),auth.js:162(remote JWKS). A hung upstream stalls the request indefinitely — for the auth routes, that is the login path.Fix: pass
signal: AbortSignal.timeout(8000)(tune per call) to each fetch;createRemoteJWKSetaccepts atimeoutDurationoption. Return a clear 502/504 with the upstream named. Optionally one retry with backoff for the idempotent discovery/JWKS GETs.Acceptance criteria
(Audit finding F-10, 2026-07-16 — Severity: Medium, Confidence: High)