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

12620 Commits

Author SHA1 Message Date
red-hat-konflux[bot]
793385e8d9 fix(deps): update dependency https-proxy-agent to v7
Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
2025-12-05 21:38:27 +00:00
jbpratt
f4957e3e29 chore: remove deprecated reCAPTCHA support (#4690)
Remove reCAPTCHA integration from the password recovery flow
as the feature has been deprecated.

Changes:
- Delete ReCaptcha component
- Remove recaptcha token handling from Signin page
- Simplify UsePasswordRecovery hook
- Remove react-google-recaptcha dependencies
- Clean up test fixtures and CSS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-05 08:10:43 -06:00
Kenny Lee Sin Cheong
5cbdf7ba3c metrics: add support for flask request buckets (PROJQUAY-9853) (#4638)
* metrics: add support for flask request buckets

* Add config flag to schema

* Remove unused function

* Add type annotation for config flag
2025-12-04 10:47:23 -05:00
jbpratt
a5623749f6 chore: chmod +x attachment script (#4680)
this fails otherwise

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-12-03 14:00:28 -06:00
jbpratt
c6d948e11b fix(web): display 0.00 KiB instead of N/A for zero sizes (PROJQUAY-9860) (#4686)
The formatSize() function used a falsy check which treated 0 as invalid,
returning "N/A" instead of formatting it. Now 0 displays as "0.00 KiB"
matching the legacy UI behavior.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 19:44:53 +00:00
jbpratt
ed6ebc3ff6 feat(web): show password setup prompt for OIDC users in CLI config (PROJQUAY-9898) (#4681)
when using OIDC authentication and the user has no password set, display
an info alert with a "Set password" button to guide users through setting
up their CLI password

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 19:05:24 +00:00
jbpratt
52a5a85f7f fix(data): clear pull statistics when tags are deleted (PROJQUAY-9887) (#4667)
When a tag is deleted and re-pushed, pull statistics now start fresh
at 0 instead of persisting from the deleted tag.

Changes:
- Clear TagPullStatistics in _delete_tag()
- Clear TagPullStatistics in remove_tag_from_timemachine()
- Add tests for tag deletion clearing pull statistics
- Add test for re-push scenario starting with fresh stats

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 10:22:39 -06:00
Sunandadadi
acfbf1cb6d fix(web): enable user self-service email changes when FEATURE_MAILING enabled (PROJQUAY-9879) (#4675)
* fix(web): enable user self-service email changes when FEATURE_MAILING enabled (PROJQUAY-9879)

This commit fixes the issue where users received 401 Unauthorized errors
when attempting to update their email address in the new React UI when
FEATURE_MAILING is enabled.

Root cause: ChangeEmailModal was using the superuser-only endpoint
/api/v1/superuser/users/{username}, which regular users cannot access.

Changes:
- Added useChangeEmail hook in UseCurrentUser.ts that calls the correct
  user self-service endpoint /api/v1/user/ for email updates
- Modified ChangeEmailModal to support dual modes (superuser vs user)
  with isSuperuserMode prop for backward compatibility
- Updated GeneralSettings to display email as clickable link when
  FEATURE_MAILING is enabled, opening the modal for email changes
- Pre-fill modal with current email address for better UX
- Added validation to prevent submitting the same email address
- Added 8 comprehensive Cypress e2e tests covering email change flows

The fix implements the proper email verification workflow where users
receive a verification email and must confirm before the change is applied.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fixing tests

* resolving coderabbit suggestion

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 16:07:53 +00:00
Brandon Caton
00a8f57b2a config: defaulting FEATURE_UI_MODELCARD to true (PROJQUAY-9915) (#4678) 2025-12-03 10:03:36 -05:00
jbpratt
20dd65a04d fix(api): return manifest pull stats for digest-only pulls (PROJQUAY-9877) (#4668)
When images are pulled by digest only (not by tag), the API endpoint
was returning 0 for manifest_pull_count because it ignored manifest_stats
when tag_stats was None.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 08:07:30 -06:00
Jordi Piriz
86020012b9 chore: remove not needed load balancer on ROSA deployments (PROJQUAY-0000) (#4673)
Remove not needed load balancer
2025-12-02 12:18:36 -05:00
Deirdre Malone
e8790e844d chore(deps): update go version to 1.24.8 (PROJQUAY-9842) (#4653)
Update go version 1.24.8
Fix for CVE-2025-58183
2025-12-02 15:54:36 +00:00
jbpratt
365f88cf0b chore: remove debug css (#4669)
Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-12-02 15:16:36 +00:00
jbpratt
9337b87f0e fix(web): disable buttons for global readonly superuser (PROJQUAY-9873) (#4665)
Global readonly superusers could click Create Message and Service Key
buttons which then failed with 403 errors. These buttons are now disabled
using the existing useSuperuserPermissions hook's canModify flag.

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-02 08:22:56 -06:00
Ryan Wallace
e0c74cb334 feat(sentry): add more comprehensive filtering (PROJQUAY-9436) (#4641)
* feat(sentry): add more comprehensive filtering

* test: add tests for sentry filtering

* fix: conflicting patterns

* feat: filter out OTEL logs

* feat: add more robust 4xx error filtering

* chore(4xx): test

* fix: potential AttributeError on sentry event object

* fix: rm .tool-versions

* fix: parse status codes as ints

* test: add JWT filtering test

* chore: tighten 4xx exceptions

* test: remove some duplicate tests

* chore: add a default error sampling rate of 0.1

* test: add to buildman/sentry tests

* refactor: combine EXCLUDE_PATTERNS into one list

* chore: remove some duplicated tests
2025-12-01 16:11:07 -05:00
jbpratt
c96d865f8d chore: add workflow to label original PR on backport merge (#4663)
When a cherry-pick PR merges to a redhat-* branch, this workflow
labels the original PR with backported/<branch> to track which
releases contain the fix.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 13:02:13 -06:00
jbpratt
754196f9ac fix(web): use correct terminology in user settings panel (PROJQUAY-9884) (#4659)
The settings page showed "Organization" labels and helper text even
when viewing a user namespace. Changed to conditionally display
"Username" for users and "Organization" for organizations.

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 11:38:48 -06:00
jbpratt
0b8e74f5ac fix(web): resolve user settings log display issues (PROJQUAY-9881) (#4657)
fix(web): fix user settings log display issues (PROJQUAY-9881)

- Fix template interpolation in user_change_tag_expiration log message
- Add usageLogs query invalidation so logs refresh after settings update

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 17:21:04 +00:00
jbpratt
72d1e4f398 fix(web): show user namespace quota for non-superusers (PROJQUAY-9886) (#4658)
Normal users couldn't see their own namespace quota in the Organizations
list Size column. The backend already returns quota_report in /api/v1/user/
but the frontend wasn't using it. Added fallback to use current user's
quota_report when superuser data isn't available.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 11:11:26 -06:00
jbpratt
6bc089b61c fix(web): use correct error modal titles for different operations (PROJQUAY-9874) (#4655)
Previously, all errors on the Organizations page showed "Org deletion failed"
as the modal title, even for unrelated operations like registry size
calculation. This was confusing for Global Readonly Superusers who saw
"Org deletion failed" when trying to calculate registry size.

Changes:
- Separated error states in OrganizationsList.tsx (deletionErr, registryCalcErr)
- Added separate ErrorModal for registry calculation with correct title
- Fixed RepositoriesList.tsx ErrorModal title to "Repository deletion failed"
- Added Cypress test to verify correct error modal title

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 10:22:48 -06:00
jbpratt
37ca1eaf2d fix(web): hide Enable Team Sync when FEATURE_TEAM_SYNCING is false (PROJQUAY-9878) (#4654)
The UI was showing the "Enable OIDC Team Sync" button even when
FEATURE_TEAM_SYNCING was disabled in the config. Added check for
config?.features?.TEAM_SYNCING before displaying the team sync button.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 08:38:16 -06:00
Sunandadadi
e7988418f9 ui: ensure logout redirects to signin on network error (PROJQUAY-9792) (#4652)
fix(ui): ensure logout redirects to signin on network error (PROJQUAY-9792)

When the logout API call fails due to network error, the UI now properly
redirects to the signin page and clears the client-side session. Previously,
the user would be stuck on the current page with an error modal.

Changes:
- Move redirect and cleanup to finally block in logout handler
- Add optional chaining to user.username to prevent undefined errors
- Remove unused addDisplayError import
- Add comprehensive Cypress e2e tests for logout functionality

The finally block ensures client-side logout always succeeds, even when
the server is unreachable, improving security and user experience.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 03:18:36 -06:00
jbpratt
44c7209481 chore: resolve fork PR labeling 403 errors with workflow_run pattern (#4644)
Refactor PR auto-labeling using two-workflow pattern to handle fork PRs
securely. The label-status job is replaced with capture-pr-data (read-only)
and a new pr-status-labeler workflow that runs with write permissions via
workflow_run trigger.

Fixes 403 errors when labeling PRs from forks.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-26 04:16:24 -06:00
jbpratt
cdd8259c14 fix(web): load external scripts only when BILLING enabled (PROJQUAY-9803) (#4623)
Stripe and StatusPage scripts were hardcoded in index.html, causing
85-second delays in air-gapped/restricted networks as browsers waited
for connection timeouts.

Created useExternalScripts hook to dynamically load scripts only when
BILLING feature is enabled. Scripts load asynchronously to prevent
blocking page render. On-premise deployments (BILLING=false) no longer
make external requests.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-25 22:55:10 +00:00
Brandon Caton
f57ac3f67f ui: checking field content in superuser build logs (PROJQUAY-9714) (#4640) 2025-11-25 15:19:16 -05:00
Harish Govindarajulu
a97ca5c231 fix(oauth): prevent redirect URI validation bypass (PROJQUAY-9849) (#4635)
* fix(oauth): prevent redirect URI validation bypass (PROJQUAY-9849)

Co-authored-by: Claude <noreply@anthropic.com>

* test(oauth): add comprehensive coverage for redirect URI validation (PROJQUAY-9849)

Co-authored-by: Claude <noreply@anthropic.com>

* fix(oauth): add percent-encoding protection and improve test coverage (PROJQUAY-9849)

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-25 13:26:38 -05:00
jbpratt
ec1b1ba302 chore: add automated PR labeling workflow (#4608)
Implement GitHub Actions workflow to automatically label pull requests
based on changed files, PR status, and target branch.

Features:
- Area labels (area/api, area/web-ui, etc.) based on file paths
- Status labels (needs-rebase, approved) based on PR state and reviews
- Backport labels (backport/redhat-3.x) for PRs targeting release branches
- Works with PRs from forks using pull_request_target trigger

The workflow uses actions/labeler for path-based labeling and
actions/github-script for dynamic status detection.

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-25 10:25:46 -06:00
Harish Govindarajulu
36dff40df7 fix(ui): show quota consumed column for all users in organizations list (PROJQUAY-9850) (#4634)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-25 19:37:21 +05:30
jbpratt
79f75e24b6 fix(web): display avatars for all entries in org table (PROJQUAY-9749) (#4615)
Previously only organizations and the logged-in user showed avatars.
Now all users and superusers display avatars by passing avatar data
from the API response through component props.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-25 19:36:41 +05:30
jbpratt
b4f1ef63c6 fix(web): hide Add Limit form in view-only quota pages (PROJQUAY-9845) (#4622)
Organization and user quota settings pages are view-only, but were
displaying an empty "Add Limit" form row with disabled controls.
This creates visual clutter and implies users can add limits when
they cannot.

Conditionally render the "Add Limit" card only when !isReadOnly to
match the behavior of the old Angular UI. Update Cypress tests to
verify the form does not exist (not just disabled) in view-only mode.
2025-11-25 04:17:23 -06:00
Sunandadadi
40ee3a5468 ui: prevent redirect to signin after OIDC username confirmation (PROJQUAY-9835) (#4629)
fix(web): prevent redirect to signin after OIDC username confirmation (PROJQUAY-9835)

When users authenticated via OIDC and confirmed their username, they were
incorrectly redirected back to the signin page instead of the home page.

This occurred because the OAuth flow stored the signin page URL in localStorage
as the redirect target. After username confirmation, the app would read this
stored URL and redirect back to signin, creating a loop.

The fix checks if the stored redirect URL contains '/signin' and navigates to
the home page instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-24 21:35:55 +00:00
Brandon Caton
4cddc368e9 ui: surfacing re-prompt for password (PROJQUAY-9844) (#4624) 2025-11-24 21:25:41 +00:00
Brandon Caton
b2141c1d60 ui: fix select during org delete bug (PROJQUAY-9843) (#4628) 2025-11-24 16:13:20 -05:00
jbpratt
f5db7ddb5b fix(web): sort Build History by timestamp instead of string (PROJQUAY-9686) (#4619)
Converts date strings to numeric timestamps for correct chronological sorting
2025-11-24 12:17:49 -06:00
jbpratt
b352135a85 fix(web): validate quota value input accepts only numbers (PROJQUAY-9837) (#4614)
* fix(web): validate quota value input accepts only numbers (PROJQUAY-9837)

Changed Storage Quota input from type="text" to type="number" to prevent
non-numeric characters from being entered. Also enhanced validation to
catch edge cases where parseFloat could incorrectly parse mixed values
like "300xxxx" as 300.

Co-authored-by: Claude <noreply@anthropic.com>

* chore: move quota test seeding

locally the test goes from 8 minutes to 55 seconds :)

Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-24 13:04:38 -05:00
Jordi Piriz
e22619d4fa chore: Add Nodeport svc to handle Ingress traffic (PROJQUAY-0000) (#4626)
Add svc annotations parameter
2025-11-24 12:22:27 -05:00
Dave O'Connor
90803ded95 fix(quota): block quota write operations without SUPERUSERS_FULL_ACCESS (PROJQUAY-9833) (#4617)
When FEATURE_SUPERUSERS_FULL_ACCESS=false, regular superusers could
create/update/delete quotas for other users' organizations (returning 201/200),
but couldn't view them (returning 403). This was a security bug - both read
and write operations should require FULL_ACCESS permission to access other
organizations' quotas.

Root cause: Organization quota write endpoints used SuperUserPermission().can()
instead of allow_if_superuser_with_full_access(), allowing any superuser to
modify other orgs' quotas regardless of the FULL_ACCESS setting.

Changes:
- endpoints/api/namespacequota.py: Replace SuperUserPermission().can() with
  allow_if_superuser_with_full_access() in all quota write operations:
  * OrganizationQuotaList.post() - create quota
  * OrganizationQuota.put() - update quota
  * OrganizationQuota.delete() - delete quota
  * OrganizationQuotaLimitList.post() - create quota limit
  * OrganizationQuotaLimit.put() - update quota limit
  * OrganizationQuotaLimit.delete() - delete quota limit

- endpoints/api/test/test_superuser_full_access.py: Add comprehensive tests
  for quota operations with and without FULL_ACCESS enabled (6 new tests)

Note: Superuser panel endpoints (/v1/superuser/users/<namespace>/quota)
were intentionally NOT changed - these are admin panel functions that should
work with basic superuser permission, consistent with other panel operations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-24 17:13:44 +00:00
Frank Villaro-Dixon
8b0eb84b43 fix(secscan): Don't show inexistant stacktrace (#4526)
`logger.exception` prints the stacktrace. However in this case there is
no stacktrace to output, as we are not inside an exception. This results
in log lines where the stack trace (`NoneType: None`) is confusing:
```
securityworker stdout | 2025-11-17 08:59:21,431 [102] [ERROR] [util.secscan.v4.api] Security scanner endpoint responded with non-200 HTTP status code: 500
securityworker stdout | NoneType: None
```

This commit fixes that

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
2025-11-24 10:21:44 -05:00
Harish Govindarajulu
63cb0c0920 fix(web): add CSRF protection to assign_user_to_app endpoint (PROJQUAY-9836) (#4616) 2025-11-24 14:56:01 +00:00
Jordi Piriz
30b7c01b80 chore: Add Nodeport svc to handle Ingress traffic (PROJQUAY-0000) (#4618)
Fix typo
2025-11-24 09:47:59 -05:00
Jordi Piriz
9e269e0ab7 chore: Add Nodeport svc to handle Ingress traffic (PROJQUAY-0000) (#4612)
Add NodePort service to route Ingress traffic
2025-11-24 09:19:33 -05:00
jbpratt
32fa8f31dc chore: add repomirror to local dev (#4600)
Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-24 13:42:35 +00:00
jbpratt
71d219cc35 fix(test): prevent MySQL deadlocks in parallel proxy model tests (PROJQUAY-0000) (#4605)
* fix(test): prevent MySQL deadlocks in parallel proxy model tests (PROJQUAY-0000)

Mark all registry proxy model test classes to run serially using
pytest-xdist group markers. These tests all use the same "quayio-cache"
organization and were causing MySQL deadlocks when run in parallel
across multiple workers with pytest -n auto.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(test): resolve Flask app naming conflict in quotaregistrysizeworker tests (PROJQUAY-0000)

Import Flask app with alias to avoid conflict with pytest 'app' fixture.
The test was using 'app.config' but 'app' resolved to a pytest fixture
definition instead of the Flask application object.

Follows the same pattern as test_securityscanningnotificationworker.py.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Brady Pratt <bpratt@redhat.com>

---------

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-24 15:28:34 +05:30
jbpratt
bb31def220 chore: fix account settings navigation (#4607)
don't reload the page, use react router to navigate smoothly

Signed-off-by: Brady Pratt <bpratt@redhat.com>
2025-11-24 10:46:15 +05:30
Ryan Wallace
9336f46c00 chore: add service account annotations to the ROSA template (PROJQUAY-9228) (#4601)
chore: add service account annotations to the ROSA template

This is required for IRSA auth, where we will replace that empty value with eks.amazonaws.com/role-arn = "foo"
2025-11-21 09:17:16 -05:00
jbpratt
9d0e3d29bc fix(ui): preserve mirroring credentials when updating tag pattern (PROJQUAY-9608) (#4410)
When updating mirroring configuration fields like tag patterns, credentials
were being cleared because the password field is empty by default for security.

Modified UseMirroringConfig to conditionally exclude credentials from the
update payload when the password field is empty and updating existing config.
This matches the Angular UI behavior where only changed fields are sent.

Added Cypress tests to verify credentials are preserved when updating other
fields without changing the password, and that credentials are included when
explicitly updated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 22:57:36 +00:00
Brandon Caton
431094e244 ui: normalize user settings tabs (PROJQUAY-9814) (#4597) 2025-11-20 20:06:17 +00:00
Sunandadadi
fc913d0f18 ui: redirect new UI super user for fresh login when authentication type is OIDC (PROJQUAY-9748) (#4571)
* ui: redirect new UI super user for fresh login when authentication type is OIDC (PROJQUAY-9748)

* test(ui): Fix Cypress tests for fresh login OIDC flow (PROJQUAY-9748)

- Fixed incorrect API endpoint (/api/v1/superuser/logs* instead of /api/v1/superuserlogs**)
- Fixed incorrect route (/usage-logs instead of /superuser/usagelogs)
- Added proper authentication setup using cy.loginByCSRF
- Used fixtures (config.json, superuser.json) following existing test patterns
- Simplified tests to 3 critical cases: OIDC redirect, query param preservation, Database modal

---------

Co-authored-by: harishsurf <hgovinda@redhat.com>
2025-11-20 12:47:15 -05:00
jbpratt
c4847bc4b8 chore: add /about and /security static pages to new UI (#4592)
adds two new static information pages to the React UI:
- /about page with company info cards and bill-of-materials table
- /security page with security practices and features documentation

implementation includes:
- PatternFly components for consistent UI design
- sortable/filterable packages table with pagination
- actual CoreOS and Red Hat logos
- nginx routing configuration for new paths
- webpack config updates to handle image assets from src/assets

Signed-off-by: Brady Pratt <bpratt@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 16:08:40 +00:00
Brandon Caton
aa3079b2a6 ui: adding redirect to update info page (PROJQUAY-9744) (#4579) 2025-11-20 10:41:00 -05:00