Admin Audit Log Trusts a Spoofable Forwarded IP
Level 2 · node · Security · Proxy trust boundary error
Scenario
An admin API stores the source IP of change operations in its audit log. External requests arrive through an edge proxy, whose adapter passes the connection peer and forwarded header into the request context. A directly connected client can currently supply an arbitrary forwarded IP header and change sourceIp in the audit log, making incident records unreliable.
Requirements
- Use a forwarded IP only when the request came from the trusted edge proxy - For direct connections, record the peer IP even when a forwarded header is present - For trusted proxy requests without a forwarded IP, record the peer IP - Preserve the audit event actor and action unchanged - Stored events must be readable from the repository
Acceptance criteria
- The forwarded IP from the trusted proxy is recorded
- A spoofed forwarded IP on a direct request is ignored
- A proxy request without a forwarded IP falls back to the peer IP
- Actor and action remain unchanged
- The stored audit event can be read back