Commit Graph

4252 Commits

Author SHA1 Message Date
Wang Yan
dec8397c21
Add api to delete blob and manifest (#12006)
* Add api to delete blob and manifest

Enable the capability of registry controller to delete blob and manifest

Signed-off-by: wang yan <wangyan@vmware.com>
2020-06-06 01:34:23 +08:00
Daniel Jiang
9f159393df
Merge pull request #12163 from reasonerjt/disable-webhook-test
Remove the API to test a webhook
2020-06-05 18:14:39 +08:00
Daniel Jiang
39a5efd54c
Merge pull request #12160 from reasonerjt/bump-up-go-migrator
Bump up golang-migrate
2020-06-05 18:13:40 +08:00
Daniel Jiang
9a9e7d61fc Remove the API to test a webhook
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-06-05 13:16:18 +08:00
Daniel Jiang
bc7ede21c7 Bump up golang-migrate
This commit bumps it up to 4.11.0
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-06-05 10:29:02 +08:00
Wenkai Yin(尹文开)
b7b1ce457b
Merge pull request #10389 from lxShaDoWxl/fix/gitlab
Fixed search images in registry gitlab
2020-06-04 14:49:40 +08:00
Steven Zou
6db856c3e2
Merge pull request #12121 from steven-zou/fix/job_stop_status_issue
fix(jobservice):mismatch status issue when stopping job
2020-06-03 18:13:23 +08:00
Steven Zou
3cd47af9a5 fix(jobservice):mismatch status issue when stopping job
- returnning nil instead of error when trying to stop a job that has been in the final status(Error/Success/Stopped)
- do enhancements to the periodic job unschedule func
- fix a UT nil ptr issue

Signed-off-by: Steven Zou <szou@vmware.com>
2020-06-03 16:18:42 +08:00
AllForNothing
8bf77d01f4 Fix bugs with label 'target 2.0.1'
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-06-03 11:25:22 +08:00
jwangyangls
6939446c3c
Merge pull request #12115 from jwangyangls/fix-issue-add-label
[fix] Fix  issue in front ui 2.0.1
2020-06-02 15:52:37 +08:00
Yogi_Wang
459314308b [fix] issue in front ui 2.0.1
1.fix add label issue
2.fix unauthorized user can contrl page
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-06-02 13:54:22 +08:00
Steven Zou
c7c1742b88
Merge pull request #12106 from heww/clean-clair-url
refactor(configuration): cleanup unneeded CLAIR_URL configuration in core
2020-06-01 19:24:19 +08:00
Steven Zou
a032c546f8
Merge pull request #12096 from steven-zou/fix/remove_checkin_data
fix(jobservice):fix issues of jobservice
2020-05-29 16:49:33 +08:00
He Weiwei
d97be71234 refactor(configuration): cleanup unneeded CLAIR_URL configuration in core
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-05-29 07:27:50 +00:00
Steven Zou
51f1b2e590 fix(jobservice):fix issues of jobservice
- never expire the jobs that are not entering the final status (Error,Success or Stopped)
- set different expireation time to the jobs with different status
- never store the `check_in` data in the redis db to save space

Signed-off-by: Steven Zou <szou@vmware.com>
2020-05-29 11:36:08 +08:00
Chlins Zhang
f862805244
Merge pull request #11998 from chlins/fix/replication-pull-blob-content-length
fix(replication): ignore the problem of not getting Content-Length fr…
2020-05-29 10:06:44 +08:00
mmpei
7c2bfb1378
Fix helmhub insecure issue when using with a proxy (#12014)
Signed-off-by: peimingming <peimingming@corp.netease.com>
2020-05-28 10:57:51 +08:00
He Weiwei
9f5f8e4681
Merge pull request #12077 from heww/fix-issue-11951
fix(cve-whitelist): fix panic in `Get` method of whitelist manager
2020-05-27 19:16:11 +08:00
He Weiwei
0d1b9c96ff fix(cve-whitelist): fix panic in Get method of whitelist manager
Closes #11951

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-05-27 09:55:54 +00:00
chlins
54895def90 fix(replication): ignore the problem of not getting Content-Length from the pull blob api
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-05-27 13:00:54 +08:00
Will Sun
31a943bb42
Merge pull request #12043 from AllForNothing/disable-test
Remove test button for webhook
2020-05-27 11:46:58 +08:00
AllForNothing
ea753bec97 Remove test button for webhook
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-05-27 10:26:41 +08:00
Will Sun
da0e80b712
Merge pull request #11452 from jd615645/master
Chinese(Traditional) translation #402
2020-05-27 10:01:25 +08:00
lxShaDoWxl
681e97482e fix(Registries/Gitlab): upgrade testing
Signed-off-by: lxShaDoWxl <lxshadowxkingxl@gmail.com>
2020-05-26 20:22:26 +06:00
lxShaDoWxl
05f78a561a Merge remote-tracking branch 'origin/master' into fix/gitlab 2020-05-24 16:05:32 +06:00
Will Sun
2ff0638f8b
Merge pull request #10576 from hobti01/repo-slash
fix: Allow forward slash in destination namespace
2020-05-21 10:50:55 +08:00
yuzhiquan
6332daef31 struct instead of int within signal chan, and trans Printf to Println
Signed-off-by: yuzhiquan <yuzhiquanlong@gmail.com>
2020-05-21 00:47:55 +08:00
Wenkai Yin
a31315aa36 Fix replication bugs #11974, #11939
Fix replication bugs: fix #11974, fix #11939

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-05-21 00:25:49 +08:00
He Weiwei
69fe9e9bf7
Merge pull request #11106 from qinshaoxuan/fix_11051
Fix bug when scanner is unhealthy
2020-05-20 21:06:22 +08:00
ctu
7ea8ed2588 🐈 Add zh-tw translate
Signed-off-by: ctu <ctu@cs.nctu.edu.tw>
2020-05-20 10:56:29 +00:00
Tim Hobbs
36747087ce
fix: Allow forward slash in destination namespace
Signed-off-by: Tim Hobbs <timothy.hobbs@ic-consult.com>
2020-05-20 11:27:50 +02:00
Daniel Jiang
b803975b36
Merge pull request #11971 from wy65701436/fixes-11949
fix conformance issue on deleting manifest
2020-05-20 13:19:47 +08:00
AllForNothing
2d141a919d Add more UT for create project component
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-05-19 17:39:42 +08:00
wang yan
f0fabb9ef8 fix conformance issue on deleting manifest
fixes #11949
When to call delete manifest API with a tag as the reference, Harbor should give a unsupported error code.

Reference: Note that a manifest can only be deleted by digest. https://github.com/opencontainers/distribution-spec/blob/master/spec.md#delete-manifest

Signed-off-by: wang yan <wangyan@vmware.com>
2020-05-19 15:58:33 +08:00
Wang Yan
b1793e795c
fix conformance test ErrorsCodes failure (#11961)
fixes #11945
When client calls PUT with an invalid digtest, Harbor has to give a 400 instead of 500.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-05-18 17:20:23 +08:00
guanxiatao
0aefd8f2e2 Add UT for webhook when replicating with docker registry
Signed-off-by: guanxiatao <guanxiatao@corp.netease.com>
2020-05-13 19:09:33 +08:00
AllForNothing
1c670329dc Fix duration and log bugs for replication task UI
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-05-13 12:38:23 +08:00
Will Sun
5289b3519e
Merge pull request #11860 from AllForNothing/docker-logo
Modify doc and fix some ui bugs
2020-05-11 11:00:36 +08:00
guanxiatao
e8655c667c Core panic fix when triggering a webhook of docker-registry replication
Signed-off-by: guanxiatao <guanxiatao@corp.netease.com>
2020-05-11 10:33:23 +08:00
AllForNothing
c50cbbf3cc Modify doc and fix some ui bugs
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-05-11 09:39:33 +08:00
Will Sun
119751e0fd
Merge pull request #11835 from AllForNothing/ui-bugs
Fix some UI bugs
2020-05-07 11:45:57 +08:00
AllForNothing
bdf6c5b8d9 Fix some UI bugs
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-05-06 16:41:35 +08:00
lxShaDoWxl
47a57b80d7 Merge remote-tracking branch 'origin/master' into fix/gitlab 2020-05-06 13:26:18 +06:00
AllForNothing
90e34e0104 Improve i18n service
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-05-06 14:45:56 +08:00
Ziming
56609a8026
fix(retention) set pushtime and pulltime for untagged (#11786)
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-04-28 19:20:46 +08:00
Will Sun
4324f0d2c8
Merge pull request #11780 from AllForNothing/tag-re
Replace images with artifacts for tag-retention
2020-04-28 16:53:47 +08:00
danfengliu
16f6ad3688
Merge pull request #11768 from AllForNothing/nightly-login
Add new nightly case  admin add new users
2020-04-28 14:57:37 +08:00
AllForNothing
b5617c0868 Replace images with artifacts for tag-retention
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-28 14:04:09 +08:00
AllForNothing
8ff4003438 Add new nightly case admin add new users
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-28 11:10:06 +08:00
He Weiwei
5c5ba0b764
Merge pull request #11765 from heww/quota-webhook-enhancement
feat(quota,webhook): send quota webhook for put and mount blob
2020-04-28 09:35:57 +08:00
He Weiwei
b1c9d452ce feat(quota,webhook): send quota webhook for put and mount blob
Closes #11712

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-04-28 00:59:16 +00:00
Daniel Jiang
87f006d3a9
Merge pull request #11755 from reasonerjt/token-service-core-url
v2 auth middleware handles the ping request from internal
2020-04-27 15:04:10 +08:00
stonezdj(Daojun Zhang)
fb90bc23f2
Merge pull request #11757 from heww/fix-issue-11692
feat(scan): support to scan artifact automatic after it pushed
2020-04-27 12:08:06 +08:00
Daniel Jiang
ef008fd4cf
Merge pull request #11751 from wy65701436/fixes-11744
fix return code on getting non exist manifest
2020-04-27 12:06:37 +08:00
Daniel Jiang
fe587d0cc8 v2 auth middleware handles the ping request from internal
When scanner like trivy handles the auth flow to pull image, it pings
the /v2 and access the token service url in response body, by default it
will be external endpoint of Harbor.
There will be problem when Harbor is deployed on a single node with hairpinning not
supported.

This commit makes sure the address of token service in the challenge is
internal url of core component when the request is from internal.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-04-27 00:54:49 +08:00
He Weiwei
bc1f7b8079 feat(scan): support to scan artifact automatic after it pushed
Closes #11692

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-04-26 15:56:58 +00:00
wang yan
c4c279089a fix return code on getting non exist manifest
It's found by conformance test, it should be 404 instead of 500 when to get a non exist manifest

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-26 23:31:11 +08:00
AllForNothing
fd65520fa0 dESTInation namespace should support slash
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-26 17:24:15 +08:00
Steven Zou
06d955c6e3
Merge pull request #11737 from steven-zou/fix/issue_#11720
fix(jobservice):fix job stats NOT_FOUND issue
2020-04-26 16:56:25 +08:00
Wang Yan
8d5fc4c752
Fix delete repository event issue (#11722)
In the delete repository scenario, the repository has already been removed from the DB, the repository cannot be retrived.
Just let the creation time as empty.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-26 16:51:13 +08:00
Steven Zou
0ccea49c18 fix(jobservice):fix job stats NOT_FOUND issue
Signed-off-by: Steven Zou <szou@vmware.com>
2020-04-26 16:23:10 +08:00
Daniel Jiang
c28f6bd6ff
Merge pull request #11738 from bitsf/retention_not_retry
fix(retention) not retry retention job
2020-04-26 15:34:34 +08:00
Ziming Zhang
97a7a6dc35 fix(retention) fix retention repository with slash
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-04-26 15:07:25 +08:00
Ziming Zhang
601ce08660 fix(retention) not retry retention job
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-04-26 14:33:21 +08:00
Ziming Zhang
257924856c fix(retention) fix empty pull time log
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-04-26 11:56:26 +08:00
jwangyangls
0460e40a28
Merge pull request #11680 from jwangyangls/200421-fix-issue-2.0
[Fixed] Fix issue #11334 #11252 #11191
2020-04-24 17:46:22 +08:00
AllForNothing
432f5512d8 Fix bugs for testing kick 3
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-24 17:11:34 +08:00
Yogi_Wang
7bb7c2c868 [Fixed] Fix issue #11334 #11252 #11191
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-04-24 16:38:59 +08:00
Daniel Jiang
447ec13527 Allow sys admin to call /c/UserExists
The commit fix a regression introduced by #11672 which impacts admin
adding new users.
When admin is creating new users, /c/UserExists is called by UI. We must
allow it called by admin when self-registration is turned off.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-04-23 11:40:54 +08:00
Will Sun
7d784ef02f
Merge pull request #11674 from AllForNothing/more-ut
Add more UT
2020-04-22 17:13:20 +08:00
Daniel Jiang
4c41ac81d9
Merge pull request #11672 from reasonerjt/restrict-userexists
Enable userExists only when self-registration is turned on.
2020-04-21 13:19:20 +08:00
mmpei
4b6196a00d
fix slack rate limit issue (#11623)
Signed-off-by: peimingming <peimingming@corp.netease.com>
2020-04-21 11:44:58 +08:00
AllForNothing
0c5d3cc899 Add more UT
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-21 09:54:32 +08:00
Daniel Jiang
201955c2fb Enable userExists only when self-registration is turned on.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-04-21 00:17:12 +08:00
Wang Yan
ff2a7e61c9
fix catalog api issue (#11666)
The v2 catalog API needs to filter out the empty repository and the repository which artifacts are all with no tags.

1,In v2.0.0, Harbor does not delete repository even there is no artifact, it's different with v1.10.0
2, Compares with docker distribution, it doesn't return the respository with untagged images.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-20 23:37:16 +08:00
DQ
e0b98685f3 Add comments for new tls transport
To explain why use this to avoid replication hang forever issue

Signed-off-by: DQ <dengq@vmware.com>
2020-04-20 19:19:15 +08:00
Yogi_Wang
cd98a7a9b6 [Fixed] Fix issue when delete signed tag
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-04-17 16:04:16 +08:00
Steven Zou
3b0b9f3c7d
Merge pull request #11645 from ninjadq/avoid_default_transport_https_bug
Fix: Default Transport HTTP2 related hang issue
2020-04-17 15:44:52 +08:00
jwangyangls
981cae9f11
Merge pull request #11648 from jwangyangls/add-sign-pop-when-delete
[feat] Add pop up command when delete signed tag
2020-04-17 13:14:19 +08:00
Yogi_Wang
6f54262889 [feat] Add pop up command when delete signed tag
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-04-17 12:45:57 +08:00
DQ
53111d1d16 Fix: Default Transport HTTP2 related hang issue
Create a transport the same as default except forceattempthttp2

Signed-off-by: DQ <dengq@vmware.com>
2020-04-17 11:36:02 +08:00
Wenkai Yin(尹文开)
e3cbfac0cc
Fix bug for replicating chart triggered by event (#11578)
Use the new event model to fix bug for replicating chart triggered by event

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-16 16:15:21 +08:00
Wang Yan
8a0e8627ff
replace pkg errors with lib errors (#11605)
Fixes #9704

As we do want to unify error handling, so just decreprates pkg errors, use lib/errors instead for Harbor internal used errors model.

1, The lib/errors can cover all of funcs of pkg/errors, and also it has code attribute to define the http return value.
2, lib/errors can give a OCI standard error format, like {"errors":[{"code":"UNAUTHORIZED","message":"unauthorized"}]}

If you'd like to use pkg/errors, use lib/errors instead. If it cannot meet your request, enhance it.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-15 22:41:45 +08:00
Will Sun
205e3a969f
Merge pull request #11621 from AllForNothing/gc-ui
Modify gc ui
2020-04-15 22:01:59 +08:00
He Weiwei
385aaac00d
Merge pull request #11620 from heww/fix-issue-11524
feat(scanner): make Clair and Trivy as reserved name for scanners
2020-04-15 15:21:35 +08:00
Wang Yan
9bc96dd97a
add MarshalJSON func for lib errs (#11614)
Customize the json output with message with err.Error(). Otherwise, the wrappged message will be lost
in the final errors object.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-15 11:30:14 +08:00
AllForNothing
a337dcf517 Modify gc ui
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-15 11:06:17 +08:00
He Weiwei
f5487479dd feat(scanner): make Clair and Trivy as reserved name for scanners
Closes #11524

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-04-15 02:26:02 +00:00
Wang Yan
c6860ac35f
handle stop signal in GC job (#11612)
Stop GC job in the init if receives the stop signal

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-14 18:59:03 +08:00
Wenkai Yin(尹文开)
2d618370ae
Merge pull request #11588 from wy65701436/trace-error
update trace level to error
2020-04-14 18:30:21 +08:00
Qian Deng
95d7c9382b
Merge pull request #11592 from ninjadq/min_version_tls_to_12
Min version tls to 12
2020-04-14 18:12:55 +08:00
Will Sun
ad60bdddf8
Merge pull request #11591 from AllForNothing/nightly-untag
Add new nightly case for GC untagged images
2020-04-14 17:34:58 +08:00
Will Sun
faf554f642
Merge pull request #11587 from AllForNothing/sort-name
Fix repo list sorting and filtering bug
2020-04-14 17:34:39 +08:00
wang yan
ff2a6c7a01 add warning to registry binary name
Fixes #11606

As we DO NOT want to user to execute GC in the container, rename it and append the warning message.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-14 15:16:50 +08:00
wang yan
7622c17817 update trace level to error
Use level error instead to log trace

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-14 15:01:52 +08:00
Steven Zou
adb305e4e1
feat(job):enable priority option (#11608)
- priority option is supported when doing job registration
- the priority is defined by a unique priority sampler
- the default priority is 1000 (max is 10000)

Signed-off-by: Steven Zou <szou@vmware.com>
2020-04-14 14:54:44 +08:00
jwangyangls
fb3da503ea
Merge pull request #11584 from jwangyangls/add-docker-pull-push-command
[feat] Add pull/push command in repo
2020-04-14 10:05:39 +08:00
AllForNothing
46320641b4 Add new nightly case for GC untagged images
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-14 09:25:06 +08:00
Wenkai Yin(尹文开)
f972f2989c
Close the reponse body after reading data (#11594)
Close the reponse body after reading data

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-14 01:19:40 +08:00
Wenkai Yin(尹文开)
4b4091b217
Merge pull request #11599 from wy65701436/revise-base-error
update internal error output format
2020-04-13 20:07:05 +08:00
wang yan
269d0b9f9d update internal error output format
1, remove the code from output
2, output format is same as pkg/errors, it's easy to migrate
3, add UT

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-13 19:29:55 +08:00
DQ
b3db293091 TLS update min version and cipher suits
min version set to tls 1.2
suit only use ecdhe and strenth above 256

Signed-off-by: DQ <dengq@vmware.com>
2020-04-13 18:13:30 +08:00
Steven Zou
3ad5b2ba06
fix(job currency):introduce max corrency of job (#11589)
- update Job interface to introdcue MaxCurrency method for declaring the max currency of the specified job
- change the downstream jobs to implement the new interface method
  - GC and sample jobs are set to 1
  - other jobs are set to 0 that means unlimited
- add max currency optiot when doing job registration
- resolve issue #11586
  - probably resolve issue #11281
  - resolve issue #11570

Signed-off-by: Steven Zou <szou@vmware.com>
2020-04-13 18:07:54 +08:00
Wenkai Yin
7553845b4d Remove the duplicated const definition
Remove the duplicated const definition for artifact type

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-13 17:02:23 +08:00
He Weiwei
49c9e4f696
Merge pull request #11585 from heww/cleanup-quota
refactor(quota): cleanup code for quota
2020-04-13 15:11:17 +08:00
Yogi_Wang
9e1bdc88e6 [feat] Add pull/push command in repo
1.add pull/push command in repo;
2.move annotations from artifact list to artifact summary

Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-04-13 13:11:33 +08:00
AllForNothing
e5e39c03c5 Fix repo list sorting and filtering bug
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-13 12:24:46 +08:00
Will Sun
009662a317
Merge pull request #11426 from AllForNothing/nightly-tag
Add new nightly cases for tag CRUD
2020-04-13 12:15:18 +08:00
He Weiwei
0b87eaf039
Merge pull request #11505 from heww/revert-registry-authorization-type-support
feat(scan): revert bearer token support for scanner
2020-04-13 11:19:02 +08:00
He Weiwei
c0349da812 refactor(quota): cleanup code for quota
1. Remove `common/quota` package.
2. Remove functions about quota in `common/dao` package.
3. Move `Quota` and `QuotaUsage` models from `common/models` to
`pkg/quota/dao`.
4. Add `Count` and `List` methods to `quota.Controller`.
5. Use `quota.Controller` to implement quota APIs.

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-04-12 16:16:06 +00:00
Daniel Jiang
93f316ccfe
Merge pull request #11582 from heww/fix-issue-11564
fix(blob): delete project blob with project_id
2020-04-12 18:00:54 +08:00
He Weiwei
c585e22d18 fix(blob): delete project blob with project_id
Closes #11564

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-04-12 04:23:18 +00:00
Wang Yan
740b1e46b4
fix artifact trash filter issue (#11575)
fixes #11533

GC jobs will use the filter results to call registry API to delete manifest.

In the current imple, the filter function in some case does not return the deleted artifact as it's using digest as the filter condition.

Like: If one artifact is deleted, but there is another project/repo has a image with same digest with the deleted one, filter func will
not mark the deleted artifact as candidate. It results in, GC job does not call API to remove the manifest.

To fix it, update the filter to use both digest and repository name to filter candidate.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-12 03:11:49 +08:00
Daniel Jiang
8822e6cdba
Merge pull request #11572 from ywk253100/200410_replication_insecure
Use insecure transport when creating the adapter for local instance in replication
2020-04-12 00:34:14 +08:00
He Weiwei
1ce0a76bd1
Merge pull request #11555 from reasonerjt/exclude-deleted-projects
Exclude deleted groups when counting groups associated with group ID
2020-04-11 16:52:35 +08:00
He Weiwei
4623cec1e5 feat(scan): revert bearer token support for scanner
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-04-11 08:45:29 +00:00
Daniel Jiang
32ae0a6fa6 Exclude deleted projects when counting projects associated with group ID
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-04-10 19:07:08 +08:00
Wenkai Yin(尹文开)
81a4e7d468
Merge pull request #11569 from ywk253100/200410_replication
Add "delete" into the action map if the action in token is "*"
2020-04-10 18:06:47 +08:00
jwangyangls
e28b5811f7
Merge pull request #11176 from jwangyangls/change-helm-version
Separate swagger to get v2.0 swagger and chart swagger
2020-04-10 17:12:00 +08:00
jwangyangls
5d76f1ea4b
Merge pull request #11530 from jwangyangls/200408-fix-bug-round2
[Fixed] fix part issue of round2
2020-04-10 17:11:43 +08:00
Wenkai Yin
df1f52dba4 Use insecure transport when creating the adapter for local instance in replication
Use insecure transport when creating the adapter for local instance in replication

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-10 16:45:57 +08:00
Yogi_Wang
33ed4fb67e Separate swagger to get v2.0 swagger and chart swagger
1. Partial helm api version number clear
2. Separate swagger to get v2.0 swagger and chart swagger
3. router add chart swagger

Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-04-10 16:25:30 +08:00
Yogi_Wang
3c771670ca [Fix] Fix part issue of round2
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-04-10 16:15:42 +08:00
Wenkai Yin
847a513cea Add "delete" into the action map if the action in token is "*"
Fixes #11563, add "delete" into the action map if the action in token is "*"

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-10 16:11:44 +08:00
He Weiwei
f4821e96b3
Merge pull request #11527 from heww/refresh-quota-ignore-limitation
feat(quota): ignore limitation support for quota RefreshMiddleware
2020-04-10 15:29:41 +08:00
Daniel Jiang
56b404bfb7
Get digest in content trust middleware (#11554)
This commit removes the EnsureArtifactDigest as its implementation is
problematic: the artifactinfo in context is immutable.
When the content trust middleware needs the digest it will retrieve it
via artifact controller.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-04-10 14:11:56 +08:00
Steven Zou
6986af6e74
Merge pull request #11558 from danielpacak/fix/issue_11310/preserve_default_scanner
fix(scanner): Do not override the default scanner on init
2020-04-10 12:42:39 +08:00
Steven Zou
5661ff937b
Merge pull request #11493 from steven-zou/fix/js_ut_case_failure
fix(js UT cases):fix the cron spec bug
2020-04-10 10:16:05 +08:00
Daniel Pacak
dcbf0726e5 fix(scanner): Do not override the default scanner on init
Resolves: #11310

Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
2020-04-09 17:56:07 +02:00
Wenkai Yin(尹文开)
340027a882
Merge pull request #11484 from ywk253100/200407_replication_hairpin
Fix replication failure in kubernetes with hairpin mode disabled
2020-04-09 16:50:46 +08:00
Wenkai Yin
8ee3421176 Fix replication failure in kubernetes with hairpin mode disabled
Fixes #11480
Fixes #11461
Fix replication failure in kubernetes with hairpin mode disabled

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-09 15:10:25 +08:00
Will Sun
71821a1c9a
Merge pull request #11497 from AllForNothing/css
Fix css bugs of label 'target2.0'
2020-04-09 14:20:30 +08:00
Wenkai Yin(尹文开)
8fb46d4bc7
Just log the signature not found error in debug mode (#11529)
Fixes #11510, just log the signature not found error in debug mode when deleting artifacts

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-09 14:17:40 +08:00
AllForNothing
a411879196 Fix css bugs of label 'target2.0'
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-09 10:32:07 +08:00
He Weiwei
0b26b36737 feat(quota): ignore limitation support for quota RefreshMiddleware
1. Ignore limitation when refresh quota for project.
2. Return 403 when quota errors occurred.
3. Add test for Refresh method of quota controller.

Closes #11512

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-04-08 19:17:41 +00:00
He Weiwei
20115b92c7 fix(vulnerable): fix the wrong count of vulnerabilities in message
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-04-08 09:06:31 +00:00
Steven Zou
59f14dff98 fix(js UT cases):fix the cron spec bug
- eliminate the time of cron spec  overflow issue in the UT case

Signed-off-by: Steven Zou <szou@vmware.com>
2020-04-08 15:59:05 +08:00
Daniel Jiang
6ad855f0ee
Merge pull request #11475 from reasonerjt/rm-token-claims-registry
Remove the registry claim pacakge
2020-04-08 12:19:56 +08:00
AllForNothing
e342b4ef0b Add new nightly cases for tag CRUD
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-08 09:56:27 +08:00
Steven Zou
76625eab54
Merge pull request #11473 from steven-zou/fix/issue_#11466
fix[jobservice]:enqueue job with UTC
2020-04-08 08:44:43 +08:00
Wenkai Yin(尹文开)
e1ba985b7c
Merge pull request #11436 from ywk253100/200404_repo_encode
Update APIs to only accept encoded repository name that contains slash
2020-04-07 23:14:44 +08:00
Wenkai Yin(尹文开)
bf6c4ff1f1
Merge pull request #11479 from ywk253100/200407_replication
Fix replication bug
2020-04-07 22:41:19 +08:00
Yogi_Wang
3775509ce5 Update APIs to only accept encoded repository name
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-04-07 22:40:39 +08:00
Wenkai Yin
2171634000 Fix replication bug
Remove the URL replacing logic temporarily to make replication work and will introduce a new solution for the hairpin issue

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-07 21:27:06 +08:00
Wenkai Yin
7188e01569 Update APIs to only accept encoded repository name that contains slash
Update APIs to only accept encoded repository name that contains slash

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-07 20:57:50 +08:00
Wenkai Yin
0a372a85eb Remove "GetMyProjects" and "GetProjectRoles" in the interface "security.Context"
Fixes #11125, remove "GetMyProjects" and "GetProjectRoles" in the interface "security.Context"

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-04-07 19:53:38 +08:00
Steven Zou
0fc7629865 fix[jobservice]:enqueue job with UTC
- schedule the periodical jobs following the UTC timezone
  - e.g: 5 10 10 * * * means run jobs at UTC time 10:10:05 everyday
- fix issue #11466

Signed-off-by: Steven Zou <szou@vmware.com>
2020-04-07 17:10:19 +08:00
He Weiwei
3f567514b5
Merge pull request #11468 from wy65701436/remove-count-quota-code
remove the chart handling in quota
2020-04-07 16:51:07 +08:00
Daniel Jiang
c303dcf617 Remove the registry claim pacakge
This commit removes `src/pkg/token/claims/registry` that is not referenced by other
packages.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-04-07 16:43:28 +08:00
Wenkai Yin(尹文开)
88ae9c458c
Update tags related APIs (#11435)
* Update tags related APIs

1. Remove API for listing tags of repository
2. Add API for listing tags of artifact
3. Support filter artifact by tag name

Signed-off-by: Wenkai Yin <yinw@vmware.com>

* [OCI] modify artifact tag name check
1. switch api get tag list
2. modify artifact tag name check
Signed-off-by: Yogi_Wang <yawang@vmware.com>

Co-authored-by: Yogi_Wang <yawang@vmware.com>
2020-04-07 16:28:51 +08:00