Skip to content

docs: ADR 0005 — trusted-proxy-gated client-IP resolution#193

Merged
SyniRon merged 1 commit into
developfrom
docs/adr-0005-trusted-proxy-client-ip
Jun 8, 2026
Merged

docs: ADR 0005 — trusted-proxy-gated client-IP resolution#193
SyniRon merged 1 commit into
developfrom
docs/adr-0005-trusted-proxy-client-ip

Conversation

@SyniRon

@SyniRon SyniRon commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Records the design decision from #190 (auth 401 logs report the proxy address instead of the client).

The API runs behind a TLS-terminating reverse proxy, so r.RemoteAddr is always the proxy. ADR 0005 establishes that the client IP is resolved from forwarding headers only when the TCP peer is in a configured trusted-proxy set (TRUSTED_PROXIES, default empty = trust nothing), taking the right-most-untrusted X-Forwarded-For entry with an X-Real-IP fallback. It records the rejected alternatives and flags the malformed-XFF fallback as availability-biased so it isn't later "tightened."

Doc-only; no code change. The implementation lands with #190.

Refs #190.

This was generated by AI

Records the decision behind #190: the auth 401 logs resolve the client IP
from forwarding headers only when the TCP peer is in a configured
trusted-proxy set (TRUSTED_PROXIES), taking the rightmost-untrusted XFF entry
with an X-Real-IP fallback. Captures the rejected alternatives and notes the
availability-biased fallback so it isn't later tightened.

This was generated by AI
@SyniRon SyniRon merged commit 617082a into develop Jun 8, 2026
3 checks passed
@SyniRon SyniRon deleted the docs/adr-0005-trusted-proxy-client-ip branch June 8, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant