snapcraft create-key doesn't require login, but snapcraft list-keys does
Metadata
Current evaluation
The authentication inconsistency remains in the renamed keys command: create-key works while logged out, but keys requires Store credentials before showing local keys.
Suggested action: keep open
Reason: The report provides an exact logout, create-key, and list-keys sequence with concrete errors. In current code, StoreKeysCommand calls get_account_info() before displaying local keys, while StoreCreateKeyCommand explicitly handles HTTP 401 and continues, so the underlying UX problem persists under the renamed keys command; list-keys is now only a removed alias.
Evaluated by: mr-cal-bot
Impact:
32
Quick Win:
20
Complexity:
25
Confidence:
94
Actionability:
84
Issue body
You can call snapcraft create-key without having logged in.
The problem is that then you can see the key you have just created without logging in.
This is a weird situation. And it might make people suspicious, because why do you need the network to query for a local key.
To reproduce:
$ snapcraft logout
$ snapcraft create-key
$ snapcraft list-keys
No valid credentials found. Have you run "snapcraft login"?
Invalid credentials: Root macaroon not in the config file.
I think that the login is requested to check if the local keys have been registered in the server. If that is the case, maybe we can print that it's required to login to check the registered keys in the server.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
32
Quick Win:
20
Complexity:
25
Confidence:
94
Actionability:
84
|
keep open | The authentication inconsistency remains in the renamed keys command: create-key works while logged out, but keys requires Store credentials before showing local keys. | |
| qwen/qwen3.6-35b-a3b |
Impact:
10
Quick Win:
7
Complexity:
10
Confidence:
85
Actionability:
80
|
close resolved | The list-keys command has been removed and replaced by the keys command. The original issue about login requirements for list-keys is obsolete. | |
| qwen/qwen3.8-27b |
Impact:
15
Quick Win:
11
Staleness:
92
Complexity:
25
Confidence:
78
Support Request:
5
|
close stale | CLI inconsistency: create-key works without login but list-keys fails with credential errors. Issue is 9.8 years old with zero comments. The list-keys command has since been removed and replaced by the keys command, which still requires login. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
100
Complexity:
15
Confidence:
90
Support Request:
10
|
close stale | CLI inconsistency where creating a key works without login but listing keys fails with credential errors. Issue is over 9 years old with no maintainer interaction. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
15
Confidence:
90
Support Request:
10
|
close stale | Inconsistency where snapcraft create-key works without authentication, but list-keys fails with a login error. Issue is nearly 10 years old with no maintainer response or updates. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
15
Confidence:
90
Support Request:
10
|
close stale | Inconsistency where snapcraft create-key works without authentication, but list-keys fails with credential errors. Unaddressed for nearly 10 years. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
snapcraft#6144
(confidence 95%)
Commit 30c9fcd19 migrated the list-keys behavior to keys, where the account lookup before local-key output remains.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1720207 snapcraft list-keys returns no keys, but the user has keys | snapcraft (launchpad) | open | Observed behavior is resolved: keys now displays registered remote-only key fingerprints separately from local keys; legacy list-keys was renamed and removed in Snapcraft 9. |