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

194 Commits

Author SHA1 Message Date
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
OpenShift Cherrypick Robot
b5b7aabefa georep: Add error handling for remove location script (PROJQUAY-5878) (#2094)
- Gracefully handle errors that are thrown during remove location script
- This should handle scenarios where the location is not found or not provided, as well as other error cases

Co-authored-by: Jonathan King <jonathankingfc@gmail.com>
2023-08-04 11:19:06 +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
0e08328b1d geo-rep: Initialize features from config in util script (PROJQUAY-5627) (#1967)
- Features must be initialized in order to check if storage replication is enabled, so we need to import and intialize the config from inside the util script

Co-authored-by: Jonathan King <jonathankingfc@gmail.com>
2023-06-13 22:39:08 +02:00
OpenShift Cherrypick Robot
958196757f geo-rep: Add util script to remove geo-rep location and corresponding image locations (PROJQUAY-4995) (#1943)
- This removes first the ImageStoragePlacements that are associated with the location
- Once those are cleaned up, the ImageStorageLocation itself is removed from the database

Co-authored-by: Jonathan King <jonathankingfc@gmail.com>
2023-06-06 21:57:13 -04:00
Marcus Kok
de8c48fa28 marketplace: fixing allowed repo count (PROJQUAY-5513) (#1891)
* Aggregate stripe plans and subscriptions.

* Validate end date for subscriptions when fetching from marketplace.

* Check subscription returned from stripe api is non-null value when
finding stripe plan for sku.
2023-05-25 10:46:58 -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
Sunandadadi
230fd24f3d Util: Reading new UI feedback form url from config parameter (PROJQUAY-5463) (#1902)
* Util: Reading feedback form url from config parameter (PROJQUAY-5463)

* updating form link for quay plugin
2023-05-24 10:43:25 -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
Marcus Kok
c353946910 marketplace: fix path to api cert (PROJQUAY-5409) (#1870)
remove /auth from path to marketplace cert

secrets are mounted to /conf/stack by default
2023-05-10 07:37:30 -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
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
Marcus Kok
780bca5eeb locking: change log severity (PROJQUAY-5221) (#1820)
When worker fails to acquire lock make sure a log message is sent as a warning for better visibility when troubleshooting.
2023-04-10 09:56:48 -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
Syed Ahmed
98d89a1fce cors: check for request_origin being set (PROJQUAY-5213) (#1811)
Some browsers might not set the Origin header
in the request. Ignore the origin check in such
cases
2023-03-28 06:13:34 -04:00
Ivan Bazulic
b2a5b3abb7 ldap: Don't convert dashes to underscores in usernames (PROJQUAY-5253) (#1808)
* ldap: Don't convert dashes to underscores in usernames (PROJQUAY-5253)
When `FEATURE_USER_CONFIRMATION` is set to true and an LDAP username that has dashes inside is used, Quay will automatically change dashes to underscores. This breaks `LDAP_RESTRICTED_USER_FILTER`  since namespaces in Quay do not have to be the same as LDAP namespaces.
The change can only impact ancient Docker versions prior to version 1.5 where support for dashes in namespaces has been introduced.

* Fix validation test
2023-03-27 14:54:34 -04:00
Syed Ahmed
84abdba076 api: Allow setting multiple CORS_ORIGIN (PROJQUAY-5213) (#1791)
api: Allow setting multiple CORS_ORIGIN (PROJQUAY-5213)

multiple CORS Origin are required for integration with console.redhat
2023-03-22 11:15:59 -04:00
Modassar Rana
618945b607 Added support for IBMZ (#1737)
Updated support for Z
2023-02-17 15:04:04 +01:00
Syed Ahmed
0ae31c6ebc storage: Add MultiCDN storage provider (PROJQUAY-5048) (#1747)
* storage: Add MultiCDN storage provider (PROJQUAY-5048)

This storage provider can route to different underlying sub-providers
based on a critiera. Currently supported filters are source_ip and
namespace.

Example Config:

- MultiCDNStorage
- providers:
    TargetName1:
        - ProviderName1
        - porviderConfig1
    Targetname2:
        - ProviderName2
        - ProviderConfig2
  default_provider: TargetName1
  rules:
  - namespace: test
    continent: APAC
    target: TargetName2
2023-02-13 09:59:30 -05:00
Kenny Lee Sin Cheong
4aa84a528c secscan: fix string to int conversion (PROJQUAY-4395) (#1736) 2023-02-02 16:13:07 -05:00
Kenny Lee Sin Cheong
e1985942a6 secscan: handle non backfilled layers_compressed_size (PROJQUAY-4395) (#1734) 2023-02-02 15:04:01 -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
709487b363 secscan: add timeout to indexing requests (#1727) 2023-01-25 12:01:07 -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
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
Brandon Caton
b8cf8932cf ui: Repository settings feature flag (PROJQUAY-4565) (#1677)
Adds feature flag to restrict the repository settings feature.
2022-12-15 16:26:44 -05:00
Brandon Caton
017c4f0ba1 cors: Adding missing method type (PROJQUAY-4800) (#1651)
The PUT method has not been added to the list of cors methods, causing PUT requests to fail.
2022-12-01 15:10:47 -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
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
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
Jonathan King
304087f9c9 cleanup: Remove old validation code (PROJQUAY-4606) (#1562)
- The old validation code is no longer used and can be removed from Quay
2022-10-24 11:02:14 -07:00
Oleg Bulatov
15ea8350db repomirror: Use skopeo list-tags to get repo tags (PROJQUAY-2179) (#1427)
* repomirror: Use skopeo list-tags to get repo tags

`skopeo inspect foo` returns infromation about the image `foo:latest`,
and repository tags. Quay needs only list of tags, so it should use
`skopeo list-tags` that doesn't fail if `foo:latest` doesn't exist.

* Update type hints

* On local-dev Quay does not provide valid TLS certificate
2022-10-12 09:45:04 -04:00
Kenny Lee Sin Cheong
2b3c3cc584 api: feature to limit org creation to superusers (PROJQUAY-1245) (#1516)
* api: feature to limit org creation to superusers

Introduces the following configuration flags:

FEATURE_SUPERUSERS_ORG_CREATION_ONLY:
    Limit org creation to superusers only

FEATURE_SUPERUSERS_FULL_ACCESS:
    Grant superusers read/write access to registry content in all namespaces

FEATURE_RESTRICTED_USERS:
    Users considered as restricted are not anle to create organization

RESTRICTED_USERS_WHITELIST:
    Whitelist for FEATURE_RESTRICTED_USERS

RESTRICTED_USER_INCLUDE_ROBOTS:
    Whether or not to include the user namespace's robots

RESTRICTED_USER_READ_ONLY:
    Only allow read-only operations for restricted users

* Revert superuser repositorylist endpoint
2022-09-23 09:41:23 -04:00
Syed Mushtaq Ahmed
a101553cb1 storage: return S3 url only for ip ranges in the same region (PROJQUAY-4498) (#1539)
This optimization ensures that we return the direct S3 URL for
CloudFront storage only for requests from the same region. This
ensures we don't get charged for cross-region traffic to S3
2022-09-22 10:13:02 -04:00
Dave O'Connor
69ad27724b Add feature flags for IPv6 (#1525)
Signed-off-by: Dave O'Connor <doconnor@redhat.com>
2022-09-12 09:09:39 -04:00
Sunandadadi
5f1fdbc59f ui: Support on Old UI to switch to New UI (PROJQUAY-4124) (#1504)
* Support on Old UI to switch to New UI
2022-08-31 10:33:53 -04:00
Oleg Bulatov
31e5b00b3c Disable active repository tags caching for OCI tests (#1483) 2022-08-26 15:38:13 +02:00
Brandon Caton
30298699fc mirror: Default mirror rollback to false (PROJQUAY-4296) (#1490)
Adds the `REPO_MIRROR_ROLLBACK` option to specify whether the mirror will rollback the state of the repo on failure of any one of the tags. Defaults to false. Adds additional `PARTIAL_SYNC` error status which logs the tags that failed to sync to the console.
2022-08-23 14:27:22 -04:00
Dave O'Connor
4909b0eff9 Remove unused decode (#1473) 2022-08-09 09:33:11 -04:00
Dave O'Connor
db225c3293 Bump PyJWT (#1465) 2022-08-08 11:02:09 -04:00
Harish Govindarajulu
1c8f5df6e2 Add Feature flag to whitelist users from recaptcha check(PROJQUAY-3697) (#1454)
Signed-off-by: harishsurf <hgovinda@redhat.com>
2022-07-22 16:18:45 -04:00
Brandon Caton
9eb4fb6aa4 Revert workqueue refactor (#1456)
Currently the prometheus and GC workers are not running correctly.
Reverting the following commits:
- 4e1a985e70
- dac183a1ef
- 68a0d9eaf0
- af1aacea08
- f334b80098
2022-07-22 13:11:39 -04:00
Syed Mushtaq Ahmed
d37dd766ac api: fix CORS headers, use concat instead of extend (PROJQUAY-4163) (#1445)
Fixes issue where we send large header on CORS
2022-07-19 17:52:09 -04:00
Kenny Lee Sin Cheong
6ed0bcdedc auth: allow rs384 in jwt (PROJQUAY-4148) (#1449)
Allow the use of RS384 for jwt and oidc.
2022-07-18 14:03:27 -04:00
Syed Mushtaq Ahmed
bf99e71851 api: Update werkzeug to 1.0.0 and add valid CORS methods (PROJQUAY-4163) (#1443)
werkzeug 1.0.0 allows us to set samesite policy to "None" for CORS
requests from quay-ui
2022-07-14 14:30:52 -04:00
Kenny Lee Sin Cheong
14c8d13984 mirror: Pass command output to a tempfile instead of pipe (PROJQUAY-3145) (#1417)
The default pipe often has a size limit on most systems, which will be
truncated if going over that limit. That can happen when skopeo is
run with --debug set. To workaround this, use temporary files for
stdout and stderr.
2022-06-29 13:29:32 -04:00