Commit Graph

5424 Commits

Author SHA1 Message Date
MinerYang
a412fb7943
update image extra attributes author in labels (#17294)
Signed-off-by: yminer <yminer@vmware.com>
2022-08-03 13:56:09 +08:00
Wang Yan
fe37fb7384
[cherry-pick] update session log level (#17304)
update session log level

To avoid too much noise in the core log, udpate the level to debug.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-08-03 13:51:40 +08:00
stonezdj(Daojun Zhang)
d0c3463286
(cherry-pick) Return time.Time{} when cron string is empty (#17290)
Return time.Time{} when cron string is empty
  change log level to debug to avoid noise

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-08-02 21:57:40 +08:00
Chenyu Zhang
61ca208f8d
upgrade: bump up beego to 1.12.11 (#17278)
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-07-30 23:29:40 +08:00
Shijun Sun
cb21c7c035
[Cherry-pick]Fix null pointer issue for creating reolication rule (#17276)
Fix null pointer issue for creating reolication rule

Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-07-30 17:17:47 +08:00
Shijun Sun
7e7ae7ea1b
Add permission check to CVE export (#17267)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-07-29 19:48:39 +08:00
Shijun Sun
04fa3853c9
Fix router issues for UI (#17235)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-07-29 19:04:01 +08:00
Chenyu Zhang
bff4e13087
fix: export cve adds resource check and project validation (#17265)
1. Add resource permission check for API handler
2. Validate export cve params project
3. Optimize friendly human message when execution status is error

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-07-29 19:01:46 +08:00
Chenyu Zhang
19e73174e2
refactor: refact codebase of cve export process and filter (#17254)
1. Refact the scan export FilterProcessor interface
2. Optmize the sql template for export cve report
3. Update the process of cve export job

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-07-28 16:05:12 +08:00
Wang Yan
02c41573d6
fix update robot regression (#17248)
Only check the project id for the project level robot

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-07-27 20:13:46 +08:00
MinerYang
f7ebf20d2e
Disable Nydus middleware for v2.6 (#17233)
disable nydus middleware for v2.6

Signed-off-by: yminer <yminer@vmware.com>

remove nyduus module import in main.go

Signed-off-by: yminer <yminer@vmware.com>
2022-07-27 08:41:33 +08:00
prahaladdarkin
d53af792ad
Fixes for various bugs/issues logged as a part of the test day. (#17232)
Closes:
* CVE Data Export API IDOR issue
* https://github.com/goharbor/harbor/issues/17199
* https://github.com/goharbor/harbor/issues/17193
* https://github.com/goharbor/harbor/issues/17188
* https://github.com/goharbor/harbor/issues/17184

Signed-off-by: prahaladdarkin <prahaladd@vmware.com>
2022-07-26 16:50:54 +08:00
Wang Yan
02eae9dede
Filter out accessory from list artifact results (#17231)
Fixed #17145
1, Filter out the accessory from the artifact list.
2, Disable the display func of the accessory interface, currently this will not impact any kind of accessory, like signature and nydus. If we'd like to introduce it, it needs to resolve the pagiation issue of artifact list.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-07-26 00:38:05 +08:00
Abirdcfly
2fece8c9ea
delete duplicate import and use ST1019 in golangci-lint (#17211)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-25 14:12:00 +08:00
Shijun Sun
e9855a88dd
Fix cve export UI issues (#17227)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-07-25 10:41:44 +08:00
stonezdj(Daojun Zhang)
712419778a
Return bad request if audit log retention hour > 240000 hour (#17217)
Cap the retention hour to 240000 hour
  Fixes #17198

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-07-22 15:14:10 +08:00
stonezdj(Daojun Zhang)
8e876d847c
Add resource type in forward audit log (#17216)
Add resource type when forward audit log

  fixes #17201

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-07-22 09:54:07 +08:00
Shijun Sun
56e669ebbc
Fix log rotation UI issues (#17220)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-07-21 16:49:26 +08:00
Shengwen YU
acc2872fa8
fix: remove redundant check due to always false (#17206)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2022-07-20 16:53:56 +08:00
Loong Dai
09371b48e8
lint: sort imports (#17131)
* lint: add goimports

Signed-off-by: Loong Dai <loong.dai@intel.com>
2022-07-20 11:33:08 +08:00
prahaladdarkin
f3edb03b49
Fix to CVE Data Export functionality for images pushed by docker push (#17182)
Closes:
* https://github.com/goharbor/harbor/issues/17167

Signed-off-by: prahaladdarkin <prahaladd@vmware.com>
2022-07-18 09:22:15 +08:00
stonezdj(Daojun Zhang)
9a41272986
Change the log to logger in purge job (#17162)
Fixes #17151

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-07-14 17:46:52 +08:00
prahaladdarkin
3f383e3ffd
Improvements to Vulnerability Data Export functionality. (#17161)
Closes:
* https://github.com/goharbor/harbor/issues/17152
* https://github.com/goharbor/harbor/issues/17153
Better error handling in case of task executions not found in the system

Signed-off-by: prahaladdarkin <prahaladd@vmware.com>
2022-07-14 15:08:25 +08:00
Shijun Sun
aa3cdcbc6c
Add CVE data exporting UI (#16236)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-07-11 17:43:25 +08:00
prahaladdarkin
130452111b
Vulnerability scan data export functionality (#15998)
Vulnerability Scan Data (CVE) Export Functionality
Proposal - goharbor/community#174
Closes - https://github.com/goharbor/harbor/issues/17150
Changes:
* CVE Data export to CSV with filtering support.
* Implement CSV data export job for creating CSVs
* APIs to trigger CSV export job executions

Signed-off-by: prahaladdarkin <prahaladd@vmware.com>
2022-07-11 16:35:04 +08:00
Roooocky
7e4b26b220
Add new feature for supporting WebAssembly artifact (#16931)
support wasm

Signed-off-by: ln23415 <ln23415@hotmail.com>
2022-07-08 23:08:28 +08:00
Shijun Sun
af802a4416
Hide pull command for Nydus (#17143)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-07-08 17:03:02 +08:00
Shijun Sun
6c1fbde2a8
Developer role should be able to view tag-retention rules (#17138)
Developer role should be able to view tag-rerention rules

Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-07-08 11:38:54 +08:00
MinerYang
efd9632e96
add nydus middleware (#17126)
Signed-off-by: yminer <yminer@vmware.com>

remove comments

Signed-off-by: yminer <yminer@vmware.com>

update ut manifest

Signed-off-by: yminer <yminer@vmware.com>

modify comment manifest

Signed-off-by: yminer <yminer@vmware.com>

updtae ut testcase

Signed-off-by: yminer <yminer@vmware.com>

fixwhitespace lint

Signed-off-by: yminer <yminer@vmware.com>

update isNydus judgement && define annotation var

Signed-off-by: yminer <yminer@vmware.com>

whitespace lint

Signed-off-by: yminer <yminer@vmware.com>
2022-07-08 09:56:10 +08:00
Wang Yan
bd8d66c68d
resolve robot authgen password format issue (#17134)
In some cases, the robot automatically generates passwords that do not meet confidentiality requirements.
The fix adds retry for auto generating passwords, and the timeout is 1 minute.

The requirement: the secret must longer than 8 chars with at least 1 uppercase letter, 1 lowercase letter and 1 number

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-07-08 02:05:32 +08:00
DarthBlair
360689b1b9
Added Tag Retention Permission to Developer (#16514)
* added rbac.ResourceTagRetention to developer

Added Permissions to Developer to according to the "User Pemission by Role" Table

Signed-off-by: DarthBlair <Marcel.Bassuener@googlemail.com>

Co-authored-by: Shengwen Yu <yshengwen@vmware.com>
2022-07-07 12:28:19 +08:00
MinerYang
8485da240d
bump up github.com/containerd/containerd to v1.5.13 (#17129)
Signed-off-by: yminer <yminer@vmware.com>
2022-07-07 08:53:43 +08:00
Chenyu Zhang
1a1ce634cc
Fix the process of cache layer (#17010)
fix: fix cache layer issues (#16995,#16997,#16996,#17038)

1. Load config and initialize cache layer in jobservice(for GC)
2. Cache artifact by digest the key should contains repository name
3. Repository cache cleanup error when update
4. Skip save cache when request ctx in transaction

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-07-06 16:11:53 +08:00
stonezdj(Daojun Zhang)
dcccb44db8
Add options to the user.Count method (#16285)
Fixes #16269, exclude the admin account by default
  Add excludeDefaultAdmin method -- exclude default admin by option
  Update authModeCanBeModified method -- the user count should be 0 without admin

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-07-06 13:57:31 +08:00
Wang Yan
6917021b41
resolve copy failure for artifact with multiple accessories (#17123)
If the artifact has more than one signaure, it will currently copy the last one. After the fix, all accessories can be copied to the target project.

Signed-off-by: wang yan <wangyan@vmware.com>
2022-07-05 20:10:22 +08:00
Chenyu Zhang
927f9f5af3
fix: attach labels for replication event (#17108)
Attach labels for replication event, list labels by artifact ID so for
event-based replication rule filter by label can work as expect.

Closes: #17014

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-07-05 19:57:13 +08:00
stonezdj(Daojun Zhang)
c9d6ba1469
Revert "Skip to refresh execution status when unchanged (#17023)" (#17111)
This reverts commit 88b8a7ac2c.

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-07-04 18:10:59 +08:00
Shengwen YU
315d8a8993
fix: update code in compliance with golangci-lint revive (#17087)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2022-07-01 14:52:47 +08:00
Wang Yan
94bf1c0ebd
Resovle the system artifact schedule issue (#17098)
Scheduling of system artifact depends on the jobservice, where gorountine is used to avoid the circular dependencies between core and jobservice.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-07-01 14:25:45 +08:00
Wang Yan
b4ef1dbfd5
Unify retention schedule/task retrieve and update (#17083)
Add not-found handling for non exist items in retention operation.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-07-01 01:58:14 +08:00
Wenkai Yin(尹文开)
ab74e853ee
Enhance the read-only API to avoid deleting operations during the job running (#17055)
Enhance the read-only API to avoid deleting operations during the job running

Fixes #16901

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-06-29 08:00:17 +08:00
Chenyu Zhang
1c3eb6974c
fix: update preheat api handler and DAO (#17079)
1. fix preheat dao Get method
2. update preheat tasks and getLog api

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-06-28 19:01:08 +08:00
stonezdj(Daojun Zhang)
aa63569de2
Fix scan log mismatch issue (#17085)
Add checks in label

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-06-28 18:12:38 +08:00
Shijun Sun
889407ab38
Add stop button for audit log rotation (#17054)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-06-28 15:48:17 +08:00
Shijun Sun
25d3583d36
Improve cron validator for replication rule (#17069)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-06-28 14:41:55 +08:00
Shijun Sun
acb0c09bd6
Improve copy command component (#17068)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-06-28 14:41:13 +08:00
stonezdj(Daojun Zhang)
c639257ba7
Support stop purge audit log job (#17033)
fixes #17006

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-06-28 11:15:11 +08:00
Wang Yan
ea2ed27a7d
add url raw query check middleware (#17070)
The middleware can give a uniform url validation and raised error early.

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-06-24 17:57:46 +08:00
Chenyu Zhang
8e99c83b19
fix: fix the update of retention policy (#17064)
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-06-23 19:12:48 +08:00
Chenyu Zhang
c343232081
fix: revise the process of policy update (#17021)
Signed-off-by: chlins <chenyuzh@vmware.com>
2022-06-22 18:30:06 +08:00