1
0
mirror of https://github.com/goharbor/harbor.git synced 2026-10-26 09:59:33 +03:00
Commit Graph

1433 Commits

Author SHA1 Message Date
dependabot[bot]
4a09f715e1 chore(deps-dev): bump pygments from 2.19.2 to 2.20.0 in /make/photon/prepare (#23053)
chore(deps-dev): bump pygments in /make/photon/prepare

Bumps [pygments](https://github.com/pygments/pygments) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.19.2...2.20.0)

---
updated-dependencies:
- dependency-name: pygments
  dependency-version: 2.20.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-02 09:05:14 +00:00
Yannick Müller
687298935d fix: increase access_key column length to 4096 (#23414)
Signed-off-by: Yannick Müller <mail@ynnk.dev>
2026-06-22 09:54:35 +00:00
Wang Yan
c8ed06b1df fix(build): pin Photon base to stable multi-arch digest (#23352)
The latest upstream photon:5.0 arm64 image currently has an empty rootfs,
which fails during the multi-arch base build with "/bin/sh: no such file
or directory". Pin the Photon base to a known-good stable digest to keep
the amd64 and arm64 builds reproducible.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
2026-06-12 10:09:24 +08:00
Wang Yan
8ee16b8074 fix: solve db build conflict and robustify workflow repo list saving (#23350)
pin qemu binfmt and prevent publish races

- Pin docker/setup-qemu-action to tonistiigi/binfmt:qemu-v9.2.2 for stable arm64 emulation.
- Add per-branch concurrency in build-package workflow to avoid overlapping runs racing on mutable tags/manifests.
- Rename Go setup step label to match the actual configured version.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
2026-06-11 12:09:26 +00:00
Wang Yan
a37374efe9 Harden crypto usage and drop unused SMTP package (#23307)
- Use stdlib crypto/pbkdf2 instead of golang.org/x/crypto/pbkdf2 for
  password/secret hashing (output unchanged; no migration needed).
- Restrict JWT signing to RSA/RSA-PSS and reject other methods in
  pkg/token (default RS256 unchanged).
- Remove unused common/utils/email package (no references in codebase).

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2026-06-11 14:48:09 +08:00
Vadim Bauer
7d0cac2a6f fix: publish harbor-*-base images as multi-arch manifests (#23348)
The per-component base images (goharbor/harbor-core-base, harbor-db-base,
harbor-portal-base, ...) were pushed by both BUILD_PACKAGE matrix jobs to the
same unsuffixed tag (e.g. :dev), so whichever architecture finished last
overwrote the other and the published tag ended up single-arch — the same
last-writer-wins problem goharbor/photon:5.0 had before #23334 (#23324).

Apply the same pattern already used for the component images:

- make/photon/Makefile: _build_base keeps building the local unsuffixed tag
  (component Dockerfiles build FROM it unchanged) but pushes an arch-suffixed
  tag instead: harbor-<name>-base:<tag>-amd64 / -arm64.
- .github/workflows/build-package.yml: each matrix job also saves the list of
  goharbor/*-base repos it built; CREATE_MANIFEST combines the two suffixed
  tags into the unsuffixed multi-arch manifest with docker buildx imagetools
  create, using the base tag scheme (dev on main, the release version on
  release-* branches). The base manifest step only runs when BUILD_BASE_IMAGE
  decided to rebuild bases, since otherwise no suffixed tags were pushed in
  this run.

Consumers that pull harbor-*-base:<tag> (PULL_BASE_FROM_DOCKERHUB=true flows)
now resolve the correct architecture via the manifest list instead of getting
whatever architecture won the race.

Signed-off-by: Vadim Bauer <vb@container-registry.com>
2026-06-11 10:37:45 +08:00
Ashish Patel
a821bae24a feat(portal): upgrade Angular to v21, Clarity to v18, Node.js to v22 (#22937 (#23078)
Upgrade Harbor UI to Angular 21, Clarity v18, and Node.js v22

- Upgrade the Harbor UI (src/portal) from Angular 16 to Angular 19 and subsequently to Angular 21.
- Upgrade VMware Clarity from v17 to v18, and Node.js from v20 to v22 (updated .nvmrc, CI.yml, Makefile, Dockerfile).
- Migrate Angular templates to the new @if/@for control flow syntax.
- Fix UI issues #1 through #35, including robot accounts, layout, dropdown overlay, and input styling.
- Fix unit tests: resolve NG0100 ExpressionChangedAfterItHasBeenCheckedError in policy.component.spec.ts, replace autoDetectChanges(true) with explicit detectChanges cycles, and use TestBed.overrideComponent to stub AddP2pPolicyComponent template.
- Fix Clarity v18 breaking changes: update dark-theme SCSS import, add cds-theme attribute for theming, update ClrDatagridStateInterface import path, add ClrIconModule to app module.
- Stabilize npm installs and resolve CI/CD pipeline hangs.
- Fix swagger-ui crash caused by React 19 createRoot removal:
  - swagger-ui 5.28+ resolves a nested react-dom@19 which removed createRoot
    from the main react-dom entry point (moved to react-dom/client). The
    swagger-ui-es-bundle-core.js still imports createRoot from react-dom,
    making it undefined and causing "TypeError: i is not a function" at render.
  - app-swagger-ui/webpack.prod.js: alias bare 'swagger-ui' import to
    swagger-ui-bundle.js (the standalone UMD build that ships with React 18
    already bundled), bypassing the broken external react-dom@19 entirely.
  - app-swagger-ui/package.json: add npm overrides to pin react and
    react-dom to ^18.3.1 so future npm installs do not re-introduce React 19.
  - angular.json: expose swagger-ui.bundle.js and swagger-ui-index.html
    from app-swagger-ui/dist as Angular dev-server assets, enabling the
    proxy to serve the locally built, fixed bundle during development.
- Convert eslint-plugin-header config from JSON to JS to apply the ESLint 9 schema fix at config-load time, removing the need for patch-package.
- Pin all dependency versions to exact installed versions from the lock file, and remove unused prettier-eslint package.
- Fix flake in P2pProviderService unit test by initializing date with 0 milliseconds to prevent cross-second duration calculation mismatches.

Signed-off-by: Ashish Patel <zoom2ashish@gmail.com>
Co-authored-by: stonezdj <stone.zhang@broadcom.com>
2026-06-09 15:16:20 +00:00
Vadim Bauer
2b29348cbd fix: publish goharbor/photon:5.0 as a multi-arch manifest (#23324) (#23334)
goharbor/photon:5.0 was built and pushed independently by both the amd64 and
arm64 BUILD_PACKAGE matrix jobs to the same tag, so whichever job finished last
overwrote the other and the published tag ended up single-arch ("sometimes
amd64, sometimes arm64", #23324).

Build it once as an amd64+arm64 manifest list in a dedicated BUILD_BASE_IMAGE
job that BUILD_PACKAGE depends on, and exclude goharbor/photon from the
component manifest list in CREATE_MANIFEST (it is published here and stays at
tag 5.0).

The db base image keeps the photon-snapshot repo (the stable Photon source) and
installs both postgresql15-server (old binaries at /usr/pgsql/15/bin, required
by pg_upgrade) and postgresql18-server (runtime), temporarily un-pinning the
snapshot to pull whichever major Photon has deprecated out of the current
snapshot per architecture (pg15 on amd64, pg18 on arm64). common/Dockerfile
keeps photon-snapshot and merges its setup into a single RUN.

Signed-off-by: Vadim Bauer <vb@container-registry.com>
2026-06-09 22:04:47 +08:00
Prasanth Baskar
a4b9d434b1 fix: use Photon updates repo for base images (#23316)
fix: support pg18 install on arm64

Signed-off-by: Prasanth Baskar <bupdprasanth@gmail.com>
2026-06-09 03:30:56 +00:00
Mandepudi Rani Chowdary
eb944bb199 fix: build valkey from source to support arm64 (#23282)
fix: support arm64 valkey build while preserving amd64 package path

- Keep amd64 behavior unchanged with tdnf install of valkey
- Isolate source-build fallback to arm64 only
- Verify source tarball with SHA256
- Move valkey version/checksum definition to root Makefile and pass as build args

Signed-off-by: ranimandepudi <ranichowdary.mandepudi@arm.com>
2026-06-02 08:17:10 +00:00
jUDASmILE
2f79ecceb5 remove install net-tools from db dockerfile as photon removed it (#23266)
remove install net-tools from db dockerfile as photon removed it from repo already

Signed-off-by: jUDASmILE <judasmile@gmail.com>
2026-05-21 03:23:50 +00:00
Wang Yan
bbe79cae65 bump pg to v18 (#23184)
currently harbor is using the pg 15, I will use this pull request to bump it to pg 18.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2026-05-21 10:32:06 +08:00
jUDASmILE
33b363c81b Rebuild goharbor/photon image before create new harbor base images (#23248)
* refresh goharbor photon:5.0 when create new base image

Signed-off-by: jUDASmILE <judasmile@gmail.com>

* correct date and format in buildbaselog

Signed-off-by: jUDASmILE <judasmile@gmail.com>

---------

Signed-off-by: jUDASmILE <judasmile@gmail.com>
2026-05-18 10:01:58 +00:00
Mandepudi Rani Chowdary
18f7abd8ed Full Multi-Architecture Enablement for Harbor (amd64 + arm64) (#22311)
Co-authored-by: Orlix <7236111+OrlinVasilev@users.noreply.github.com>
Co-authored-by: Vadim Bauer <vb@container-registry.com>
Co-authored-by: Vadim Bauer <Bauer.vadim@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: bupd <bupdprasanth@gmail.com>
2026-05-12 09:03:22 +02:00
stonezdj(Daojun Zhang)
729e277d69 Support custom PyPI index URL for prepare image builds (#23205)
build: support custom PyPI index URL for prepare image builds

Pass PIP_INDEX_URL through the make build chain as a Docker --build-arg,
mirroring the existing NPM_REGISTRY pattern for the portal build.

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-05-08 02:23:40 +00:00
Chlins Zhang
88ab66244e feat: replace redis with valkey as cache backend (#23157)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-04-28 14:59:43 +08:00
stonezdj(Daojun Zhang)
914738c3f1 Update artifact_accessory to add source column to identify accessory (#23144)
Add project_metadata config item proxy_referrer_api
   Rename getRemoteRepo to GetRemoteRepo

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-04-24 08:11:28 +00:00
Anurag Ojha
4cedb8c0e2 fix(exporter): add Docker HEALTHCHECK (#22778)
* Add Docker HEALTHCHECK for harbor-exporter

Signed-off-by: intojhanurag <aojharaj2004@gmail.com>

* configurable port use

Signed-off-by: intojhanurag <aojharaj2004@gmail.com>

* add comment

Signed-off-by: intojhanurag <aojharaj2004@gmail.com>

---------

Signed-off-by: intojhanurag <aojharaj2004@gmail.com>
Co-authored-by: Chlins Zhang <chlins.zhang@gmail.com>
2026-04-22 04:06:19 +00:00
Wang Yan
b173fc3f0a fix db scheme migration issue (#22998)
we should not put the changes of v2.15.0 into the v2.14.1, create an 180 db scheme for v2.15.0

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2026-03-16 17:00:57 +08:00
Wang Yan
6ab025c5bd add the 2.14.1 sql into main (#22947)
since we introduces a change on sql in the v2.14.1, it should be maintained the same version 171 in main, rather than adding the sql into the 180.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2026-03-06 14:51:19 +08:00
miner
2cbdacff87 update version for prepare migrate script (#22805)
Signed-off-by: my036811 <miner.yang@broadcom.com>
2026-02-03 16:50:27 +08:00
miner
56e9958e83 add prepare migration script for 2.15.0 (#22788)
Signed-off-by: my036811 <miner.yang@broadcom.com>
2026-01-30 15:28:02 +08:00
Quentin B.
aafc47d7fa add support for configure trivy db repository via harbor.yml (#21193)
Add support for trivy db_repository and java_db_repository

Signed-off-by: Quentin Bouteiller <quentin.bouteiller@values-associates.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
Co-authored-by: miner <miner.yang@broadcom.com>
2026-01-29 08:56:41 +00:00
stonezdj(Daojun Zhang)
e8d78eb110 Revert "Proxy the referrer's API to upstream registry" (#22779)
Revert "Proxy the referrer's API to upstream registry (#22746)"

This reverts commit 30ba1b3cd3.

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-01-27 10:14:23 +00:00
stonezdj(Daojun Zhang)
30ba1b3cd3 Proxy the referrer's API to upstream registry (#22746)
Signed-off-by: stonezdj <stonezdj@gmail.com>
2026-01-26 08:00:54 +00:00
miner
a8343d3c7d support parse redis acl for registry config (#22770)
Signed-off-by: my036811 <miner.yang@broadcom.com>
2026-01-23 08:19:16 +00:00
Vadim Bauer
6606d184f5 fix(exporter): Export Harbor version via Prometheus exporter binary. (#22733)
fix(exporter): bake Harbor version into exporter binary at build time

Signed-off-by: Vadim Bauer <vb@container-registry.com>
2026-01-22 16:01:19 +08:00
Ikram ALOUI
e7f0333979 Add Cosign keyless signing for Harbor release artifacts (#22578)
* feat: implement keyless signing in release workflow

- Move signing from build to release workflow
- Use .sigstore.json naming convention (Sigstore standard)
- update signature verification documentation and readme file
- Update workflows to sign artifacts at release time only

Signed-off-by: Aloui-Ikram <ikram@container-registry.com>

* WIP: update release workflow and utils

Signed-off-by: Aloui-Ikram <ikram@container-registry.com>

* Add Cosign signing and fix accidental deletions

- Add Cosign signing to releases for security
- Revert to using getAssets function
- Restore latest installer uploads
- Restore pre-release comment

Signed-off-by: Aloui-Ikram <ikram@container-registry.com>

* Remove braces from variable names for consistency

Signed-off-by: Aloui-Ikram <ikram@container-registry.com>

* Remove unnecessary permissions from build-package.yml

Signed-off-by: Aloui-Ikram <ikram@container-registry.com>

---------

Signed-off-by: Aloui-Ikram <ikram@container-registry.com>
Co-authored-by: Aloui-Ikram <ikram@container-registry.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-01-13 09:47:28 +00:00
Wang Yan
7f5ac5b57b add per-endpoint CA certificate support for registry endpoints (#22535)
* 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>
2026-01-13 17:10:22 +08:00
Wang Yan
c305a80616 refactor the logic to init skip_audit_log_database (#22493)
simplify the sql to set the value of skip_audit_log_database, any evidence of previous usage of db to record the audit, set it to false.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2025-10-24 10:22:38 +00:00
Wang Yan
c878bbf98f add migraiton sql for skip_audit_log_database (#22487)
give the value of skip_audit_log_database bases on the real usage.

1. If audit logs exist in the system (either in audit_log or audit_log_ext tables),
   set skip_audit_log_database to false
2. If no audit logs exist but the tables show evidence of previous usage
   set skip_audit_log_database to false

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2025-10-23 07:19:23 +00:00
Max Fröhlich
26b61390a0 Remove unused SYNC_QUOTA from env.jinja template (#22280)
Remove SYNC_QUOTA from env.jinja template

`SYNC_QUOTA` is not used throughout the whole code.

It looks like the feature using it was removed.

Signed-off-by: Max Fröhlich <maxbruchmann@gmail.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
2025-09-01 16:31:56 +08:00
miner
e80b940942 add prepare migration script for 2.14.0 (#22247)
Signed-off-by: my036811 <miner.yang@broadcom.com>
2025-08-13 08:38:27 +00:00
Prasanth Baskar
221037378a feat: Single Active Replication (#21347)
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>
2025-08-11 18:02:56 +08:00
Wang Yan
9f809f17ba update the support list of proxy cache (#22237)
According to PR #22198, some inactive adapters have been removed from the default adapter list.
This pull request updates PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE accordingly, since the list of proxy cache adapters should be a subset of the replication adapters.

Signed-off-by: wy65701436 <wangyan@vmware.com>
2025-08-11 08:20:31 +00:00
Wang Yan
de657686b3 add the replicaiton adapter whitelist (#22198)
fixes #21925

According to https://github.com/goharbor/harbor/wiki/Harbor-Replicaiton-Adapter-Owner, some replication adapters are no longer actively maintained by the Harbor community. To address this, a whitelist environment variable is introduced to define the list of actively supported adapters, which will be used by the Harbor portal and API to display and allow usage.

If you still wish to view and use the unsupported or inactive adapters, you must manually update the whitelist and include the desired adapter names. For the list of adapter names, refer to https://github.com/goharbor/harbor/blob/main/src/pkg/reg/model/registry.go#L22

Signed-off-by: wang yan <wangyan@vmware.com>
2025-07-23 10:25:21 +00:00
stonezdj(Daojun Zhang)
ebdfb547ba Set MAX_JOB_DURATION_SECONDS from jobservice config.yml (#22116)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2025-07-18 10:01:18 +00:00
Daniel Jiang
19f4958ec3 Add "status" of CVEs to artfact scan report (#22177)
This commit adds the field "status" to the struct of a vulnerability and adds
column "status" to vulnerability record table.  It makes sure the statuses
of CVEs returned by trivy scanner are persisted and can be returned via
the vulnerabilities addition API of an artifact.

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2025-07-16 11:11:40 +08:00
miner
2565491758 add BUILD_INSTALLER parameter for optionally build prepare and log container (#22148)
add BUILD_INSTALLER parameter to optionally build prepare and log container only when we need to build offline_installer

Signed-off-by: my036811 <miner.yang@broadcom.com>
2025-07-03 18:23:17 +08:00
miner
0a3c06d89c add dockernetwork parameter for build process (#22138)
add dockernetwork parameter for makefile

Signed-off-by: my036811 <miner.yang@broadcom.com>
2025-07-03 15:33:25 +08:00
miner
0c5d82e9d4 Update pipenv for prepare (#22124)
* update pipenv and lock

Signed-off-by: my036811 <miner.yang@broadcom.com>

* update pipenv

Signed-off-by: my036811 <miner.yang@broadcom.com>

---------

Signed-off-by: my036811 <miner.yang@broadcom.com>
2025-07-01 14:23:05 +08:00
Wang Yan
85f3f792e4 update robot permission table (#21989)
fixes #21947

Signed-off-by: wang yan <wangyan@vmware.com>
2025-05-13 05:49:01 +00:00
Wang Yan
b3cfe225db unify the golang image version (#21935)
Make the golang version as a unified parameter to build all harbor components

Signed-off-by: wang yan <wangyan@vmware.com>
2025-04-27 14:07:19 +08:00
miner
f8f1994c9e fix jobservice container loglevel consistent with job_log (#21874)
Signed-off-by: yminer <miner.yang@broadcom.com>
2025-04-15 14:07:39 +08:00
Wang Yan
e216f6beb9 bump up golang version (#21813)
Signed-off-by: wang yan <wangyan@vmware.com>
2025-04-02 13:58:49 +08:00
Wang Yan
a16caa5ab7 update golang to v1.23.7 (#21749)
Signed-off-by: wang yan <wangyan@vmware.com>
2025-03-18 18:52:02 +08:00
miner
229a27ff41 add prepare migration script for 2.13.0 (#21680)
Signed-off-by: yminer <miner.yang@broadcom.com>
2025-03-11 07:48:22 +00:00
miner
3b8c18fd26 update tlsOptions for external redis (#21681)
Signed-off-by: yminer <miner.yang@broadcom.com>
Co-authored-by: yminer <miner.yang@broadcom.com>
2025-03-10 11:45:18 +00:00
miner
fef95244fc remove redis sentinel patch from builder (#21679)
Signed-off-by: yminer <miner.yang@broadcom.com>
Co-authored-by: yminer <miner.yang@broadcom.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
2025-03-04 15:19:05 +08:00
stonezdj(Daojun Zhang)
b9528d8deb Adjust the audit_log_ext column size to keep align with audit_log table (#21678)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2025-02-27 10:17:04 +00:00