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

fix: clean up tls cert error display in cli #1032

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Conversation

BruceMacD
Copy link
Collaborator

Summary

When there was an error in TLS certificate validation we output the error, which looks confusing to the user with the trace:

  Logging in to 137.184.245.223
Could not verify certificate for host "137.184.245.223": Get "https://137.184.245.223": x509: “Infra” certificate is not trusted
? Are you sure you want to continue? Yes
? Select a login method: Okta (tmlw.okta.com)
  Logging in with Okta...

Output a human friendly one-liner instead:

$ infra login localhost
  Logging in to localhost
? “Infra” certificate is not trusted, are you sure you want to continue? Yes
? Select a login method:  [Use arrows to move, type to filter]
> okta (dev.okta.com)
  Login with Access Key

Checklist

  • Wrote appropriate unit tests
  • Considered security implications of the change
  • Updated associated docs where necessary
  • Updated associated configuration where necessary
  • Change is backwards compatible if it needs to be (user can upgrade without manual steps?)
  • Nothing sensitive logged
  • Commit message conforms to Conventional Commit

Related Issues

Resolves # 936

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants