-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow tsh to connect to legacy clusters. #2784
Conversation
5bf56e8
to
76a8abd
Compare
76a8abd
to
4906d2c
Compare
// fails, fallback to legacy lemma package. | ||
func (rd *Redirector) open(ciphertext []byte) ([]byte, error) { | ||
plaintext, err := rd.key.Open(ciphertext) | ||
if err != nil { |
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.
does this do some integrity check to make sure it decodes random text, I'm pretty sure it does, but want to confirm
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.
Yes they do, AES-GCM and NaCl are both AEAD ciphers.
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.
Would be nice to have a test for the legacy stuff just in case. Also had a couple of questions
While moving from lemma (NaCl based) to the new internal secret package (AES-GCM based), Teleport was updated to allow older tsh clients to connect to newer proxies. Support to allow newer tsh clients to connect to older proxies was omitted. To allow newer tsh clients to connect to older proxies, Teleport attempts to decrypt the response payload using the new secret package, and if it fails, attempts to use the legacy lemma package. In addition, the secret key that tsh generates is encoded in the new as well as older format when submitting the client submits the request to Teleport.
4906d2c
to
c510329
Compare
Description
While moving from lemma (NaCl based) to the new internal secret package (AES-GCM based), Teleport was updated to allow older tsh clients to connect to newer proxies. Support to allow newer tsh clients to connect to older proxies was omitted.
To allow newer tsh clients to connect to older proxies, Teleport attempts to decrypt the response payload using the new secret package, and if it fails, attempts to use the legacy lemma package.
In addition, the secret key that tsh generates is encoded in the new as well as older format when submitting the client submits the request to Teleport.