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

316 Commits

Author SHA1 Message Date
Antonio Carlos Royo
af75809c9e [redhat-3.9] deps: update pbkdf2 to version 3.1.3 (PROJQUAY-9094) (#4117)
* update pbkdf2 to version 3.1.3

* updating registry proxy tests

---------

Co-authored-by: Antonio Carlos Royo <aroyo@aroyo-thinkpadp1gen7.rmtco.csb>
2025-07-07 15:07:17 -03:00
Brandon Caton
2b7da175e1 ci: fixing app type import (PROJQUAY-8991) (#4039)
ci: fixing app type import
2025-06-11 09:10:24 -04:00
OpenShift Cherrypick Robot
f86e344ad2 [redhat-3.9] proxycache(permissions): CVE-2025-4374 (PROJQUAY-8892) (#3964)
fixing CVE-2025-4374 by extending the create_repository method to understand if we are requesting a proxy_cache repository added unittests for create_repository when proxy_cache.

Co-authored-by: Michaela Lang <milang@redhat.com>
2025-05-27 15:07:23 -04:00
Sunandadadi
db48948865 [redhat-3.9] chore: update werkzeug and related package versions (PROJQUAY-5098) (#3570)
* chore: update werkzeug and related package versions (PROJQUAY-5098)

* update authlib to 1.2.1

* upgrade cryptography

* upgrade grpc

* remove uninitialised import

* update botocore

* revert mypy changes

* fixing types test

* fixing cloud storage tests
2025-01-17 10:18:23 -05:00
Brandon Caton
e9743d3d95 cherrypick: commit f2417670 from master (PROJQUAY-6895) (#2796)
cherry-picking commit f241767005 from master
2024-03-28 09:33:53 -04:00
Brandon Caton
a4a23414f8 quota: prevent tag creation on rejected manifest (PROJQUAY-3906) (#2282)
Currently if a new manifest is created that re-uses blobs already existing in the registry but not within the namespace it's possible for that manifest to be blocked if the newly referenced blobs exceed the quota limit. The issue being that the rejection only happens after the manifest has been created and tagged. This change blocks the manifest upload before the creation of the tag and prevents that tag from appearing in the UI and being pullable.

If the manifest upload get's rejected before the tag has been created for a new manifest, a temporary tag is created outside the time machine window so it is immediately available for GC.
2023-10-05 11:00:03 -04:00
OpenShift Cherrypick Robot
7f54e76599 [redhat-3.9] ui: displaying quota totals on user namespaces (PROJQUAY-5581) (#2128)
* displaying quota totals on user namespaces

* displaying sizes in base2

---------

Co-authored-by: bcaton <bcaton@redhat.com>
2023-08-14 16:34:21 +00:00
OpenShift Cherrypick Robot
1239477f54 [redhat-3.9] api: Adding ignore timezone flag when parsing datetime (PROJQUAY-5360) (#2079)
* api: Removing parsing of datetime (PROJQUAY-5360)

* added ignoretz flag to date util parser

* added removed extra line

---------

Co-authored-by: Sunandadadi <sunanda.3094@gmail.com>
2023-08-01 10:19:34 -04:00
OpenShift Cherrypick Robot
1c85c563b9 chore: use isinstance to check instance type (#2070)
Co-authored-by: Oleg Bulatov <oleg@bulatov.me>
2023-07-31 23:43:41 +02:00
OpenShift Cherrypick Robot
3757824708 secscan_model: attempt urldecoding fixed_in_version (PROJQUAY-5886) (#2063)
In Clair 4.7, an API field documented to have version information in no
particular format may URL encode it. This change attempts to decode and
read a known field that contains the "fixed" version. If that fails, the
value will be passed through, as it is now.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Co-authored-by: Hank Donnay <hdonnay@redhat.com>
2023-07-27 17:44:07 +02:00
OpenShift Cherrypick Robot
81dc79668c [redhat-3.9] Pagination: Fixing paginate for /api/v1/superuser/logs API (PROJQUAY-5360) (#2011)
* Pagination: Fixing paginate for /api/v1/superuser/logs API

* using offset to fetch next page items

* adding datetime parsing

* using black to format code

* removing use_offset

* Removing redundant declaration

---------

Co-authored-by: Sunandadadi <sunanda.3094@gmail.com>
2023-07-11 23:38:55 +02:00
Marcus Kok
6eeb45b7c0 config: Set feature flag default for new vulnerability notifications to True (#1995)
(PROJQUAY-4659)

Change the default from `False` to `True` for
`FEATURE_SECURITY_SCANNING_NOTIFY_ON_NEW_INDEX`.

Since this flag addresses a bug, it should be enabled by default.
2023-06-27 17:56:42 +02:00
OpenShift Cherrypick Robot
0c2f4c9224 logs: Add autologin to splunk's connect() to allow retries (PROJQUAY-5621) (#1957)
Signed-off-by: harishsurf <hgovinda@redhat.com>
Co-authored-by: harishsurf <hgovinda@redhat.com>
2023-06-08 14:22:11 -04:00
Oleg Bulatov
957b278c31 Revert "change removed_tag_expiration_s to bigint (#1932)" (#1950)
This reverts commit c80a5e3487.
2023-06-07 15:43:34 +02:00
OpenShift Cherrypick Robot
c80a5e3487 change removed_tag_expiration_s to bigint (#1932)
Signed-off-by: dmesser <dmesser@redhat.com>
Co-authored-by: dmesser <dmesser@redhat.com>
2023-06-07 15:13:07 +02:00
OpenShift Cherrypick Robot
2afab1c674 [redhat-3.9] api: add permanently delete tag usage log (PROJQUAY-5496) (#1926)
* Adding permanently delete tag action log

* updating alembic down revision

* formatting

---------

Co-authored-by: bcaton <bcaton@redhat.com>
2023-06-05 09:33:27 +02:00
OpenShift Cherrypick Robot
6be4d052ff [redhat-3.9] authentication(LDAP): allow LDAP referrals to not be followed (PROJQUAY-5291) (#1922) 2023-06-02 20:42:39 +02:00
OpenShift Cherrypick Robot
171f9cc14c logs: ssl_ca_path should be optional (PROJQUAY-4993) (#1920)
Co-authored-by: Oleg Bulatov <oleg@bulatov.me>
2023-06-02 14:27:08 +02:00
Brandon Caton
ba29a40b80 proxy: allowing expiring tags with timemachine set to 0 (PROJQUAY-5558) (#1907)
Adds the following changes:
- Allows remove_tag_from_timemachine to expire tags even if the time machine window is set to 0, immediately marking them for deletion. This allows the quota proxy pruner to expire tags with the same method call. This wasn't required for normal push/pulls as the user would just call the DELETE /tag endpoint.
- Remove hidden = true when expiring tags. For proxy Quay will attempt to lookup the tag referenced by the manifest in order to extend it's lifetime_end_ms. Hiding this tag prevents that logic from running correctly.
2023-05-26 15:04:06 -04:00
Marcus Kok
b911d480cf api: allow manifests to be pulled by digest (PROJQUAY-5467) (#1877)
Add new parameter `allow_hidden` to `lookup_manifest_by_digest` method and set this to true on the manifest v2 endpoint.

Enables manifests to be pulled by digest, and fixes issues with recent versions of conftest being unable to push to quay.
2023-05-26 09:43:27 -04:00
Brandon Caton
6cf0a3531b quota: calculating registry size (PROJQUAY-5476) (#1879)
Allows superusers to trigger a calculation of the deduplicated registry size. A superuser can go to the organization panel of the superuser page and select Calculate to queue a calculation of the registry total. The total will only be calculated when requested. Includes warning to user of increase of database load when running calculation.
2023-05-24 17:10:40 -04:00
Brandon Caton
cf50901159 quota: moving resetting of child manifest temporary tags to delete endpoint (PROJQUAY-5512) (#1894)
Moves the resetting of child manifest temporary tags to happen on deletion instead of on push/pull. Resetting child manifest temporary tags caused issues in other portions of the code like proxy cache where temporary tags were deleted too early.
2023-05-23 09:05:32 -04:00
Harish Govindarajulu
490a6b2ce8 logs: Add SSL cert support and test coverage for splunk logging (PROJQUAY-4993) (#1878)
Signed-off-by: harishsurf <hgovinda@redhat.com>
2023-05-19 16:24:13 -04:00
Daniel Messer
41cd8330d0 logs: add audit log events for login/logout to Quay (PROJQUAY-2344) (#1866)
* add auditing of login and logout events

Signed-off-by: dmesser <dmesser@redhat.com>

* python black formatting

Signed-off-by: dmesser <dmesser@redhat.com>

* correctly identify username during

Signed-off-by: dmesser <dmesser@redhat.com>

* revert change to existing code

Signed-off-by: dmesser <dmesser@redhat.com>

* remove superfluous ip tracking

Signed-off-by: dmesser <dmesser@redhat.com>

* beautify login messages

Signed-off-by: dmesser <dmesser@redhat.com>

* remove unused import

Signed-off-by: dmesser <dmesser@redhat.com>

* move alembic patch to head

Signed-off-by: dmesser <dmesser@redhat.com>

* correctly log target namespace for robots

Signed-off-by: dmesser <dmesser@redhat.com>

* python black formatting

Signed-off-by: dmesser <dmesser@redhat.com>

* login event detection refinement

Signed-off-by: dmesser <dmesser@redhat.com>

* add missing visualization

Signed-off-by: dmesser <dmesser@redhat.com>

* enrich login event data

Signed-off-by: dmesser <dmesser@redhat.com>

* make login auditing configurable

Signed-off-by: dmesser <dmesser@redhat.com>

* make update-testdata

Signed-off-by: dmesser <dmesser@redhat.com>

---------

Signed-off-by: dmesser <dmesser@redhat.com>
2023-05-17 11:22:35 +02:00
Brandon Caton
e6f2dc3354 quota: excluding robots from quota total (PROJQUAY-5469) (#1871)
Adding quotatotalworker to config services / excluding robots from quota total
2023-05-10 14:54:57 -04:00
Marcus Kok
0a1c7fb22e marketplace: add reconciler (PROJQUAY-5320) (#1817)
marketplace: add reconciler (PROJQUAY-5320)
* check RH marketplace after stripe for private repo creation / changing visibility
* add reconciliation worker that creates RH subscriptions in marketplace for pre-existing stripe customers
2023-05-08 09:48:17 -04:00
Daniel Messer
37e4990b07 logs: Add audit logs for organization and user namespace activities (PROJQUAY-3482) (#1846)
* add auditing events for orgs

Signed-off-by: dmesser <dmesser@redhat.com>

* add database migrations

Signed-off-by: dmesser <dmesser@redhat.com>

* fix org delete race condition

Signed-off-by: dmesser <dmesser@redhat.com>

* action log visualization

Signed-off-by: dmesser <dmesser@redhat.com>

* audit superuser events

Signed-off-by: dmesser <dmesser@redhat.com>

* additional user auditing

Signed-off-by: dmesser <dmesser@redhat.com>

* audit log visualization refinement

Signed-off-by: dmesser <dmesser@redhat.com>

* consistent email change auditing

Signed-off-by: dmesser <dmesser@redhat.com>

* python black formatting

Signed-off-by: dmesser <dmesser@redhat.com>

* fix incorrect log kind

Signed-off-by: dmesser <dmesser@redhat.com>

* missing log kind in migration

Signed-off-by: dmesser <dmesser@redhat.com>

* python black formatting

Signed-off-by: dmesser <dmesser@redhat.com>

* even more python black formatting

Signed-off-by: dmesser <dmesser@redhat.com>

* remove unnecessary import

Signed-off-by: dmesser <dmesser@redhat.com>

* bump alembic revision to head

Signed-off-by: dmesser <dmesser@redhat.com>

* alembic metadata change

Signed-off-by: dmesser <dmesser@redhat.com>

---------

Signed-off-by: dmesser <dmesser@redhat.com>
2023-05-03 13:52:10 +02:00
Brandon Caton
a2c379d47c quota: Include blob deduplication in totals (PROJQUAY-3942) (#1751)
Allows for only unique blobs are counted at the namespace and repository level. Calculation includes manifest list sizes.
Add's the following internal configurations that default to true:
QUOTA_INVALIDATE_TOTALS: Invalidates calculated totals when FEATURE_QUOTA_MANAGEMENT is set to false
RESET_CHILD_MANIFEST_EXPIRATION: Resets the expiry for child manifests on push of the manifest list for immediate GC eligibility
PERMANENTLY_DELETE_TAGS: Enables features related to the permanent deletion of tags outside the configured time machine window
2023-05-01 16:40:01 -04:00
Sunandadadi
5c34296920 API/UI: Filtering of tags API through query parameter (PROJQUAY-5362) (#1839)
* API/UI: Filtering of tags API through query parameter (PROJQUAY-5362)

* Changing syntax of query param to add operation + added propagation of filtering from new UI

* added exception to return 400 on incorrect syntax

* Added tests to test filtering of /tags endpoint

* Minor fixes
2023-04-28 16:16:41 -04:00
Kenny Lee Sin Cheong
89725309be billing: update Stripe checkout to support 3DS (PROJQUAY-5129) (#1818)
Update Stripe checkout in order to support auth requirements from
banks.
2023-04-11 14:41:37 -04:00
Harish Govindarajulu
be1bddfd6a feat: Allow action logs to be forwarded to Splunk (PROJQUAY-4993) (#1764)
Signed-off-by: harishsurf <hgovinda@redhat.com>
2023-03-30 13:33:55 -04:00
Marcus Kok
c3fc3a82ab secscan: send notifications for new indexes (PROJQUAY-4659) (#1813)
On new pushes, allow notifications being sent to user if vulnerabilities are found.
2023-03-29 13:17:52 -04:00
Kenny Lee Sin Cheong
d05c32b9d1 billing: update default subscription payment behavior (#1778)
Update stripe payment behavior to 'default_incomplete'.
2023-03-08 12:19:05 -05:00
Kenny Lee Sin Cheong
16e5321108 permissions: lazy-load superuser permissions (PROJQUAY-5117) (#1761) 2023-03-06 10:29:55 -05:00
Ivan Bazulic
95a5932528 security: Change error messages in UI during LDAP login (PROJQUAY-4845) (#1767)
* Change error messages in UI during LDAP login (PROJQUAY-4845)

Previously, on installations where LDAP is used, we were telling users whether the username or password was failing when login attempts were made. This might pose a security risk, a malicious user could, via the returned message, identify which users have access to Quay and which don't.
With this change, we return a general message saying the user used wrong credentials instead of providing any details.

* Fixed tests.

* Fix some more tests.

* Readd accidental removal of one assertion.
2023-03-02 11:49:11 -05:00
Marcus Kok
d84b67c73c secscan: add scan metric (PROJQUAY-4488) (#1719)
re-adding metric for initial scan results duration, update bucket range
2023-02-01 11:56:53 -05:00
Kenny Lee Sin Cheong
80fdb92462 secscan: add config to limit manifests with layer size too large to index (PROJQUAY-4957) (#1733)
Also removes deprecated Clair v2 configs.
2023-01-31 15:50:16 -05:00
Kenny Lee Sin Cheong
6e8e2d2fe7 chore: remove deprecated appr code (PROJQUAY-4992) (#1718) 2023-01-24 10:11:04 +01:00
Marcus Kok
5e4ae6495a Revert "secscan: add metric for scan results (PROJQUAY-4488) (#1674)" (#1714)
This reverts commit 8f9d6c9447.
2023-01-19 15:53:44 -05:00
Kenny Lee Sin Cheong
ed86a102ce logs: validate date range is within configuration (PROJQUAY-4959) (#1707) 2023-01-17 12:04:57 -05:00
Marcus Kok
8f9d6c9447 secscan: add metric for scan results (PROJQUAY-4488) (#1674)
Add histogram metric that calculates time taken to get security scan results after pushing image to quay.
2023-01-16 10:44:49 -05:00
Kenny Lee Sin Cheong
33451ca96e logs: audit logs on manual build triggers and build cancellations (PROJQUAY-4726) (#1682) 2023-01-10 13:35:01 -05:00
Kenny Lee Sin Cheong
dba302b5f1 users: default to true if LDAP_RESTRICTED_USER_FILTER is not set (PROJQUAY-4776) (#1645)
When LDAP is used and FEATURE_RESTRICTED_USERS is set, if
LDAP_RESTRICTED_USER_FILTER is set, then, by default, all ldap users
are restricted.
2022-11-25 13:39:07 -05:00
Kenny Lee Sin Cheong
b128936b50 users: fix behavior when using ldap and restricted user whitelist is set (PROJQUAY-4767) (#1640) 2022-11-23 15:22:15 -05:00
Kenny Lee Sin Cheong
fe2b89d656 logs: create action logs on proxy cache config creation/deletion (PROJQUAY-4718) (#1625) 2022-11-22 12:36:57 -05:00
Kenny Lee Sin Cheong
0caa4203ec users: prevent CREATE_NAMESPACE_ON_PUSH is restricted (PROJQUAY-4702) (#1621)
Prevent creating namespaces/orgs on pushes (CREATE_NAMESPACE_ON_PUSH)
if user is restricted.

Also updates RESTRICTED_USERS_WHITELIST to defaults to all if not set,
given that FEATURE_RESTRICTED_USERS is set.
2022-11-09 18:23:01 -05:00
Kenny Lee Sin Cheong
64ec15605c superusers: grant superusers additinonal org permissions (PROJQUAY-4687) (#1613)
When FEATURE_SUPERUSERS_FULL_ACCESS is set, grant superusers org admin permissions:
- PROJQUAY-4687
- PROJQUAY-4690
- PROJQUAY-4693
- PROJQUAY-4697
- PROJQUAY-4701
2022-11-07 17:41:18 -05:00
Harish Govindarajulu
83c866193d Fix proxy-cache overflow quota limit when pulling same image (PROJQUAY-4670) (#1597)
Signed-off-by: harishsurf <hgovinda@redhat.com>
2022-10-28 16:54:53 -04:00
Kenny Lee Sin Cheong
c84067a4d6 users: add restricted users' filter (PROJQUAY-1245) (#1551)
- Similar to LDAP_SUPERUSER_FILTER, add a specific filter to define
restricted users, based on the LDAP_USER_FILTER
- restrict writes on restricted users' own namespace. Normal
permissions applies on organization membership
- add global readonly superuser GLOBAL_READONLY_SUPER_USERS (PROJQUAY-2604)
- Removes RESTRICTED_USER_INCLUDE_ROBOTS, FEATURE_RESTRICTED_READ_ONLY_USERS
2022-10-28 13:38:37 -04:00
Joseph Crosland
98801bfd3e secscan: Generate key to reduce vulnerabilities (PROJQUAY-4562) (#1547)
Currently Quay is displaying the Clair response with no
interpretation meaning when Clair reports on vulns per repo
they appear to be duplicated (RHEL based images with multiple
repos and packages existing in more than one). The correct way
to fix this is via an interpretation layer in Quay, this change
is a stop-gap to improve readability for the user.

Signed-off-by: crozzy <joseph.crosland@gmail.com>

Signed-off-by: crozzy <joseph.crosland@gmail.com>
2022-10-18 09:54:38 -07:00