Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing error message on expired macaroon #97

Open
sergiusens opened this issue Aug 16, 2023 · 3 comments
Open

Confusing error message on expired macaroon #97

sergiusens opened this issue Aug 16, 2023 · 3 comments
Labels
Bug Something isn't working triaged

Comments

@sergiusens
Copy link
Collaborator

Bug Description

After a macaroon expires, you start seeing error messages like

image

To Reproduce

Login, wait for macaroon to expire, upload.

part yaml

No response

Relevant log output

- macaroon-permission-required: Package-restricted permission does not include snap-id .....
@sergiusens
Copy link
Collaborator Author

We can do a client side check for the expiration date to provide a potentially better error message

cat exported.creds |  base64 -d | jq '.v' -r | base64 -d

@AliyevH
Copy link
Contributor

AliyevH commented Aug 22, 2023

@sergiusens
I tried to simulate this error in mac os.

Time i choosed is 2 mins to expire login.
If i understand correctly macaroon is login expire time.

snapcraft export-login --expires "2023-08-22T14:38:00Z" exported.creds
export SNAPCRAFT_STORE_CREDENTIALS=$(cat exported.creds)

Here is error i got.

craft-store error: Store operation failed:

  • macaroon-authorization-required: The request is missing an Authorization header field containing a valid macaroon

@lengau lengau added Bug Something isn't working triaged labels Sep 12, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3385.

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

3 participants