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

Fix ping endpoint when proxy has multiple public addrs #7368

Merged
merged 3 commits into from
Jun 23, 2021
Merged

Conversation

r0mant
Copy link
Collaborator

@r0mant r0mant commented Jun 21, 2021

Fixes a small regression introduced by app access in Teleport 5.0 where if the proxy has multiple public addresses configured, tsh login using any other than the first one would fail.

Suppose my proxy has the following config:

  public_addr:
  - root-1.gravitational.io:3080
  - root-2.gravitational.io:3080

Without this fix:

~ tsh login --proxy=root-2.gravitational.io:3080 --auth=okta
ERROR: invalid character '<' looking for beginning of value

With this fix:

~ tsh login --proxy=root-2.gravitational.io:3080 --auth=okta
If browser window does not open automatically, open it by clicking on the link:
 http://127.0.0.1:52067/13d60145-7a9e-45c7-9d98-6ac01efc2655
> Profile URL:        https://root.gravitational.io:3080
  Logged in as:       <user>
  Cluster:            root
  Roles:              admin
  Logins:             root, ubuntu
  Kubernetes:         disabled
  Valid until:        2021-06-22 02:47:08 +0300 MSK [valid for 12h0m0s]
  Extensions:         permit-agent-forwarding, permit-port-forwarding, permit-pty

@r0mant r0mant self-assigned this Jun 21, 2021
@r0mant r0mant marked this pull request as ready for review June 22, 2021 02:38
@r0mant r0mant requested review from smallinsky and xacrimon June 22, 2021 02:38
Copy link
Contributor

@smallinsky smallinsky left a comment

Choose a reason for hiding this comment

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

Code LGMT

lib/web/apiserver.go Show resolved Hide resolved
@r0mant r0mant force-pushed the roman/multiaddr branch from 8241acb to 15bbbfa Compare June 23, 2021 10:06
@r0mant r0mant enabled auto-merge (squash) June 23, 2021 13:29
Copy link
Contributor

@russjones russjones left a comment

Choose a reason for hiding this comment

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

Bot.

@r0mant r0mant merged commit 6c34385 into master Jun 23, 2021
@r0mant r0mant deleted the roman/multiaddr branch June 23, 2021 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants