-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Change 'proxy_protocol' default mode and behavior #31622
Conversation
613f15f
to
d1138ad
Compare
Now by default `proxy_protocol` is unspecified and in that mode we don't allow IP pinned connections and mark incoming conection with setting source port = 0. 'on' mode now requires PROXY header.
d1138ad
to
56cb383
Compare
ca31d22
to
2378999
Compare
There cases when Telelport will call itself and it can go directly, avoiding load balancer, so connection will not have unsigned PROXY header.
2378999
to
6ac57d8
Compare
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
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 once remaining comments are addressed
lib/authz/permissions.go
Outdated
@@ -336,6 +336,10 @@ var ErrIPPinningMissing = trace.AccessDenied("pinned IP is required for the user | |||
// ErrIPPinningMismatch is returned when user's pinned IP doesn't match observed IP. | |||
var ErrIPPinningMismatch = trace.AccessDenied("pinned IP doesn't match observed client IP") | |||
|
|||
// ErrIPPinningNotAllowed is returned when user's pinned IP doesn't match observed IP. | |||
var ErrIPPinningNotAllowed = trace.AccessDenied("IP pinning is not allowed for connections behind L4 load balancers with " + | |||
"PROXY protocol enabled without explicitly setting 'proxy_protocol: on' in the proxy_service or auth_service config.") |
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.
Should it be proxy_service and auth_service config
?
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.
Depends on the client setup, if there's another LB between Proxy and Auth then it can be both, although usually I think it will be only one. I'll make it and/or
.
Now by default
proxy_protocol
is working in 'unspecified' mode and in that mode we mark incoming connection with setting source port = 0 and don't allow IP pinned connections (based on port = 0).Also
on
mode now requires PROXY header.Implements RFD146 https://github.com/gravitational/teleport-private/pull/991