Bug #26549
closedUnauthenticated pull not working for Head requests
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://<fqdn>/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
....
"""
Updated by Brad Buckingham almost 6 years ago
- Bugzilla link changed from 1696824 to 1672802
Updated by The Foreman Bot almost 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Partha Aji
- Pull request https://github.com/Katello/katello/pull/8070 added
Updated by Chris Roberts almost 6 years ago
- Target version set to Katello 3.12.0
- Triaged changed from No to Yes
Updated by Anonymous almost 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|dddaaadeedfd93ddf7c07d48f7c4c4c85a345091.