Commit Graph

219 Commits

Author SHA1 Message Date
Chlins Zhang 65e675d2e6
feat: integrate CloudEvents to webhook (#18322)
Integrate CloudEvents as payload format for webhook.

Closes: #17748

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-03-14 10:44:25 +08:00
Wang Yan 295260b7a3
replace subject id with digest (#18278)
Since it has to support push subject and accessories in either order, it has to replace digest with id

Signed-off-by: Wang Yan <wangyan@vmware.com>
2023-03-08 17:03:12 +08:00
stonezdj(Daojun Zhang) 5c0266e719
Get job log by job_id in worker (#18261)
Get job by job_id in redis

  Get the last 10MB of data if it exceeds 10MB

Signed-off-by: stonezdj <daojunz@vmware.com>
2023-03-06 13:19:10 +08:00
Chlins Zhang 90db04e92d
refactor: refact the webhook API and life process (#18255)
refactor: refact the notification job API and life process

1. Introduce new APIs for webhook jobs management.
2. Refact legacy APIs for backforward compatible.
3. Migrate the webhook jobs process to unified execution/task framework.

Closes: #18210

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-03-03 10:17:47 +08:00
Shijun Sun 9973d99f3e
Remove chart api (#18265)
* remove chart api from swagger

Delete the api path for chart in the swagger

Signed-off-by: Wang Yan <wangyan@vmware.com>

* Remove chart APIs
   1. Remove some chart-related steps for Dockerfile for portal  container
   2. Remove chart APIs for API center

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

---------

Signed-off-by: Wang Yan <wangyan@vmware.com>
Signed-off-by: AllForNothing <sshijun@vmware.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
2023-02-24 14:47:42 +08:00
Niko Wenselowski 10c54c0d82
Improve swagger descriptions (without changing security settings) (#18205)
* Improve swagger definitions.

References #15624
2023-02-23 12:57:50 +01:00
stonezdj(Daojun Zhang) d03f0dcf2d
Skip to update pull time and pull count for scanner robot account (#17807)
Add prefix for scanner robot account
   Fixes #14638

Signed-off-by: stonezdj <daojunz@vmware.com>

# Conflicts:
#	api/v2.0/swagger.yaml
#	src/common/const.go
#	src/lib/config/metadata/metadatalist.go
2023-02-20 15:09:21 +08:00
Wang Yan 738fde7d3b
remove chartmuseum backend (#18191)
Harbor deprecates chartmuseum as of v2.8.0

Epic: https://github.com/goharbor/harbor/issues/17958

Discussion: https://github.com/goharbor/harbor/discussions/15057

Signed-off-by: Wang Yan <wangyan@vmware.com>
2023-02-16 18:11:05 +08:00
Maksym Trofimenko 68fb01813e
Allow the Identity Provider to be the primary auth method in Harbor. (#17627)
Allow the Identity Provider to be the primary auth method in Harbor

Signed-off-by: Maksym Trofimenko <maksym@container-registry.com>
2023-02-08 18:11:08 +01:00
stonezdj(Daojun Zhang) 402363d50b
Remove job parameters and schedule extra attribute (#17878)
Remove job parameters from job

  Remove extra attribute and cron type from schedule
  fixes #17866

Signed-off-by: stonezdj <daojunz@vmware.com>

Signed-off-by: stonezdj <daojunz@vmware.com>
2022-11-28 17:45:26 +08:00
stonezdj(Daojun Zhang) f8628258bc
Add Cron, CronType and Update Time for schedule (#17844)
Remove create time because update time is added

Signed-off-by: stonezdj <daojunz@vmware.com>
2022-11-24 10:38:52 +08:00
stonezdj(Daojun Zhang) 57aff88eb5
Add REST API to list job queue status, pause/resume job queue and list schedulers (#17707)
Add queue manager and redis client
  Update scheduler to add count and list

Signed-off-by: stonezdj <daojunz@vmware.com>

Signed-off-by: stonezdj <daojunz@vmware.com>
2022-11-17 20:12:07 +08:00
Chlins Zhang 9c9aa58d6a
feat: support customize session timeout (#17767)
Add configuration session_timeout for API, then user can customize the
timeout from system config page or API. The timeout is 60 minutes by
default.

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

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-11-15 11:30:01 +08:00
stonezdj(Daojun Zhang) a47e175056
Remove email configuration (#17712)
Email related settings are deprecated
   Remove email ping API
   Fixes #17683

Signed-off-by: stonezdj <stonezdj@gmail.com>

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-11-14 15:03:49 +08:00
stonezdj(Daojun Zhang) cc69b1e951
Add OIDC group filter (#17736)
Filter out the OIDC group which doesn't match the regular expression
  Fixes #17130

Signed-off-by: stonezdj <stonezdj@gmail.com>

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-11-11 09:55:11 +08:00
stonezdj(Daojun Zhang) 39ca918ffe
Add jobservice monitoring api list pool, worker and stop running task (#17658)
Add REST API to list job pool, worker, stop running task

  Add jobservice handler to retrieve configuration
  Add RBAC for jobservice monitoring dashboard
  Add REST API to list pool, worker and stop running task

Signed-off-by: stonezdj <stonezdj@gmail.com>

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-11-03 10:47:40 +08:00
Chlins Zhang c330b8c63a
feat: introduce the copy by chunk for replication (#17602)
1. Add sql migration to alter replication policy table
2. Implement the PullBlobChunk and PushBlobChunk for the underlying v2 registry client
3. Update image transfer logic to support copy by chunk
4. Update the replication policy API handler

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-11-01 11:19:17 +08:00
Chenyu Zhang c2a3020e0e
fix: correct description for export cve project parameter (#17433)
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 10:51:25 +08:00
Chenyu Zhang 49d73fa57d
fix: export cve for image manifest list (#17333)
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:07:02 +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
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
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
Dannyx323 dc1a03fde2
Added group_type information for type 3 OIDC group (#17118)
Added group_type information for type 3 OIDC group

Signed-off-by: Dannyx323 <46710098+Dannyx323@users.noreply.github.com>

Update swagger.yaml

Added group_type information for type 3 OIDC group

Signed-off-by: Dannyx323 <46710098+Dannyx323@users.noreply.github.com>
2022-07-05 14:55:23 +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
Wenkai Yin(尹文开) 6c515b04d4
Support stop GC execution (#17004)
Support stop GC execution

Fixes 16902

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2022-06-17 20:03:24 +08:00
Chenyu Zhang e08ad05659
fix(swagger): append scan report version 1.1 to swagger docs (#16965)
fix(swagger): append scan report version 1.1 to swagger docs default value

The default value of swagger header X-Accept-Vulnerabilities should contains
scan report version 1.0 and 1.1.

Signed-off-by: chlins <chenyuzh@vmware.com>
2022-06-10 16:38:43 +08:00
stonezdj(Daojun Zhang) e778ec2edf
Add audit_log forward endpoint (#16914)
add config item to set log forward endpoint
  fallback the audit log to default log when endpoint in error

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-06-10 10:59:40 +08:00
stonezdj(Daojun Zhang) 0dc7a6806c
Add NextScheduledTime in schedule object (#16925)
Add NextSchedule in utils
  Add NextScheduledTime in ScheduleObj to display it in UI

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-06-06 22:17:41 +08:00
stonezdj 1839965c7a Add REST API for purge audit log
Add rest API for purge audit log
  Extract scheduler, execution, task from GC controller for common use

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-05-23 16:58:31 +08:00
Tim Beermann 25a5f66568 fixed typo in legaxy_swagger.yaml file
Signed-off-by: Tim Beermann <beermann@osism.tech>
2022-04-20 10:02:22 +02:00
stonezdj 97a64d551d Update usergroups API to support search by group_name
Add group_name parameter to GET usergroups API
  Related to issue #16408
  UI should also switch from search api to usergroups list api

Signed-off-by: stonezdj <stonezdj@gmail.com>
2022-03-30 10:59:56 +08:00
Shengwen Yu b7af0f1529 feat: add current_time to the response of systeminfo api when user logged in
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2022-01-11 17:36:08 +08:00
Wang Yan 063991078a
Cosign policy checker (#16187)
Enable policy checker for cosign, when it's enabled, user cannot pull artifact without cosign.

Signed-off-by: wang yan <wangyan@vmware.com>
2022-01-10 17:44:01 +08:00
Wang Yan 2111703d8d
Cosign artifact api
1,update artifact list & delete api to support accessory
2, add list accesories api

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-01-05 11:13:40 +08:00
He Weiwei b2268dbf8e
fix: remove x-go-type in swagger.yaml (#15923)
Closes #15912

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-11-04 23:39:36 +08:00
Ziming Zhang 98cef43ead limit replication bandwidth
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-09-14 11:23:28 +08:00
Shengwen YU 9cb266a8a0
Merge pull request #15548 from zyyw/ISSUE-14831
Add stop scan a particular artifact & stop scan all
2021-09-13 15:07:49 +08:00
Shengwen Yu e2e3bcca1c feat: add stop scan & stop scan-all feature
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
2021-09-13 11:19:21 +08:00
stonezdj(Daojun Zhang) 6b8c5c9edd
Add usergroup search API (#15483)
Fixes #15450
  Add paging function to usergroup list/search API
  Fix some 500 error when adding LDAP user/group to project member

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-09-02 09:04:33 +08:00
Ziming Zhang 698c336421 feat(replication) add exclude decoration in policy
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-08-17 14:19:13 +08:00
stonezdj(Daojun Zhang) 4e1f6633af
Merge pull request #15229 from stonezdj/21jun28_update_swagger_search_group
Add ldap_group_dn parameter to search group with ldap group dn
2021-06-30 14:04:21 +08:00
stonezdj a29bdd0b32 Change XXXConfigItem cannot be omitted when empty
Fixes #15206
 Includes:StringConfigItem, BoolConfigItem, IntegerConfigItem

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-06-29 21:50:39 +08:00
stonezdj fcd2fbcfe7 Add ldap_group_dn parameter to search group with ldap group dn
Fixes #15171
 Cannot use q.Query because ldap_group_dn contains comma(,) and equal(=), which are reserved characters in q.Query

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-06-29 20:20:47 +08:00
孙世军 33301ec65e
Enhance swagger UI (#15168)
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-06-23 16:28:14 +08:00
Wenkai Yin 5d13b603c4 Set "x-omitempty" as "false" for the pull count and artifact count of repository
Set "x-omitempty" as "false" for the pull count and artifact count of repository to avoid the missing of these properties in API response

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-06-09 11:17:23 +08:00
Steven Zou a902f971e1
Merge pull request #14864 from Akiros001/master
word correct
2021-05-31 17:02:39 +08:00
stonezdj fe830ac4d2 Change configurations in swagger.yaml make it more readable
Update the genyaml to generate the configurations type
Add toCfgMap in config handler

Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-05-24 19:13:55 +08:00
Wenkai Yin(尹文开) 36d76d8704
Merge pull request #14912 from ywk253100/210518_bug
Truncate the string when deletinng the resources when the length exceeds the limit
2021-05-20 12:09:36 +08:00
He Weiwei c6bd7b2ec2
ci: lint the swagger file (#14916)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-05-19 10:36:09 +08:00
Wenkai Yin 5ebc8b4fdd Truncate the string when deletinng the resources when the length exceeds the limit
Truncate the string when deletinng the resources when the length exceeds the limit

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-05-18 17:17:41 +08:00