62365d4ec8
This PR is a combination of #12920 and #13754. Prior to these changes, following a redirect when searching indexes would bypass our authentication middleware. This PR updates uv to support propagating credentials through our middleware on same-origin redirects and to support netrc credentials for both same- and cross-origin redirects. It does not handle the case described in #11097 where the redirect location itself includes credentials (e.g., `https://user:pass@redirect-location.com`). That will be addressed in follow-up work. This includes unit tests for the new redirect logic and integration tests for credential propagation. The automated external registries test is also passing for AWS CodeArtifact, Azure Artifacts, GCP Artifact Registry, JFrog Artifactory, GitLab, Cloudsmith, and Gemfury.
27 lines
887 B
Rust
27 lines
887 B
Rust
pub use base_client::{
|
|
AuthIntegration, BaseClient, BaseClientBuilder, DEFAULT_RETRIES, ExtraMiddleware,
|
|
RedirectClientWithMiddleware, RequestBuilder, UvRetryableStrategy, is_extended_transient_error,
|
|
};
|
|
pub use cached_client::{CacheControl, CachedClient, CachedClientError, DataWithCachePolicy};
|
|
pub use error::{Error, ErrorKind, WrappedReqwestError};
|
|
pub use flat_index::{FlatIndexClient, FlatIndexEntries, FlatIndexEntry, FlatIndexError};
|
|
pub use linehaul::LineHaul;
|
|
pub use registry_client::{
|
|
Connectivity, MetadataFormat, RegistryClient, RegistryClientBuilder, SimpleMetadata,
|
|
SimpleMetadatum, VersionFiles,
|
|
};
|
|
pub use rkyvutil::{Deserializer, OwnedArchive, Serializer, Validator};
|
|
|
|
mod base_client;
|
|
mod cached_client;
|
|
mod error;
|
|
mod flat_index;
|
|
mod html;
|
|
mod httpcache;
|
|
mod linehaul;
|
|
mod middleware;
|
|
mod registry_client;
|
|
mod remote_metadata;
|
|
mod rkyvutil;
|
|
mod tls;
|