Project

Profile

Help

Story #8167

As a user, I have proxy_password and proxy_username available on all remotes.

Added by bmbouter 6 months ago. Updated 5 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
GalaxyNG
Sprint:
Quarter:

Description

Motivation

For proxy authorization to be sent to proxies using the PROXY-AUTHORIZATION header, we need to set that data on the aiohttp session. Currently the only way to specify proxy authorization is in embedded in the proxy_url.

Implementation

  1. Add a proxy_username and proxy_password fields to the Remote MasterModel. These are optional fields.
  2. Ensure that if one is specified, they both are specified (this is at the serializer level).
  3. Have the DownloaderFactory read these values and set them on the aiohttp session correctly.

Moving proxy credentials out of proxy_url

As part of this story proxy credentials will no longer be allow to be stored on the proxy_url. So for this story the following also needs to be done:

  • Validation needs to be added for proxy_url that disallows users to put a username and/or password in the proxy_url. If the user does it should fail validation and they should be directed to use the proxy_username and proxy_password setting.

  • A data migration needs to be made which will remove any credentials stored in existing remotes and move them to the proxy_username and proxy_password fields at migration time.

Notes

Use the proxy_pass parameter on the aiohttp session like the example below from the aiohttp client proxy config docs:

async with aiohttp.ClientSession() as session:
    proxy_auth = aiohttp.BasicAuth('user', 'pass')
    async with session.get("http://python.org",
                           proxy="http://proxy.com",
                           proxy_auth=proxy_auth) as resp:
        print(resp.status)

Related issues

Related to Pulp - Issue #8058: Proxy credentials displayed in clear textNEW<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 5ea7840b View on GitHub
Added by mdellweg 5 months ago

Add proxy username and password to remote

fixes #8167 https://pulp.plan.io/issues/8167

History

#1 Updated by bmbouter 6 months ago

  • Related to Issue #8058: Proxy credentials displayed in clear text added

#2 Updated by fao89 6 months ago

  • Tracker changed from Issue to Story
  • % Done set to 0
  • Severity deleted (2. Medium)
  • Triaged deleted (No)

#3 Updated by bmbouter 6 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter

#4 Updated by bmbouter 6 months ago

  • Description updated (diff)

#5 Updated by bmbouter 6 months ago

  • Tags GalaxyNG added

#6 Updated by pulpbot 5 months ago

  • Status changed from ASSIGNED to POST

#8 Updated by bmbouter 5 months ago

  • Assignee changed from bmbouter to mdellweg

#9 Updated by mdellweg 5 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#10 Updated by ipanova@redhat.com 5 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF