gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.68k stars 1.77k forks source link

[v16] improve error message when v16 tctl reads v17 tsh profile #49306

Closed nklaassen closed 4 days ago

nklaassen commented 5 days ago
# before
$ tctl status
ERROR: your credentials have expired, please login using `tsh login`

# after
$ go run ./tool/tctl status
ERROR: it appears tsh v17 or newer was used to log in, make sure to use tsh and tctl on the same major version
        no credentials: user TLS certificate was found at unsupported v17+ path (expected path: /Users/nic/.tsh/keys/one.private/nic-x509.pem, found path: /Users/nic/.tsh/keys/one.private/nic.crt)

exit status 1

This is almost a backport of https://github.com/gravitational/teleport/pull/49305 but it inverts the comparison so that v16 tctl (versions after this merges) has a better error message when trying to read a profile created by tsh v17

aws-amplify-us-west-2[bot] commented 5 days ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-49306.d212ksyjt6y4yg.amplifyapp.com