oxidecomputer / oxidecomputer/oxide.rs

Using `oxide auth logout` (without specifying the profile) should confirm default profile and/or check if that default still even exists

Open
#796 1 comment 0 reactions 1 assignee View on GitHub

@ahl is already working on this.

Since Aug 28, 2024.

Dominant language
Rust
Stars
75
Forks
21
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Component
  • CLI
  • SDK
  • Something else
  • Not sure
What was the expected behaviour

If you have multiple profiles and run oxide auth logout without specifying the profile (i.e. oxide --profile oxide auth logout), the confirmation prompt should confirm your default profile and/or ask you which profile you want to remove, with a list of your existing profiles that are authenticated.

Additionally, if the default profile no longer exists, oxide auth logout should know about that. For example:

With only the one profile:

$ oxide auth status                                                                                                                                          
Profile "oxide2" (https://oxide.sys.blah3.blah-preview.com) status: Authenticated

If I run the command without the --profile flag, it still tells me that its removed the auth for a profile that no longer exists:

$ oxide auth logout
Confirm authentication information deletion: yes
Removed authentication information for profile "oxide"
What is the current behaviour and what actions did you take to get there

With four profiles set (note that three are to the same silo - also filed as a possible bug):

$ oxide auth status 
Profile "oxide" (https://oxide.sys.blah2.blahblah.com) status: Authenticated
Profile "oxide2" (https://oxide.sys.blah3.blah-preview.com) status: Authenticated
Profile "oxide3" (https://oxide.sys.blah3.blah-preview.com) status: Authenticated
Profile "oxide4" (https://oxide.sys.blah3.blah-preview.com) status: Authenticated

If I forget to include the profile and just run oxide auth logout, I get the following:

$ oxide auth logout 
Confirm authentication information deletion: [y/n]

Confirming Yes removes the default profile as expected; but one might forget which profile is their default.

CLI or SDK version

0.6.2+20240710.0

Operating system

Sonoma 14.3

Anything else you would like to add?

No response

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.