Bug 2007655 - Authorization repository causing invalid upstream url
Summary: Authorization repository causing invalid upstream url
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.11.0
Assignee: Ryan Verdile
QA Contact: Griffin Sullivan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-24 13:52 UTC by Griffin Sullivan
Modified: 2022-07-05 14:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2009049 (view as bug list)
Environment:
Last Closed: 2022-07-05 14:30:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33576 0 Normal New change urls with username and password in the url to use basic auth parameters in pulp3 2021-09-28 13:47:07 UTC
Pulp Redmine 9457 0 Normal NEW [EPIC] As a user, I am given an error if I try to use a url with basic auth 2021-09-28 14:07:30 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:30:14 UTC

Description Griffin Sullivan 2021-09-24 13:52:34 UTC
Description of problem:
We are running a test that uses this repository: https://rplevka.fedorapeople.org/fakerepo01/. In our testing, we pass the username and password like https://<username>:<password>@rplevka.fedorapeople.org/fakerepo01/. This works fine in Satellite 6.9 when creating and syncing the repo, but in 6.10 you can't make the repo with this url in the UI. We are able to make the repo through the API, but when you get to syncing it fails due to the url**.


Version-Release number of selected component (if applicable):
6.10 snap 20


How reproducible:
Always

Steps to Reproduce:
1. Go to Content > Products > Create Product
2. Save the Product then New Repository
3. Create a Yum repo with the Upstream URL as https://<username>:<password>@rplevka.fedorapeople.org/fakerepo01/

Actual results:
bad URI(is not URI?): "https://<username>:<password>@rplevka.fedorapeople.org/fakerepo01/"

Expected results:
Repository is created successfully.

Additional info:

**Here's the error when you try to sync after making the repo through the API:

{"pulp_tasks"=>
  [{"pulp_href"=>"/pulp/api/v3/tasks/cfd5cca2-9093-401b-aca4-a1a9e33f2aba/",
    "pulp_created"=>"2021-09-24T13:48:32.853+00:00",
    "state"=>"failed",
    "name"=>"pulp_rpm.app.tasks.synchronizing.synchronize",
    "logging_cid"=>"5c1a697f-3ca5-4ab0-b8ae-4b354d95f17c",
    "started_at"=>"2021-09-24T13:48:32.929+00:00",
    "finished_at"=>"2021-09-24T13:48:32.984+00:00",
    "error"=>
     {"traceback"=>
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/tasking/pulpcore_worker.py\", line 272, in _perform_task\n" +
       "    result = func(*args, **kwargs)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 411, in synchronize\n" +
       "    remote_url = fetch_remote_url(remote)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 274, in fetch_remote_url\n" +
       "    get_repomd_file(remote, normalized_remote_url)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 232, in get_repomd_file\n" +
       "    return downloader.fetch()\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/download/base.py\", line 176, in fetch\n" +
       "    return done.pop().result()\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/download/http.py\", line 258, in run\n" +
       "    return await download_wrapper()\n" +
       "  File \"/usr/lib/python3.6/site-packages/backoff/_async.py\", line 133, in retry\n" +
       "    ret = await target(*args, **kwargs)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/download/http.py\", line 256, in download_wrapper\n" +
       "    return await self._run(extra_data=extra_data)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulp_rpm/app/downloaders.py\", line 95, in _run\n" +
       "    url, proxy=self.proxy, proxy_auth=self.proxy_auth, auth=self.auth\n" +
       "  File \"/usr/lib64/python3.6/site-packages/aiohttp/client.py\", line 1117, in __aenter__\n" +
       "    self._resp = await self._coro\n" +
       "  File \"/usr/lib64/python3.6/site-packages/aiohttp/client.py\", line 406, in _request\n" +
       "    raise InvalidURL(str_or_url) from e\n",
      "description"=>
       "http://<username>:<password>%40rplevka.fedorapeople.org/fakerepo01/repodata/repomd.xml"},
    "worker"=>"/pulp/api/v3/workers/51345666-6545-440a-a334-e24abe830a2b/",
    "child_tasks"=>[],
    "progress_reports"=>[],
    "created_resources"=>[],
    "reserved_resources_record"=>
     ["/pulp/api/v3/repositories/rpm/rpm/ee0f91e1-8a01-4f5d-bf2d-820102aa849c/",
      "/pulp/api/v3/remotes/rpm/rpm/07b34092-7492-43dc-8c1e-454d4de58014/"]}],
 "create_version"=>true,
 "task_groups"=>[]}

Comment 1 pulp-infra@redhat.com 2021-09-28 14:07:31 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 2 pulp-infra@redhat.com 2021-09-28 14:07:32 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 3 Bryan Kearney 2021-12-07 16:05:05 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33576 has been resolved.

Comment 4 Griffin Sullivan 2021-12-17 18:33:26 UTC
Verified in 7.0 snap 3

Creating a repo with username and password in the URL causes error.

Steps to Reproduce:
1. Go to Content > Products > Create Product
2. Save the Product then New Repository
3. Create a Yum repo with the Upstream URL as https://<username>:<password>@rplevka.fedorapeople.org/fakerepo01/

Expected results:
Satellite denies creation of the repo and points the user to use the upstream username and upstream password fields.

Actual results:
Satellite denies creation of the repo and points the user to use the upstream username and upstream password fields.

Comment 8 errata-xmlrpc 2022-07-05 14:30:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5498


Note You need to log in before you can comment on or make changes to this bug.