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

feature: Add client ip to inbound request information #1678

Merged
merged 11 commits into from
Dec 10, 2021

Conversation

jimlambrt
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@louisruch louisruch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to run make fmt also I have one question on logic to get client IP, haven't used the headers too much in the past so going on names to what I think is a potentially better ordering.

internal/servers/common/client_ip.go Outdated Show resolved Hide resolved
internal/servers/controller/listeners.go Outdated Show resolved Hide resolved
louisruch
louisruch previously approved these changes Nov 16, 2021
Copy link
Collaborator

@louisruch louisruch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The jimlambrt-forwarded-for branch contains some required features
required by this work.  Once PR #17 in that repo is merged, then
we can just pull the latest from main
listenerutil.TrustedFromXForwardedFor provides a capability to use
XForwardedFor* listener config settings to determine how/if
X-Forwarded-For are trusted/allowed for an inbound request
Updated go-secure-stdlib/listenerutil.TrustedFromXForwardedFor which
changed how headers are trusted when determining the client ip.

We also deferred any support for the real ip header to future work.
louisruch
louisruch previously approved these changes Dec 1, 2021
Copy link
Collaborator

@louisruch louisruch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment around the changelog entry

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
jefferai
jefferai previously approved these changes Dec 2, 2021
louisruch
louisruch previously approved these changes Dec 3, 2021
jefferai
jefferai previously approved these changes Dec 9, 2021
Need to update TestConnection(...) additions to use the new signature
and update the CHANGELOG entry.
@jimlambrt jimlambrt merged commit baa1d88 into main Dec 10, 2021
@jimlambrt jimlambrt deleted the jimlambrt-audit-client-ip branch December 10, 2021 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants