Commit Graph
20 Commits
Author SHA1 Message Date
Nic Klaassen 75c2cef688 improve error message when v17 tctl reads v16 tsh profile (#49305) 2024-11-21 21:52:05 +00:00
Nic KlaassenandBernard Kim eff0a707d7 split SSH and TLS keys in tsh login (#45995)
* key split wip

* fix piv tests

* fix terraform tests

* spelling fixes

* fix kube benchmark

* fix identity files in integrations tests

* self review

* fix typo in comment

Co-authored-by: Bernard Kim <bernard@goteleport.com>

* speed up device login tests

* use EC keys in TestProxyAppWithIdentity

* faster tsh tests

* fix race on error value

* fix lint

* write out EC SSH keys in OpenSSH format

* fix lint

* fix keyring comparisons

* PrecomputeTestKeys in lib/client

* parallelize TestNoRelogin subtests

* use ecdsa for self-signed TLS certs

* remove redundant GetTrustedCerts

* improve latency of precomputeTestKeys

Instead of waiting for all 25 test keys before returning a single one,
tests can now make use of the first precomputed test key as soon as it's
ready.
In local testing with this change, the first key is ready after ~75ms vs
>350ms on master.

* fix test and lint

---------

Co-authored-by: Bernard Kim <bernard@goteleport.com>
2024-09-12 19:36:32 +00:00
Nic Klaassen 6eb6b981b3 Split user keys for k8s access (#44779)
* split user keys for k8s access

* remove unnecessary loop

* prevent race when reading/writing key/cert pairs

* reuse RSA keys

* single file for kube key and cert

* update comment with file layout
2024-08-13 17:41:33 +00:00
Nic Klaassen 7906e13952 split user keys for db access (#44718) 2024-08-08 01:10:41 +00:00
Nic Klaassen cbb19fece2 Split user keys for app access (#44609)
* rfd edits

* split keys for app access

* update paths visualization

* godocs

* speed up TestAppCommands

* fix possible panic in test

* fix piv test
2024-08-06 22:40:57 +00:00
Anton Miniailo 8464dc2850 Add kube credentials lockfile to prevent possibility of excessive login attempts (#26102) 2023-06-05 12:56:43 +00:00
Anton Miniailo 2cfa9b5ab2 Add kube local proxy bound MFA sessions (#24527) 2023-05-05 04:55:56 +00:00
Anton Miniailo 11aba2a847 Fixed explanation of key paths layout. DB and App was mixed up. (#24548) 2023-04-13 20:17:53 +00:00
Marek Smoliński 0f3c14e0f9 Add Support for Oracle protocol (#23227) 2023-03-31 17:35:21 +00:00
STeve (Xin) Huang d03950c6a7 Implement tsh proxy kube (#23207)
* Implement `tsh proxy kube`

* add --exec and test

* use proxy-url

* minor cleanup

* Fix not reusing previously saved kube cert.

* Add UT

* fix lint

* use real kube client for tsh test

* add integration test

* review comments

* fix function name

* make a kube test pack to setup once
2023-03-30 15:09:15 +00:00
Brian Joerger 488af75797 Client store generalization (#19420)
- Add a generalized client store made up of a key, profile, and trusted certs store. Each sub store can support different backends (~/.tsh, identity_file, in-memory). 
- Replace custom identity file handling with in-memory client store.
- Fix issues with trusted certs handling.
2023-01-06 01:34:04 +00:00
Brian Joerger c3a41a41fc Address deprecation TODOs (#18992) 2022-12-19 19:08:45 +00:00
Brian Joerger 3a5a285883 Generalize private keys in tsh (PIV integration) (#15334)
Primary Changes:
 - Remove reliance on Private Key PEM:
 - Update native and keygen packages to return PrivateKey instead of PEM key
 - Add new PrivateKey interface which implements crypto.Signer
 - Replace PEM encoded private key usage where possible
 - Replace calls to tls.(Load)X509KeyPair with keys.(Load)X509KeyPair in
client packages

Minor Changes:
 - Remove unused agent.AddedKey return from LoadKey
 - Simplify sshutils and removed unused code paths
 - Add ecdsa and ed25519 key support
2022-08-25 23:26:44 +00:00
Gus Luxton 51b3bc3dda tsh: Also create a PuTTY PPK-formatted keypair on login (#12733)
PuTTY uses its own keypair format which has the extension .ppk on Windows, hence PPK.
The specification for the file format is here: https://the.earth.li/\~sgtatham/putty/0.76/htmldoc/AppendixC.html\#ppk
2022-07-11 23:31:06 +00:00
STeve (Xin) Huang 7a23fe80f9 Implement "tsh proxy aws" (#10025) 2022-06-03 19:14:34 +00:00
Marek Smoliński dc09f6f2c2 Add support for backward compatible API Client behavior (#11567) 2022-04-01 14:38:28 +02:00
Marek Smoliński fbd5a2aafd Fix tsh tctl do not load all CAS (#9357) 2022-01-31 13:35:15 +01:00
Brian Joerger 2d7bfe311c Add support for a profile specific kubeconfig file. (#7840) 2021-08-24 10:28:26 -07:00
Brian Joerger a6ed4d3d22 Update profile credential loader to work with tsh v6.0. (#7142) 2021-06-07 18:01:12 -07:00
Brian Joerger 5fbffaab80 keypaths package (#6848) 2021-05-27 10:31:05 -07:00