Project

General

Profile

Bug #26549

Unauthenticated pull not working for Head requests

Added by Partha Aji about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Description of problem:
Given an allowance of an unauthenticated pull for the Library environment head requests are not given a free pass.

"""
$ curl -L --head https://theta.partello.example.com/v2/default_organization-docker-busybox/manifests/4.0.0-0

HTTP/1.1 401 Unauthorized
Date: Fri, 05 Apr 2019 16:13:13 GMT
Server: Apache
"""

Steps to Reproduce:
1. Create a docker repo with the following url and upstream name
registry url: https://quay.io/
upstream name: openshift-release-dev/ocp-release
2. Sync the repo
3. Goto Content->Lifecycle Environments
4. Choose library and set unauthenticated pull to yes
5. Try the following call
$ curl L --head https://&lt;fqdn&gt;/v2/default_organization<$PRODUCT>-<$REPO>/manifests/4.0.0-0

Actual results:
"""
HTTP/1.1 401 Unauthorized
Date: Fri, 05 Apr 2019 16:13:13 GMT
Server: Apache
"""

Expected results:
"""
$ curl -L --head https://theta.partello.example.com/v2/default_organization-docker-busybox/manifests/4.0.0-0
HTTP/1.1 200 OK
Date: Fri, 05 Apr 2019 16:18:31 GMT
Server: Apache
Foreman_version: 1.22.0-develop
Foreman_api_version: 2
Docker-Content-Digest: sha256:59c38273d9331211a5ad2c6fd10634f6db1932c15412e86bbeeba548c9c4c82c
Content-Type: application/json; charset=utf-8
Docker-Distribution-API-Version: registry/2.0
....
"""

Associated revisions

Revision dddaaade (diff)
Added by Partha Aji about 3 years ago

Fixes #26549 - Registry can handle head requests (#8070)

This commit adds code to facilitate 'head' requests for information
pertaining to pulling manifests.

History

#1 Updated by Partha Aji about 3 years ago

  • Bugzilla link set to 1696824

#2 Updated by Brad Buckingham about 3 years ago

  • Bugzilla link changed from 1696824 to 1672802

#3 Updated by The Foreman Bot about 3 years ago

  • Assignee set to Partha Aji
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8070 added

#4 Updated by Chris Roberts about 3 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.12.0

#5 Updated by Anonymous about 3 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF