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

Manage Headers for the Authentication forwarding. #2132

Merged
merged 3 commits into from
Sep 18, 2017

Conversation

ldez
Copy link
Contributor

@ldez ldez commented Sep 18, 2017

Description

  • copy request headers
  • add X-Forwarded-* headers

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@nmengin nmengin left a 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 != "" {
Copy link

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 ?

Copy link
Contributor Author

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"

Copy link
Member

@emilevauge emilevauge left a 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

@ldez ldez force-pushed the refactor/forward-auth-headers branch from 657d6ab to 72b6f3a Compare September 18, 2017 15:25
@traefiker traefiker merged commit cb05f36 into traefik:v1.4 Sep 18, 2017
@ldez ldez added the kind/enhancement a new or improved feature. label Sep 18, 2017
@ldez ldez deleted the refactor/forward-auth-headers branch September 18, 2017 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants