← Back to issue list

Exported login does not support allowing bundle access

View original Github issue

Metadata

Project
charmcraft
Number
#778
Type
issue
State
closed
Author
tasdomas
Labels
—
Created
Updated
Closed

Current evaluation

Exported credentials failed to upload bundles due to a Charmhub server-side permissions bug, not charmcraft. Maintainer filed Launchpad bug #1977727; the fix was released in Charmhub by 5 Sep 2022 and the issue was closed.

Resolution: closed not a bug

Reason: facundobatista confirmed it was a bug in Charmhub, not charmcraft, and filed bugs.launchpad.net/snapstore-server/+bug/1977727. He later closed the issue noting the fix shipped in Charmhub; no corresponding charmcraft commit or PR exists in the repo.

Evaluated by: mr-cal-bot

No scores available.

Issue body

If I export charmcraft credentials `charmcraft login --export auth.file --bundle a-registered-bundle` and try to use them when uploading the bundle, I get an error: ``` - permission-required: Package access not allowed ``` The log contains: ``` 2022-05-30 10:52:42.602 HTTP 'POST' for 'https://storage.snapcraftcontent.com/unscanned-upload/' with params None and headers {'Content-Type': 'multipart/form-data; boundary=43b02f5550094699bf6e5f8ce713c3f4', 'Accept': 'application/json', 'Authorization': '<macaroon>', 'User-Agent': 'charmcraft/1.6.0 ubuntu/20.04 (x86_64) python/3.8.10'} 2022-05-30 10:52:43.518 Uploading bytes ended, id f0b76a0d-3d9e-445c-a212-58aa6fa4a8c4 2022-05-30 10:52:43.519 Retrieving credentials for 'charmcraft' on 'api.charmhub.io' from keyring 'auth MemoryKeyring'. 2022-05-30 10:52:43.519 HTTP 'POST' for 'https://api.charmhub.io/v1/charm/<REDACTED>/revisions' with params None and headers {'Authorization': '<macaroon>', 'User-Agent': 'charmcraft/1.6.0 ubuntu/20.04 (x86_64) python/3.8.10'} 2022-05-30 10:52:44.828 Store operation failed: - permission-required: Package access not allowed 2022-05-30 10:52:44.830 Traceback (most recent call last): 2022-05-30 10:52:44.830 File "/snap/charmcraft/904/lib/charmcraft/commands/store/store.py", line 140, in error_decorator 2022-05-30 10:52:44.830 return method(self, *args, **kwargs) 2022-05-30 10:52:44.830 File "/snap/charmcraft/904/lib/charmcraft/commands/store/store.py", line 296, in upload 2022-05-30 10:52:44.830 return self._upload(endpoint, filepath) 2022-05-30 10:52:44.830 File "/snap/charmcraft/904/lib/charmcraft/commands/store/store.py", line 268, in _upload 2022-05-30 10:52:44.830 response = self._client.request_urlpath_json("POST", endpoint, json=payload) 2022-05-30 10:52:44.830 File "/snap/charmcraft/904/lib/charmcraft/commands/store/client.py", line 90, in request_urlpath_json 2022-05-30 10:52:44.830 response = super().request(method, self.api_base_url + urlpath, *args, **kwargs) 2022-05-30 10:52:44.830 File "/snap/charmcraft/904/lib/craft_store/base_client.py", line 171, in request 2022-05-30 10:52:44.830 return self.http_client.request( 2022-05-30 10:52:44.830 File "/snap/charmcraft/904/lib/craft_store/http_client.py", line 166, in request 2022-05-30 10:52:44.830 raise errors.StoreServerError(response) 2022-05-30 10:52:44.830 craft_store.errors.StoreServerError: Store operation failed: 2022-05-30 10:52:44.830 - permission-required: Package access not allowed 2022-05-30 10:52:44.830 Full execution log: '/home/d/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220530-105242.595892.log' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Exported credentials failed to upload bundles due to a Charmhub server-side permissions bug, not charmcraft. Maintainer filed Launchpad bug #1977727; the fix was released in Charmhub by 5 Sep 2022 and the issue was closed.
stealth/space-bunny-alpha — closed not a bug Charmcraft’s exported credentials could not upload a bundle because of a Charmhub server bug. The fix shipped in Charmhub by 5 September 2022; see Launchpad bug #1977727.
stealth/space-bunny-alpha — closed resolved Exported bundle credentials were rejected due to a Charmhub bug; the fix was released in Charmhub by September 2022, resolving the issue.
qwen3.6-35b-a3b-mtp-q6 — — Exported charmcraft credentials failed to grant bundle upload access, returning a permission error. The root cause was a Charmhub bug. The issue was closed after the fix was released in Charmhub.
qwen/qwen3.6-35b-a3b — — Exported login credentials failed to grant bundle upload permissions due to a Charmhub bug. The issue was identified and resolved with a fix released to Charmhub.
qwen3.6-35b-a3b-mtp-q6 — — Exported charmcraft login credentials failed to grant bundle upload access due to a Charmhub backend bug. The fix has been released in Charmhub and the issue is closed.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#276 support `charmcraft export-login` charmcraft closed Charmcraft added credential export through charmcraft login --export, released in v1.5 via merged PR #602 (commit f0e57248), rather than as a separate export-login command.
73%
#672 charmcraft 1.4.0: impossible to login to charmhub charmcraft closed Closed as intended behavior: the headless remote host had no local keyring, so Charmcraft could not persist credentials; exporting credentials was the supported workaround.
70%
#1050 cli: add how to use exported credentials in help charmcraft merged Merged #1050 added login help showing how to load exported Charmhub credentials through CHARMCRAFT_AUTH; implemented in commit 9d0957ee.
70%