Skip to content

StreamInfo: Preserving the source address on downstreamRemoteAddress #4996

@aunu53

Description

@aunu53

Description:
Our project's logging requirements call for the direct connected host, i.e. the actual physical address on the other side of the downstream connection. The logging interface includes only request headers, response headers/trailers, and StreamInfo. StreamInfo.downstreamRemoteAddress() contains this information at first, but it's potentially modified by x-forwarded-for or a proxy proto.

A couple of proposals:

  • Storing the downstream Network::Connection object in StreamInfo, which would be useful if anyone in the future needs information from the connection. Connection info could also be loggable via a change to the logging interface.
  • Making the downstreamRemoteAddress behaviour configurable, i.e. a flag that will prevent it from being overwritten by proxy or forwarded-for info
  • Adding another field to StreamInfo, e.g. downstreamDirectlyConnectedAddress

Thoughts? Opinions? Points of view?

Metadata

Metadata

Assignees

No one assigned

    Labels

    design proposalNeeds design doc/proposal before implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions