-
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
Always use auth_servers
when proxying an auth connection
#13310
Conversation
ab272c5
to
631e253
Compare
631e253
to
7625562
Compare
auth_servers
when proxying an auth connection
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.
This isn't a part of Teleport that I usually inhabit, so something might escape me, but I like that the change is both simpler and makes a clearly random choice.
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.
I'm not very familiar with this part of code base, but just one thing came to my mind.
In the previous version we were checking authorization servers for connection one by one. Now, we are picking up one server randomly and if it fails then we throws and error. There's no fallback or checking the other servers from the list. Isn't it going to affect the availability?
See #13310 (comment), the tl;dr is that it should be quite rare and only for |
I specialcased length 1 in the utility function specifically because in almost every configuration (and in all supported ones) there will only be a single address in For a DNS load balancer setup, |
Thanks for the explanation! Makes sense now. I must have written my comment when you were writing yours as I didn't notice it before sending my feedback 😄 |
Co-authored-by: Alan Parra <alan.parra@goteleport.com> Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Holding off on the v7 backport. |
* Don't GetAuthServers in transport.start * Don't GetAuthServers in AuthProxyDialerService * Don't GetAuthServers in localSite * Fix lib/web tests * Review comments Co-authored-by: Alan Parra <alan.parra@goteleport.com> Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
* Don't GetAuthServers in transport.start * Don't GetAuthServers in AuthProxyDialerService * Don't GetAuthServers in localSite * Fix lib/web tests * Review comments Co-authored-by: Alan Parra <alan.parra@goteleport.com> Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
As a followup to #12862, this PR makes it so that every instance of dialing an auth through a proxy (not just the reverse tunnel's
@remote-auth-server
) will select one random entry from the proxy's ownauth_servers
configuration rather than checking the auth server heartbeats in the backend. This is preferrable as the backend info could be out of date (10 minutes for expiration plus backend expiration and cache propagation delays), and doesn't allow for any flexibility in choosing a specific load balancer or running health checks.note: backporting this requires backporting #12862 at the same time.