uselagoon / uselagoon/lagoon-cli

Token is not properly invalidated when using a custom SSH key.

Open
#347 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
28
Forks
14
Avg merge
1d 2h
Merged PRs (30d)
1

Description

Describe the bug
The Lagoon CLI continues to authenticate using the already cached token even when a custom SSH key is specified using the --ssh-key flag.

To Reproduce
Steps to reproduce the behavior:

  1. Run any command that interacts with the Lagoon API so that a token is retrieved and cached.
  2. Confirm the current user using whoami.
  3. Run whoami again, but with the --ssh-key flag pointing to a private key associated with a different Lagoon account.

Expected behavior
The details of the account associated with the SSH key passed in is returned. Instead, the cached token is used to authenticate, returning incorrect account details.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CLI path for whoami and the --ssh-key option, then trace how cached tokens are selected. Reproduce the two whoami invocations described in the issue; done means the second command authenticates as the account tied to the supplied SSH key instead of reusing the cached token.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.