* docs(api): fix 15 swagger gaps — descriptions, responses, lint rules
- Add missing description/summary to deleteProjectMember,
UpdateImmuRule, DeleteImmuRule, listUsers, getCurrentUserInfo,
getUser, updateUserProfile, setUserSysAdmin,
getCurrentUserPermissions, listSchedules, getSchedulePaused
- Add accurate error responses traced to handler code:
404 on member/immutable ops (RequireProjectAccess paths),
403+500 on listAuditLogEventTypes (RequireSystemAccess),
412 on getCurrentUserInfo (non-local security context),
400 on listSchedules/getSchedulePaused/updateUserProfile,
401+500 on getRentenitionMetadata (Prepare middleware),
500 on pingOIDC
- Remove inaccurate responses: 404 from getSchedulePaused/
listSchedules/updateUserProfile; 403 from getSchedulePaused;
500 from getCurrentUserPermissions (in-memory only)
- Fix inline 500/401 descriptions in setUserSysAdmin and
getCurrentUserPermissions to use shared definitions
- Add operation-description and operation-summary-required rules
to .spectral.yaml to prevent regression
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
* chore: complete swagger changes for harbor-cli well known issues
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
* docs(api): restore response codes removed in error from schedules and user endpoints
- Restore 404 on listSchedules (GET /schedules)
- Restore 403 and 404 on getSchedulePaused (GET /schedules/{job_type}/paused)
- Restore 404 on updateUserProfile (PUT /users/{id})
- Restore 500 on getCurrentUserPermissions (GET /users/current/permissions)
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
* fix: clean up binaries
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
* fix: add needed statements for spectral linting and api tests
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
* fix: add changes for unsupported entity; more clear description
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrick Eschenbach <45457307+qcserestipy@users.noreply.github.com>
* fix: add changes for unsupported entity; more clear description
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrick Eschenbach <45457307+qcserestipy@users.noreply.github.com>
* fix: add changes for unsupported entity; more clear description
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
---------
Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Signed-off-by: Patrick Eschenbach <45457307+qcserestipy@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Add UI option to enable proxy cache referrer API (#22767)
Expose the proxy_referrer_api setting in the portal for proxy-cache
projects (create project and policy configuration), with i18n strings.
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
* Swagger Replication Rule invalid JSON
The 'type' field in ReplicationFilter schema caused JSON serialization issues
because swagger codegen generates it as a required string field, but the actual
value is interface{} which can be string, []string, or other types depending on
the filter type.
Removing the 'type' field from the schema fixes serialization while maintaining
backward compatibility, as the field wasn't documented or used by clients.
Changes:
- Remove 'type' from ReplicationFilter schema in swagger.yaml
- Simplify filter conversion logic in handler
- Add validation to skip invalid filters
- Add comprehensive tests for filter handling
Signed-off-by: Matteo Limardo <mlimardo@mirantis.com>
remove converFilterValue func
Signed-off-by: Matteo Limardo <mlimardo@mirantis.com>
* Update api/v2.0/swagger.yaml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Vadim Bauer <Bauer.vadim@gmail.com>
---------
Signed-off-by: Matteo Limardo <mlimardo@mirantis.com>
Signed-off-by: Vadim Bauer <Bauer.vadim@gmail.com>
Co-authored-by: Vadim Bauer <Bauer.vadim@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fix#22582
Harbor doesn't support for creating a immutable tag. Updates the swagger to limit name field only for tag creation.
There is no breaking change.
Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
* add per-endpoint CA certificate support for registry endpoints
fixes#22203
Allowing Harbor to trust self-signed or private CA certificates for individual registry endpoints without modifying the system-level trust store.
1. Database schema changes, API updates with PEM validation.
2. HTTP transport layer modifications across all the registry adapters.
3. UI field to fill in the certificate.
The feature is backward compatible - existing installations using system-level CA trust will continue to work without any changes.
Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
* resolve lint failures
Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
* add i18n changes
Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
* resolve review comments
Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
* make the input as non-required and updates i18n
Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
* resolve comments
Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
---------
Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
feat(replication): add Single Active Replication per policy
* Added single_active_replication field to schema & DB table
* Updated API, controller & handler to enforce single execution per policy
* Added checkbox in UI to enable/disable single_active_replication for a
policy
* Implemented necessary backend & frontend tests
* Prevents parallel runs per policy if single_active_replication is enabled
Signed-off-by: bupd <bupdprasanth@gmail.com>
This commit makes change to the API GET /api/v2.0/vul to make it include
"status" of CVEs in the response.
It also makes update in the UI to add the "Status" column to the data
grids in security hub and artifact details page.
Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
* oidclogout
enable oidc session logout
1, give the option of logging out user session from OIDC provider.
2, try best to log out the user offline session if the offline_access in the scope.
Signed-off-by: wang yan <wangyan@vmware.com>
Add the field extra_attrs to the p2p preheat policy for the provider to
define their specified parameters when preheating.
Signed-off-by: chlins <chlins.zhang@gmail.com>
Parallel attach LDAP group
Add configure LDAP group attach parallel UI
Change the /c/login timeout from 60 (nginx default) to 900 seconds in nginx.conf
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
* add list project arifacts API
This API supports listing all artifacts belonging to a specified project. It also allows fetching the latest artifact
in each repositry, with the option to filter by either media_type or artifact_type.
Signed-off-by: wang yan <wangyan@vmware.com>
* resolve the comments
Signed-off-by: wang yan <wangyan@vmware.com>
---------
Signed-off-by: wang yan <wangyan@vmware.com>
* add stop sbom scanning API
1. [UI] support to stop sbom scanning #20200
2. add type for stop scanning api, make it able to support both vulnerability and sbom.
3. refactor the db query to support multiple extra attributes.
Signed-off-by: wang yan <wangyan@vmware.com>
Signed-off-by: xuelichao <xuel@vmware.com>
Co-authored-by: xuelichao <xuel@vmware.com>
The permission api targets to return the full set of permissons for robot to use.
And only system and project admin have the access
Signed-off-by: wang yan <wangyan@vmware.com>