Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding x-forwarded-for to access logs #2420

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

neoreddog
Copy link

Problem:

Access logs don't show the origin IP of requests which impacts observability of network events.

As partly described in Issue #9842.

Solution:

Added in the field

  • x_forwarded_for

This field uses the get_header method with a HeaderName::from_static

Validation:

Building and deploying the customised linkerd proxy with access logs enabled alongside a nginx container.

Sending network requests and validating that all pre-existing fields persist and the new one functions as intended.

Fixes:

Part fixes #9842

I agree to the DCO for all the commits in this PR.

@neoreddog neoreddog requested a review from a team as a code owner June 5, 2023 10:56
Linkerd access logs are missing the origin IP address.

Solved by adding in the field x_forwarded_for to access logs which has the origin ip address.

Validated by compiling and deploying the modified proxy image alongside a nginx container, checking access log content for existing fields + the new field

Part fixes issue #9842

Signed-off-by: Dan Ambrose <[email protected]>
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.

Enhances for http access log
1 participant