Add a method of listing the keys on a store

Bug #1814066 reported by James Jesudason
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snap Store Server
Invalid
Undecided
Unassigned
Snapcraft
Triaged
Wishlist
Unassigned

Bug Description

`snapcraft list-keys` shows the keys in the local keyring and whether they are registered for an account. However, some customers have asked for the ability to list all the registered keys. Perhaps having a `--remote` option that will show the information from the snap store.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

We can do this on snapcraft's side as long as we have storeapi. I added a task for that team to either provide the documentation or implementation.

Changed in snapcraft:
status: New → Triaged
importance: Undecided → Wishlist
William Grant (wgrant)
tags: added: account-key
William Grant (wgrant)
tags: added: feature
Revision history for this message
Celso Providelo (cprov) wrote :

Sergio,

The current API [1] already lists all the "remote" keys:

{{{
$ surl -a prod https://dashboard.snapcraft.io/dev/api/account | jq '.["account-keys"]'
[
  {
    "name": "serial",
    "since": "2019-02-01T05:01:32Z",
    "public-key-sha3-384": "6FUqPhWVUn0ocOrnO5Ip0HbNOI35sSZyAQ-ojExEXBR7_d0PKGnWR8xDIVHncJcX"
  },
  {
    "name": "new-default",
    "since": "2019-05-23T02:25:22Z",
    "public-key-sha3-384": "6Tm_gBSMHoZNaJ2qOGtOrWeNEkaNQcx5_tH67Utr5_qTMM5rQ3RW2IDWC01aW5g1"
  },
  {
    "name": "default",
    "since": "2016-09-12T08:43:28-03:00",
    "public-key-sha3-384": "K80uHIsxgUZU_2t4Kgs2Iv9CeyINK9V8N71U4didCxmt2NHmE7udzzmP389OBmAK"
  }
]
}}}

Changed in snapstore:
status: New → Invalid
Revision history for this message
Tony Espy (awe) wrote :

@Sergio

I just discovered that if you're logged in and use `list-keys` on a system where no keys have been created, the user sees the message:

"No keys have been created on this system. See 'snapcraft create-key --help' to create a key.
The following SHA3-384 key fingerprints have been registered but are not available on this system:"

..and then shows the SHA3-384 fingerprints of keys that have been registered to the account.

So it seems the code's already there to do it, however it needs something to trigger it when local keys exist in the snap keyring (e.g. --remote or something close).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.