1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00

15 Commits

Author SHA1 Message Date
Ryan Wallace
a06cc6fa43 chore: update all black versions to 24.4.2 and run make black (#4754)
* chore(pre-commit): match black version with requirements-dev

* run `make black` against repo

* ci: switch to black 24.4.2

* fix: py312

* fix: flake8 errors

* fix: flake8 conflicts

* chore: add git blame ignore revs file
2025-12-19 11:29:53 -06:00
Sharpened Blade
d31e30a3f7 proxy: Drop error 403 token requests for anonymous pulls (PROJQUAY-9012) (#4235)
* proxy: Drop error 403 token requests for anonymous pulls (PROJQUAY-9012)

ghcr.io returns 403 when attempting an anonymous pull, which causes the
proxy to attempt authentication even when authentication is disabled.
This change ignores 403 status codes when requesting anonymous pulls,
similar to the existing behavior for 401 responses.

* fix formatting
2025-11-04 10:46:17 -05:00
Kenny Lee Sin Cheong
5f63b3a7bb chore: drop deprecated tables and remove unused code (PROJQUAY-522) (#2089)
* chore: drop deprecated tables and remove unused code

* isort imports

* migration: check for table existence before drop
2023-08-25 12:17:24 -04:00
Harish Govindarajulu
e349762d78 proxy: Allow anonymous pulls from registries (PROJQUAY-5273) (#1906)
This change allows validation of proxy cache config api to support anonymous pulls
when the registry returns a 401 since repo name is not known during initial proxy config

Signed-off-by: harishsurf <hgovinda@redhat.com>
2023-05-25 11:53:15 -04:00
Harish Govindarajulu
ad5e3f8d51 Modify registry auth url for proxy cache validation (PROJQUAY-4585) (#1603)
When authenticating again a registry, if the www-authenticate header
doesn't specify a service, exclude it from the url

Signed-off-by: harishsurf <hgovinda@redhat.com>
2022-11-04 10:13:26 -04:00
Harish Govindarajulu
0f99634d74 Update auth flow to add "access_token" response field (PROJQUAY-4431) (#1580)
Signed-off-by: harishsurf <hgovinda@redhat.com>
2022-10-26 12:52:28 -04:00
Ivan Bazulic
9209cf7596 bug: Fix schema discovery on basic auth (PROJQUAY-4362) (#1498)
* bug: Fix schema discovery on basic auth (PROJQUAY-4362)
Fixes [PROJQUAY-4362](https://issues.redhat.com/browse/PROJQUAY-4362).

* Added explicit conversion to string
2022-08-30 12:44:58 +02:00
Flavian Missi
ac6a8d2f8b PROJQUAY-3750: support registries that do not return a digest header (#1310)
The distribution spec does not require the docker-content-digest header
to be set in response to a manifest GET/HEAD request.

This changes both the proxy client and the registry proxy model to
correctly check whether a manifest is up-to-date with the upstream
registry or not when no digest header is received.

NOTE: when checking staleness against registries that do not return the
docker-content-digest header, Quay will make a GET request to the
registry and calculate the digest from the manifest itself. GET requests
usually count towards rate-limiting.

This change also sets the accept-encoding header to 'identity'. The python
requests library seems to automatically set the accept-encoding header to
'gzip'. Dockerhub ignores that header when serving blobs, but some
registries don't (namely registry.access.redhat.com). When Quay receives a
gzipped config blob (have not tested non-config blobs) for some reason it
doesn't know how to handle it. I suspect it has to do wit the fact that in
this case the content-length header will differ from the actual size of
the response body, so when Quay tries to upload the blob it cannot
correctly calculate the actual blob size, so it does a partial upload to
its object storage, which then results in a digest mismatch error
(BlobDigestMismatchException).
2022-05-10 17:56:08 +02:00
Flavian Missi
1342a17b63 proxy: make upstream related error message more actionable (#1240)
fixes PROJQUAY-3553
2022-04-12 14:36:30 +02:00
Sunandadadi
a4c8924f11 Proxy cache: Elaborate hint message for anonymous pulls and making a safe request (PROJQUAY - 0000) (#1222)
* Tracking aws ip ranges.json

* Reverting change

* Proxy cache: Elaborate hint message for anonymous pulls and making a safe request
2022-03-31 11:39:32 -04:00
Flavian Missi
b941a0384c proxy: raise UpstreamRegistryError if we can't request upstream (#1220)
requests will either throw a RequestException or a ConnectionError if it
fails to request the given url for whatever reason.
callers are only expected to treat UpstreamRegistryError, so we throw it
instead of the requests related exceptions, adding the original message
to the new exception.
2022-03-31 15:28:32 +02:00
Sunandadadi
7524171ac8 Proxy Cache: Interface and UI for Proxy cache Configuration (PROJQUAY-3029) (#1204) 2022-03-31 10:48:59 +02:00
Flavian Missi
5987534718 endpoints/v2: handle generic proxy related errors (#1213)
also add upstream registry to proxy cache key. if a user changes their
mind about what registry to proxy, we shouldn't try to reuse the token.
2022-03-30 15:30:05 +02:00
Flavian Missi
f248d885aa proxy: don't store entire blob in memory when caching (#1200)
also uses blob uploader to upload the blob to storage.

PROJQUAY-3459
2022-03-28 18:27:07 +02:00
Flavian Missi
fe4d66b030 feat: pull-thru proxy cache (#1053)
introduces the possibility to pull images from external registries
through Quay, storing them locally for faster subsequent pulls.

Closes PROJQUAY-3030 and PROJQUAY-3033
2022-03-23 17:20:00 +01:00