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

Add e2e tests for Hardware Key support #38994

Merged
merged 10 commits into from
Mar 7, 2024

Conversation

Joerger
Copy link
Contributor

@Joerger Joerger commented Mar 5, 2024

Changes:

  • Add mock implementation of YubikeyPrivateKey
  • Add e2e test for hardware key support login using the mock implementation.
  • Remove parts of the Hardware key support test plan that are now covered by this test.

un-planned follow ups:

  • Add additional tests:
    • basic tctl and Teleport Connect tests
    • tsh ssh tests
    • tsh proxy db/kube/ssh tests

@Joerger Joerger added backport/branch/v13 backport/branch/v14 no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 labels Mar 5, 2024
@Joerger Joerger force-pushed the joerger/hardware-key-support-e2e-tests branch from d8f2c3f to 56a7d77 Compare March 5, 2024 23:19
@Joerger Joerger marked this pull request as ready for review March 5, 2024 23:20
@Joerger Joerger requested a review from codingllama March 5, 2024 23:21
@github-actions github-actions bot added size/md tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Mar 5, 2024
@github-actions github-actions bot requested review from camscale and smallinsky March 5, 2024 23:21
api/utils/keys/privatekey.go Show resolved Hide resolved
api/utils/keys/yubikey_fake.go Outdated Show resolved Hide resolved
tool/tsh/common/tsh_test.go Outdated Show resolved Hide resolved
tool/tsh/common/tsh_test.go Show resolved Hide resolved
tool/tsh/common/tsh_test.go Outdated Show resolved Hide resolved
tool/tsh/common/hardware_key_test.go Show resolved Hide resolved
tool/tsh/common/hardware_key_test.go Outdated Show resolved Hide resolved
tool/tsh/common/hardware_key_test.go Outdated Show resolved Hide resolved
tool/tsh/common/hardware_key_test.go Show resolved Hide resolved
tool/tsh/common/hardware_key_test.go Outdated Show resolved Hide resolved
@Joerger Joerger requested a review from codingllama March 6, 2024 20:50
@codingllama
Copy link
Contributor

Looks like you've got some test failures too.

@Joerger Joerger requested a review from codingllama March 7, 2024 03:19
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from camscale March 7, 2024 13:55
@Joerger
Copy link
Contributor Author

Joerger commented Mar 7, 2024

@zmb3 @r0mant May I have an /excludeflake *?

@zmb3
Copy link
Collaborator

zmb3 commented Mar 7, 2024

/excludeflake TestHardwareKeyLogin

@zmb3
Copy link
Collaborator

zmb3 commented Mar 7, 2024

/excludeflake *

@Joerger Joerger enabled auto-merge March 7, 2024 21:19
@Joerger Joerger added this pull request to the merge queue Mar 7, 2024
Merged via the queue into master with commit 5577bda Mar 7, 2024
41 checks passed
@Joerger Joerger deleted the joerger/hardware-key-support-e2e-tests branch March 7, 2024 21:54
@public-teleport-github-review-bot

@Joerger See the table below for backport results.

Branch Result
branch/v13 Failed
branch/v14 Create PR
branch/v15 Create PR

Joerger added a commit that referenced this pull request Apr 25, 2024
* Add fake yubikey private key implementation for tests.

* Add TestHardwareKeyLogin.

* Simplify Hardware Key support test plan.

* Enable piv test package in tests.

* Add TestMarshalAndParsePrivateKey.

* Address simple comments.

* Remove *testing.T from mockSSOLogin in; Add and use better helper methods for mocking sso login.

* Refactor test to dynamically set mock attestation data; revert related changes.
Joerger added a commit that referenced this pull request Apr 25, 2024
* Add fake yubikey private key implementation for tests.

* Add TestHardwareKeyLogin.

* Simplify Hardware Key support test plan.

* Enable piv test package in tests.

* Add TestMarshalAndParsePrivateKey.

* Address simple comments.

* Remove *testing.T from mockSSOLogin in; Add and use better helper methods for mocking sso login.

* Refactor test to dynamically set mock attestation data; revert related changes.
github-merge-queue bot pushed a commit that referenced this pull request Apr 26, 2024
* Add e2e tests for Hardware Key support (#38994)

* Add fake yubikey private key implementation for tests.

* Add TestHardwareKeyLogin.

* Simplify Hardware Key support test plan.

* Enable piv test package in tests.

* Add TestMarshalAndParsePrivateKey.

* Address simple comments.

* Remove *testing.T from mockSSOLogin in; Add and use better helper methods for mocking sso login.

* Refactor test to dynamically set mock attestation data; revert related changes.

* Support agentless connections with hardware key support (#39267)
github-merge-queue bot pushed a commit that referenced this pull request Apr 26, 2024
* Add e2e tests for Hardware Key support (#38994)

* Add fake yubikey private key implementation for tests.

* Add TestHardwareKeyLogin.

* Simplify Hardware Key support test plan.

* Enable piv test package in tests.

* Add TestMarshalAndParsePrivateKey.

* Address simple comments.

* Remove *testing.T from mockSSOLogin in; Add and use better helper methods for mocking sso login.

* Refactor test to dynamically set mock attestation data; revert related changes.

* Support agentless connections with hardware key support (#39267)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v13 backport/branch/v14 backport/branch/v15 no-changelog Indicates that a PR does not require a changelog entry size/md tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants