feat: authenticating when using remote archive#978
feat: authenticating when using remote archive#978matoous wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
Add `auth-token` option to the CLI that allows configuring authentication when fetching registry from a remote archive. `auth-token` is passed and handled separately from the virtual directory path string as the usual `@` character separating userinfo portion of the URL from the host is reserved for the `refspec`. Taking the token from the userinfo portion of the URL would be an alternative to the approach in this commit but would make the parsing a little bit more cumbersome. I am open to both approach and happy to adjust the code to whatever the OpenTelemetry team deems better. Fixes: open-telemetry#430
80ef482 to
c9c75ff
Compare
c9c75ff to
989d460
Compare
|
Apologies for taking a while to get to this. My thoughts are:
@lquerel is best to review any configuration options / auth model here for multi-registry support. |
|
Heya! Thanks for the feedback, minor note on one of the bullet points:
We can do that for basic auth with username:password, otherwise to use |
Fair point. yes we could limit to just the authorization header. However, it may also make sense to have extensible headers so we're "future proof" there. I'd like @lquerel's thoughts |
Note
Work in progress PR, opening early to collect feedback.
Add
auth-tokenoption to the CLI that allows configuring authentication when fetching registry from a remote archive.Notes
auth-tokenis passed and handled separately from the virtual directory path string as the usual@character separating userinfo portion of the URL from the host is reserved for therefspec. Taking the token from the userinfo portion of the URL would be an alternative to the approach in this commit but would make the parsing a little bit more cumbersome. I am open to both approach and happy to adjust the code to whatever the OpenTelemetry team deems better.Open for discussion
Bearerscheme in theAuthorizationheader. For example, most guides using GitHub PATs usetokenscheme (even thoughBearerworks too). UsingBearermight be an OK compromise for the initial version.Fixes: #430