Story #1358
closedAs a user, I can sync from a SLES 12+ repository.
100%
Description
SUSE 12 repository HTTP (S) requests are authorized by an auth token in the query string. The auth token is the entire query string, and must be included in every request to the repository. To include this query string in requests to the source repository, pulp needs to first know the auth token, and then use it when building URLs to download content (metadata, packages, etc) from the source repository.
Related issues
Updated by semyers about 9 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to semyers
I started picking at this this earlier today, sort of thinking out loud in code. I ended up accidentally writing the code, so I guess I'm working on this now... :\
I've got two failing tests in the existing suite, and a few more to write to prove the new functionality.
Updated by semyers about 9 years ago
Storing the SLES auth token is pretty trivial, since pulp already makes it easy to tweak importer configs via the REST API. Here's an HTTPie example:
http --auth admin:admin --verify no PUT https://localhost/pulp/api/v2/repositories/sles-12/ importer_config:='{"sles_auth_token": "foo"}'
Building the URL modifier is easy enough, and I'm also able to DRY up some code, since pulp_rpm does a bit of trailing slash checking, appending stuff to url paths, etc, that benefits from centralizing the rewriting behavior.
I believe I've wired up the URL rewriting where needed to sync SLES 12+ repos, but writing the tests to prove it is proving a little bit tricky, most likely due to my lack of experience with Mock. :)
Updated by semyers about 9 years ago
- Status changed from ASSIGNED to POST
Got mock figured out, maybe had a bit too much fun playing with it...
I still have some scope-related questions before I can totally finish this up, but the PR is up for review now:
https://github.com/pulp/pulp_rpm/pull/734
Added by semyers about 9 years ago
Updated by semyers about 9 years ago
sles_auth_token became the more generic query_auth_token, so the httpie example above would turn into
http --auth admin:admin PUT https://host/pulp/api/v2/repositories/repo-id/ importer_config:='{"query_auth_token": "foo"}'
Updated by semyers about 9 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 0d3a483c905e9c54ebd1ff01ad814fa38f8fb6bb.
Updated by semyers about 9 years ago
Updated by dkliban@redhat.com almost 9 years ago
- Status changed from MODIFIED to 5
Updated by semyers over 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
- Platform Release changed from 2.7.2 to 2.8.0
query_auth_token support
Added the ability to support query-string-based authorization to repos that support it, such as a SLES 12 repo
fixes #1358
https://pulp.plan.io/issues/1358