Pull registries from HTTP(S) URLs, with private-source auth#1356
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1356 +/- ##
=======================================
+ Coverage 82.1% 82.4% +0.2%
=======================================
Files 118 120 +2
Lines 9960 10092 +132
=======================================
+ Hits 8183 8320 +137
+ Misses 1777 1772 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jsuereth
left a comment
There was a problem hiding this comment.
I believe there is a non-breaking way to support multiple credentials per-domain you resolve from and this flag at the same time.
Specifically I think we can have a url - token config, similar to cargo, in the future that would "win" over this broad credential config.
Approve-ing but want to confirm you agree with me first, @jerbly. WDYT?
|
@jsuereth - I think this is good now. Requested re-review since it's changed a lot since you looked last. This is what I demoed to you a couple of weeks ago. |
Adds HTTP Bearer token authentication for downloading remote registries from private HTTP(S) sources (closes #1344). Primary use case: pulling published registry artifacts (manifest.yaml + resolved.yaml) from private GitHub release assets.
[[auth]]entries in.weaver.toml. Each entry pairs aurl_prefix(longest match wins) with a token source: a literaltoken, atoken_envvariable name, or atoken_commandhelper whose first stdout line is the token (e.g.["gh", "auth", "token"]). Matched requests getAuthorization: Bearer <token>and aUser-Agent: weaverheader.Breaking change: A bare HTTP(S) URL with no .git/.zip/.tar.gz suffix and no refspec or [sub_folder] now parses as RemoteFile instead of GitRepo. Add .git to such URLs to keep the old behaviour.