export-login --acls are not documented

Bug #1858020 reported by Anatoli Babenia
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Chris Patterson

Bug Description

`snapcraft export-login -h` does not provide information about possible values of --acls key.

I am using this command to generate token for Travis.

    snapcraft export-login --snaps=yakshaveinc --acls=package_push,package_upload --channels stable

And I can't remember what's the difference between `package_push` and `package_upload`?

Revision history for this message
Chris Patterson (cjp256) wrote :

You should be able to find the information you need here:
https://dashboard.snapcraft.io/docs/api/macaroon.html

Though we should probably incorporate that into the help menu, or snapcraft docs?

Chris Patterson (cjp256)
Changed in snapcraft:
assignee: nobody → Chris Patterson (cjp256)
Revision history for this message
Anatoli Babenia (abitrolly) wrote :

`package_upload` appears to be too excessive for my CI job. `package_push` looks too restricted - does it mean that pushed package will not appear in any channels at all if I didn't allow `package_release`?

If I upload snap with new description field in snapcraft.yaml with `package_push`, but without `package_update` - will the description update in snapstore / snap info?

Revision history for this message
Chris Patterson (cjp256) wrote :

Sorry, I missed the last post.

I agree with your sentiment, package_upload is perhaps too much for CI.

If simply pushing to the store, package_push is sufficient if the idea is to manually promote a revision to a channel at a later date. If you want to release to a channel (e.g. edge), then package_release is required and ideally be restricted to a channel.

For my CI tokens, I do something like:
```
snapcraft export-login --snaps=<snap-name> --channels=edge --acls=package_push,package_release -
```

`package_access` may also be useful in some cases as well.

Although it would not have been my guess, releasing a snap appears to update the snap's metadata automatically, even if the credentials does not include `package_update`.

Revision history for this message
Gold Star (goldstar611) wrote :
Revision history for this message
Anatoli Babenia (abitrolly) wrote :

https://snapcraft.io/docs/snapcraft-authentication is a new link, but there is still no docs on ACLs neither in cmdline, nor in the web page.

Revision history for this message
Gold Star (goldstar611) wrote :

Best details so far are at https://dashboard.snapcraft.io/docs/reference/v1/macaroon.html#request-a-macaroon but you have to already know what to look for in order to find that page

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.