Chris Lu
8b5d31e5eb
s3api/policy_engine: use forwarded client IP for aws:SourceIp (#8304)
* s3api: honor forwarded source IP for policy conditions
Prefer X-Forwarded-For/X-Real-Ip before RemoteAddr when populating aws:SourceIp in policy condition evaluation. Also avoid noisy parsing behavior for unix socket markers and add coverage for precedence/fallback paths.\n\nFixes #8301.
* s3api: simplify remote addr parsing
* s3api: guard aws:SourceIp against DNS hosts
* s3api: simplify remote addr fallback
* s3api: simplify remote addr parsing
* Update weed/s3api/policy_engine/engine.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix TestExtractConditionValuesFromRequestSourceIPPrecedence using trusted private IP
* Refactor extractSourceIP to use R-to-L XFF parsing and net.IP.IsPrivate
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-11 12:47:03 -08:00
..
2026-02-10 12:56:34 -08:00
2026-01-28 14:34:07 -08:00
2026-02-10 18:38:38 -08:00
2026-02-03 17:43:58 -08:00
2026-02-10 18:38:38 -08:00
2025-10-17 22:11:50 -07:00
2026-01-07 13:06:08 -08:00
2026-01-29 20:03:43 -08:00
2026-01-23 20:12:59 -08:00
2026-01-07 13:06:08 -08:00
2025-08-22 22:10:30 -07:00
2026-01-31 13:46:37 -08:00
2026-01-22 14:05:45 -08:00
2026-01-07 13:06:08 -08:00
2026-02-10 19:06:35 -08:00
2026-02-09 11:52:08 -08:00
2025-12-23 14:48:50 -08:00
2026-02-09 11:28:07 -08:00
2026-02-10 20:18:35 -08:00
2026-02-11 12:47:03 -08:00
2026-01-12 13:21:48 -08:00
2026-01-07 13:06:08 -08:00
2026-02-11 11:04:08 -08:00
2025-12-08 01:24:42 -08:00
2026-02-11 11:04:08 -08:00
2024-02-14 08:26:38 -08:00
2026-01-07 13:06:08 -08:00
2026-02-11 11:04:08 -08:00
2026-01-18 14:02:34 -08:00
2026-02-05 10:24:18 -08:00
2026-02-10 18:38:38 -08:00
2026-01-22 14:07:24 -08:00
2026-02-04 12:44:52 -08:00
2025-11-29 11:36:22 -08:00
2025-12-25 11:36:38 -08:00