Commit Graph

11350 Commits

Author SHA1 Message Date
MinerYang
a8b1569511
[cherry-pick]_version:2.6.0 correction in migration yml jinja (#17329)
_version:2.6.0 correction in migration yml jinja

Signed-off-by: yminer <yminer@vmware.com>
2022-08-05 16:54:46 +08:00
Chenyu Zhang
08c1cc40bf
[cherry-pick] Export CVE data Score column empty values (#17321) (#17325)
Export CVE data Score column empty values (#17321)

Closes: https://github.com/goharbor/harbor/issues/17189

Signed-off-by: prahaladdarkin <prahaladd@vmware.com>

Co-authored-by: prahaladdarkin <prahaladd@vmware.com>
2022-08-05 11:32:27 +08:00
Chenyu Zhang
5d876c088d
[cherry-pick] fix: replication webhook lost when src namespace different with dest (#17318)
fix: replication webhook lost when src namespace different with dest

Fix the replication webhook notification lost when the rule is
pull-based and src namespace different with dest.

Closes: #17298

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-04 16:46:48 +08:00
Chenyu Zhang
408788ce5d
[cherry-pick] docs: add helpful description for cache layer configurations (#17319)
docs: add helpful description for cache layer configurations in harbor.yml.tmpl

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-04 16:46:34 +08:00
MinerYang
44da12db6c
bump up distribution to v2.8.1+incompatible (#17311)
Signed-off-by: yminer <yminer@vmware.com>

update
2022-08-04 14:07:17 +08:00
Wang Yan
4696f46b92
fix copy artifact accessory quota issue (#17315)
It needs to request quota for accessory on copying artifact.

Signed-off-by: wang yan <wangyan@vmware.com>
2022-08-04 10:08:24 +08:00
Chenyu Zhang
7cf50ccc59
[cherry-pick] fix: reduce the high db cpu usage for tag retention (#17313)
fix: reduce the high db cpu usage for tag retention

1. Add two indexes to database migrations.
2. Skip refresh quota in middleware for requests from jobservice.
3. Refresh quota by self in the end of tag retention job.

Closes: #14708

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-03 20:00:41 +08:00
MinerYang
edd870d8f6
bumpup golang to v1.18.5 on release-2.6.0 (#17308)
Signed-off-by: yminer <yminer@vmware.com>
2022-08-03 17:44:17 +08:00
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
Yang Jiao
0a2d091ef9
[cherry-pick]Add purge audit log API test cases (#17288)
Add purge audit log API test cases

Added test cases for the following APIs:
1. PUT /system/purgeaudit/{purge_id}  Stop the specific purge audit log execution
2. GET /system/purgeaudit/{purge_id}  Get purge job status
3. GET /system/purgeaudit/{purge_id}/log  Get purge job log
4. PUT /system/purgeaudit/schedule   Update purge job's schedule
5. POST /system/purgeaudit/schedule  Create a purge job schedule
6. GET /system/purgeaudit/schedule  Get purge's schedule
7. GET /system/purgeaudit  Get purge job results.

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-08-01 18:27:43 +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
Yang Jiao
efcd2b545b
Refresh base images (#17270)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-07-29 23:33:39 +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
MinerYang
bd1d441b01
bumpup golang version to v1.18.4 (#17257)
Signed-off-by: yminer <yminer@vmware.com>
2022-07-29 09:43:01 +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
Yang Jiao
a4c577f9ec
Refresh base images (#17176)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-07-22 15:48:47 +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
Yang Jiao
e58f18bd51
Update routing test case (#17221)
Add retry to improve test case stability

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-07-21 17:40:38 +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
Yang Jiao
72cd65df6a
Update delete multi project testcase (#17169)
Because this PR(#16236) update the delete project button xpath, so update synchronously

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-07-14 22:47:53 +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
Yang Jiao
349d220372
Update delete project test case (#17158)
Because this PR(#16236) update the delete project button xpath, so update synchronously

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-07-13 17:39:12 +08:00
Yang Jiao
8d397d5a07
Add retry to project quota GC test case (#17164)
Add retry to improve test case stability

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-07-13 17:38:22 +08:00
Wang Yan
ef8b8f0be7
resolve the cve export volumn permission (#17157)
See the right uid and gid for the scandata_exports in the prepare

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-07-12 14:52:18 +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
Yang Jiao
f852996fe5
Update tag immutability xpath (#17149)
Because this PR(#17138) update the tag immutability xpath, so update synchronously

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-07-11 15:59:55 +08:00
Orlix
ba0637f562
Tune stale action (#17146)
Tube stale action

- 60 days grace period for stale
- exclude issues and PR with labels : never-stale, kind/requirement

Signed-off-by: OrlinVasilev <ovasilev@vmware.com>

Co-authored-by: OrlinVasilev <ovasilev@vmware.com>
2022-07-08 23:11:42 +02: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