You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users sometimes want this for audit logging. Internally in Elastic Cloud we rely on our proxy logs to obtain this information. Investigate if we can log this information directly from Fleet Server in Elastic Cloud, and outside of it.
Golang's http.Request allows us to get the source IP of the incoming request, but this is not necessarily the public or edge facing IP of the machine the agent is running on if the presence of proxies or load balancers
// RemoteAddr allows HTTP servers and other software to record// the network address that sent the request, usually for// logging. This field is not filled in by ReadRequest and// has no defined format. The HTTP server in this package// sets RemoteAddr to an "IP:port" address before invoking a// handler.// This field is ignored by the HTTP client.RemoteAddr [string](https://pkg.go.dev/builtin#string)
To get the source IP of the agent machine we could look at the X-Forwarded-For or a similar header, but it is only safe for us to use headers like this in Elastic Cloud where Elastic is in control of the proxy and the values set in this or other relevant headers. Headers can be set by any client in the request chain, regardless of if that client is trusted or malicious.
The text was updated successfully, but these errors were encountered:
Users sometimes want this for audit logging. Internally in Elastic Cloud we rely on our proxy logs to obtain this information. Investigate if we can log this information directly from Fleet Server in Elastic Cloud, and outside of it.
Golang's http.Request allows us to get the source IP of the incoming request, but this is not necessarily the public or edge facing IP of the machine the agent is running on if the presence of proxies or load balancers
To get the source IP of the agent machine we could look at the
X-Forwarded-For
or a similar header, but it is only safe for us to use headers like this in Elastic Cloud where Elastic is in control of the proxy and the values set in this or other relevant headers. Headers can be set by any client in the request chain, regardless of if that client is trusted or malicious.The text was updated successfully, but these errors were encountered: