-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Manage Headers for the Authentication forwarding. #2132
Conversation
11dc1f1
to
926fed5
Compare
926fed5
to
08ffc09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
auth/forward.go
Outdated
forwardReq.Header.Set(forward.XForwardedPort, xfp) | ||
} | ||
|
||
if xfh := req.Header.Get(forward.XForwardedHost); xfh != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a client access to admin.domain.local
and send the header X-FORWARDED-HOST user.domain.local
he can by-pass the auth, no ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I added a new option "trustForwardHeader"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @ldez !
LGTM
657d6ab
to
72b6f3a
Compare
Description
X-Forwarded-*
headers