oxidecomputer / oxidecomputer/oxide.rs
oxide auth allows auth to the same silo multiple times
Nobody has claimed this yet.
- 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
Once a user is auth'd to a silo, if they accidentally try to auth to that same silo again, perhaps we should check to make sure they aren't already authenticated to that silo, and let the user know if they are?
What is the current behaviour and what actions did you take to get there
Users can auth to the same silo multiple times. I learned this due to the desire to auth to a new silo, but copy/pasted the wrong host URL, resulting in a duplicate auth to a silo I was already authenticated to. Out of curiosity, I did it again, and again, and each time it worked, generating a new profile.
izzyfee@Elizabeths-MBP ~/.config/oxide$ cat credentials.toml
[profile.oxide]
host = "https://blah.sys.blah2.differentblah.com"
token = "oxide-token-xxxx0"
user = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
[profile.oxide2]
host = "https://blah.sys.blah3.blahblah.com" <----------------
token = "oxide-token-xxxx1"
user = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
[profile.oxide3]
host = "https://blah.sys.blah3.blahblah.com" <----------------
token = "oxide-token-xxxx2"
user = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
[profile.oxide4]
host = "https://blah.sys.blah3.blahblah.com" <----------------
token = "oxide-token-xxxx3"
user = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Maybe this is expected behavior?
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the CLI auth command and how it generates credential profiles, then reproduce authentication to the same host repeatedly. Done means the CLI recognizes an existing authentication for that silo and avoids creating another duplicate profile, with user-facing behavior that reflects the chosen expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- authentication, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100