Support authentication for `rip::index::PackageDb`
vlad-ivanov-name opened this issue · comments
Vlad Ivanov commented
To support custom/private pip registries (prefix-dev/pixi#588), PackageDb
needs to support authentication.
I would propose the following API:
- create a trait that lives somewhere near
PackageDb
, e. g.ProvidesAuth
- the trait would include an
authorize
method (does it need to accept request body and headers? at least in case with google cloud it doesn't need to) - let clients like pixi implement the trait and pass an instance of an object via
Option<Box<dyn ProvidesAuth>>
I'm open to other suggestions and feedback on this
Bas Zalmstra commented
Im not sure what the authentication scheme looks like for pypi registries but we might be able to reuse AuthenticatedClient
in rattler_networking
for this.
Vlad Ivanov commented
Added "reqwest with middleware" client so this is now supported in API