diff --git a/CHANGES/+multiple-registries-auth-state.bugfix b/CHANGES/+multiple-registries-auth-state.bugfix new file mode 100644 index 000000000..9c6cb6315 --- /dev/null +++ b/CHANGES/+multiple-registries-auth-state.bugfix @@ -0,0 +1 @@ +Fixed authentication state (bearer token and basic auth) leaking between remotes by storing it per downloader instance instead of on the downloader class. diff --git a/pulp_container/app/downloaders.py b/pulp_container/app/downloaders.py index 907fc0958..5622bc423 100644 --- a/pulp_container/app/downloaders.py +++ b/pulp_container/app/downloaders.py @@ -25,14 +25,13 @@ class RegistryAuthHttpDownloader(HttpDownloader): Additionally, use custom headers from DeclarativeArtifact.extra_data['headers'] """ - registry_auth = {"bearer": None, "basic": None} - token_lock = asyncio.Lock() - def __init__(self, *args, **kwargs): """ Initialize the downloader. """ self.remote = kwargs.pop("remote") + self.registry_auth = {"bearer": None, "basic": None} + self.token_lock = asyncio.Lock() super().__init__(*args, **kwargs)