snapcraft export-login ignores expires parameter
Metadata
Current evaluation
Closed as stale. Maintainers clarified the short expiration is expected due to store-side macaroon refresh logic, not a snapcraft bug. No code changes were made.
Suggested action: —
No scores available.
Issue body
### Bug Description
If you run `snapcraft export-login` to produce a macaroon, the resulting token will expire in a few days regardless of the `expires` parameter.
### To Reproduce
run `snapcraft export-login --snaps $SNAPS --acls $ACLS --expires $DATE my.macaroon`
after ~2 days, use `pymacaroons` to deserialize this macarron and use the resulting credentials to access https://dashboard.snapcraft.io/dev/api/snap-track-update/
We get a `macaroon-needs-refresh` error code
### Environment
Ubuntu Lunar
snapcraft 7.4.3
### snapcraft.yaml
```shell
not used
```
### Relevant log output
```shell
none
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed as stale. Maintainers clarified the short expiration is expected due to store-side macaroon refresh logic, not a snapcraft bug. No code changes were made. | |
| qwen/qwen3.6-35b-a3b | — | — | Rejected as a question; maintainer clarified the expiration is expected store-side behavior for manually used macaroons. Closed as stale without code changes. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as stale. Maintainer clarified the expiration limit is expected store-side behavior for manually used macaroons, with refresh logic handled in craft-store. No fix applied. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as stale. Maintainers clarified the short expiration is expected due to store-side macaroon refresh logic, not a bug. No code changes were made. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as stale. Maintainers clarified the early expiration is expected store-side behavior for manually used macaroons, not a bug. No code changes were made. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1843404 snapcraft export-login doesn't provide meaningful error messages when an argument is wrong | snapcraft (launchpad) | open | snapcraft export-login returns a generic 'Authentication error: Failed to get macaroon' instead of a meaningful message when an argument (e.g. snap name) is wrong. Unlabelled, zero comments, no maintainer interaction for ~7 years. | |
| #1831 cli: add expiration option to export-login | snapcraft | merged | Merged. Adds --expires to snapcraft export-login, enforcing strict ISO 8601 datetime formats. Removes dateutil dependency, refactors store error handling to surface validation failures, and adds a manual expiration test. | |
| #1791879 snapcraft reports invalid credentials after successful login (new account) | snapcraft (launchpad) | closed | Closed without resolution. The snapcraft credential and root macaroon error remains unfixed. Issue appears abandoned due to zero comments and no follow-up. |