WIP: improve sshcert authentication #507

Draft
noerw wants to merge 21 commits from noerw/tea:sshcert-noerw into main
Member
No description provided.
noerw added this to the v0.10.0 milestone 2022-09-14 22:23:51 +00:00
noerw added the
kind
enhancement
kind
refactor
labels 2022-09-14 22:23:51 +00:00
noerw added 18 commits 2022-09-14 22:23:52 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
1502f26af5
Add support for API authentication via ssh certificates/pubkey
Some checks failed
continuous-integration/drone/pr Build is failing
62a335557e
Add support for keys outside of ssh-agent and simplify interact menu
Some checks failed
continuous-integration/drone/pr Build is failing
1318ff4e2f
Fix linting issue
All checks were successful
continuous-integration/drone/pr Build is passing
7e2edacb4a
Fix typo
All checks were successful
continuous-integration/drone/pr Build is passing
d6d76ad4cd
Fix ssh-agent-principal and ssh-agent-key login params
All checks were successful
continuous-integration/drone/pr Build is passing
16a8dec23d
Fix ssh certificate from disk
All checks were successful
continuous-integration/drone/pr Build is passing
0744ebc93f
Make sshKey option work with certificates
All checks were successful
continuous-integration/drone/pr Build is passing
393671f779
Add support for encrypted ssh keys
People really should use ssh-agent but in the case they don't ask for
the passphrase. We do not save the passphrase, so for every action tea
will ask their passphrase.
All checks were successful
continuous-integration/drone/pr Build is passing
02e77d463f
Use upstream go-sdk
Some checks failed
continuous-integration/drone/pr Build is failing
4292e79cbd
Merge branch 'master' into sshcert
013419bec8 refactor: create subpackage modules/interact/prompts
as a preparation for another refactor to avoid an import cycle
82f392ebec rework login.Client() http-signing logic
- add more checks
- avoid importing survey in modules/config (importing modules/interact
  in modules/config is still not great, but I don't see how this could
  be solved without making the Client() api very awkward).
130ec852c6 rework interactive `tea login add` prompts:
- don't make the login method selection a two-prompt process
  (provide all 3 options first)
- don't ask about the SSHKey path again, when using the new auth method

NOTE: the SSHKey path prompt could be removed completely, as users that
have want to use a custom key, would probably use LoginMethodSsh.
However that method does not work with ecdsa-sha2-nistp521 and other key
types - users with that sort of key still may need this option.
Some checks failed
continuous-integration/drone/pr Build is failing
01ee577d1d
Merge branch 'main' into sshcert-noerw
6543 added 1 commit 2022-09-14 23:43:18 +00:00
Some checks failed
continuous-integration/drone/pr Build is failing
a08044da40
Merge branch 'master' into sshcert-noerw
6543 reviewed 2022-09-14 23:50:01 +00:00
@ -0,0 +129,4 @@
}
// Select creates a generic select prompt, with processing of custom values or none-option.
func Select(prompt string, options []string, customVal, noneVal string) (string, error) {
Owner

can options have len = 0 ?

if so we could get a out of slice access issue at L138

can options have len = 0 ? if so we could get a out of slice access issue at L138
Owner

yes if it's 0 then the Select is wrong used anyway ...

yes if it's 0 then the Select is wrong used anyway ...
6543 marked this conversation as resolved
6543 added 2 commits 2022-09-14 23:59:44 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
a154f39dde
fix lint
Owner

@noerw ok now I'll wait until u make it non wip ;)

@noerw ok now I'll wait until u make it non wip ;)
6543 approved these changes 2022-09-26 20:34:11 +00:00
Some checks are pending
continuous-integration/drone/pr Build is passing
check-and-test / check-and-test (pull_request)
Required
This pull request has changes conflicting with the target branch.
  • modules/interact/login.go
  • modules/interact/prompts.go

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u sshcert-noerw:noerw-sshcert-noerw
git checkout noerw-sshcert-noerw
Sign in to join this conversation.
No description provided.