Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronization using authenticated proxy is failing #801

Closed
bmclaughlin opened this issue Jan 26, 2022 · 3 comments · Fixed by #802
Closed

Synchronization using authenticated proxy is failing #801

bmclaughlin opened this issue Jan 26, 2022 · 3 comments · Fixed by #802

Comments

@bmclaughlin
Copy link
Contributor

Using proxy authentication returns 407.

galaxy_ng issue: https://issues.redhat.com/browse/AAH-1243

@bmbouter
Copy link
Member

bmbouter commented Jan 26, 2022

I believe I've reproduced this issue.

  1. Install a local proxy with pip install proxy.py
  2. Start that proxy to require basic auth using proxy --basic-auth foo:bar --hostname 0.0.0.0
  3. Verify that curl receives a 407 when used without auth provided curl -v --proxy http://127.0.0.1:8899 https://example.com
  4. Verify that curl works as expected when the correct credentials are passed to the proxy curl -v --proxy http://127.0.0.1:8899 -U foo:bar https://example.com

Then try to sync a collection using pulp_ansible through the proxy with auth specified using this script:

#!/bin/bash

set -ev

repo_name="repo$RANDOM"
remote_name="remote$RANDOM"
url="https://galaxy.ansible.com"
distribution_name="distribution$RANDOM"
base_path="$RANDOM"

pulp ansible remote -t collection create --name $remote_name --url $url --requirements-file ~/devel/basic.yml --proxy-url http://127.0.0.1:8899 --proxy-username foo --proxy-password bar
pulp ansible repository create --name $repo_name --remote $remote_name
pulp ansible repository sync --name $repo_name
pulp ansible distribution create --repository $repo_name --name $distribution_name --base-path $base_path

echo "Created and synced repo $repo_name"

Let ~/devel/basic.yml contain:

---
collections:
# With just the collection name
- pulp.pulp_installer
- ansible.posix

@dkliban
Copy link
Member

dkliban commented Jan 26, 2022

We fixed a related bug in pulpcore with the following change pulp/pulpcore@0c9541d#diff-3b08c4799559edbce70a244edcc7bcc6e3817e9e8837da6e5519cbc0b3271fea
Something similar is needed for any custom downloaders in this plugin.

@bmbouter
Copy link
Member

Hmmm, it looks like it's present on both 0.10 and main.

fao89 added a commit to fao89/pulp_ansible that referenced this issue Jan 27, 2022
fao89 added a commit that referenced this issue Jan 27, 2022
fao89 added a commit that referenced this issue Jan 27, 2022
fao89 added a commit to fao89/pulp_ansible that referenced this issue Jan 27, 2022
fao89 added a commit to fao89/pulp_ansible that referenced this issue Jan 27, 2022
fao89 added a commit to fao89/pulp_ansible that referenced this issue Jan 27, 2022
fao89 added a commit to fao89/pulp_ansible that referenced this issue Jan 27, 2022
fao89 added a commit to fao89/pulp_ansible that referenced this issue Jan 27, 2022
fao89 added a commit that referenced this issue Jan 27, 2022
fao89 added a commit that referenced this issue Jan 27, 2022
fao89 added a commit that referenced this issue Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants