Commit Graph

11369 Commits

Author SHA1 Message Date
Yang Jiao
2004154893
[cherry-pick]Add audit log forward UI testcase (#17592)
Add audit log forward UI testcase

Verify that the audit log forward function is correct.

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-09-27 10:46:44 +08:00
Yang Jiao
f33ba83d84
[cherry-pick]Add audit log forword API test case (#17590)
Add audit log forword API test case

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-09-27 10:45:18 +08:00
Yang Jiao
9c4d7297a6
Bump up version to v2.6.1 (#17598)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-09-26 11:57:29 +08:00
MinerYang
66a45943d6
bumpup golang to v1.18.6 on release-2.6.0 (#17593)
Signed-off-by: yminer <yminer@vmware.com>

Signed-off-by: yminer <yminer@vmware.com>
2022-09-22 17:37:04 +08:00
stonezdj(Daojun Zhang)
16306a15d5
(cherry-pick) Add check on the audit log forward and skip audit log database (#17576)
Add check on the audit log forward and skip audit log database

  fixes #17524
Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-09-21 16:30:11 +08:00
Chlins Zhang
8266bbe456
[cherry-pick] fix: handle the break change for parse external sentinel redis url (#17509)
fix: handle the break change for parse external sentinel redis url

Handle the ParseSentinelURL to resolve an incompatible modification that does not recognize the default redis database.

Closes: #17483

Signed-off-by: chlins <chenyuzh@vmware.com>

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-09-07 13:40:54 +08:00
Yang Jiao
8979cb7fe2
[cherry-pick]Add audit log and log rotation test cases (#17466)
* Add audit log and log rotation test cases

1. Add audit log test case
2. Add log rotation test case
3. Add log rotation schedule test case

Signed-off-by: Yang Jiao <jiaoya@vmware.com>

* Refresh base images

Signed-off-by: Yang Jiao <jiaoya@vmware.com>

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-08-30 11:27:13 +08:00
Yang Jiao
b035ca7cd9
Refresh base images (#17471)
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-08-28 11:58:24 +08:00
Yang Jiao
520a5b8156
[cherry-pick]Update portal-base and nginx-base Dockerfile.base (#17445)
Update portal-base and nginx-base Dockerfile.base

Installing nginx 1.22 creates the nginx group and nginx user, so instead
of creating them again, modify them.

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-08-24 15:28:46 +08:00
Shijun Sun
5736350e1b
[Chrry-pick]Add WASM filter for artifacts list (#17448)
Add WASM filter for artifacts list

Signed-off-by: AllForNothing <sshijun@vmware.com>

Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-08-23 17:00:51 +08:00
Chenyu Zhang
92fe162f84
[cherry-pick] fix: validate the existence of project for export cve api (#17441)
fix: validate the existence of project for export cve api

Validate the existence of the project for export CVE API handler, return
not found error if the project is not exist.

Closes: #17430

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-23 09:29:10 +08:00
Chenyu Zhang
9b7f379be8
[cherry-pick] fix: correct description for export cve project parameter (#17434)
fix: correct description for export cve project parameter

Correct the description for the project parameter of export CVE API in
the swagger.

Closes: #17429

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-22 11:20:27 +08:00
MinerYang
d73e922058
[cherry-pick]add deprecation msg for chartmsuem and notary (#17417)
add deprecation msg for chartmsuem and notary

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

adjust msg

adjust typo

adjust
2022-08-17 14:55:27 +08:00
Chenyu Zhang
d7db225c9c
[cherry-pick] enhancement: add error log for create task (#17404)
enhancement: add error log for create task

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-16 13:42:05 +08:00
Yang Jiao
2cb47a702e
[cherry-pick]Update replication and trivy testcases (#17368)
Update replication and trivy testcases

1 Update replication filter_label_xpath because of this PR #17267 updated xpath
2 Update the Manual Scan All test case, because Scan All will affect other testcases if it is not finished running

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-08-10 18:26:23 +08:00
Shijun Sun
1bbd0e35a2
[Cherry-pick]Improve unit test for sub-accessories component (#17373)
Improve unit test for sub-accessories component

Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-08-10 16:20:51 +08:00
Shijun Sun
792db58a14
[Cherry-pick]Fix ui issues found in testing-day-round-2 (#17358)
Fix ui issues found in testing-day-round-2

Signed-off-by: AllForNothing <sshijun@vmware.com>
2022-08-09 12:15:44 +08:00
Chenyu Zhang
0b1fee46a6
[cherry-pick] fix: validate export cve request params (#17345)
fix: validate export cve request params

1. Validate export cve request params in the API handler
2. Trim space for request in the scan export job

Closes: #17326

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-08 14:20:51 +08:00
Chenyu Zhang
c4e65e6e8c
[cherry-pick] fix: export cve for image manifest list (#17336)
fix: export cve for image manifest list

1. Fix export cve for image manifest list
2. Remove row_id column in csv file
3. Update cve execution swagger API description

Closes: #17331,#17330,#17335,#17334

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-08-05 20:06:48 +08:00
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