mirror of
https://github.com/floci-io/floci.git
synced 2026-11-28 16:11:48 -05:00
CloudTrail's sourceIPAddress is the address a request was made from. Floci took it from the first X-Forwarded-For entry whenever a request carried one, so any client could choose the address its S3 calls, and the S3 calls IAM refused, were recorded from. It now comes from the connection, read in one place, RequestSourceAddress, which the S3 controller and the IAM enforcement filter both call. Behind a reverse proxy, Quarkus's proxy settings (proxy-address-forwarding, allow-x-forwarded, trusted-proxies) make the address a trusted proxy forwards the source address, and only that proxy's. Quarkus takes the first address in X-Forwarded-For, so the CloudTrail page says the proxy must replace a client-sent header rather than append to it. The integration test reads the trail's log files through CloudTrailLogFiles, which follows the listing across pages, and calls CloudTrail through CloudTrailRequests, which the CloudTrail tests that kept their own copy of that call now use too. Closes #9116 Co-authored-by: Jeremy Chapeau <jeremy.chapeau@gmail.com>