Wang Yan
0271efd3f7
enable visible when to list/create robot ( #13840 )
...
1, enable the visible attribute when to create/list robots
2, rename package name from robot2 to robot
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-04 10:24:31 +08:00
Daniel Jiang
eb75123638
Refine the token scope generation
...
This commit directly maps the actoin permission in security context to
the scope generated by the token service in harbor-core.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-01-03 23:12:04 +08:00
prahaladdarkin
a890b28e1e
Store vulnerability data from scanner into a relational format ( #13616 )
...
feat: Store vulnerability report from scanner into a relational format
Convert vulnerability report JSON obtained from scanner into a relational format describe in:https://github.com/goharbor/community/pull/145
Signed-off-by: prahaladdarkin <prahaladd@vmware.com>
2020-12-25 08:47:46 +08:00
Wang Yan
47841a04b9
fix quota cannot be updated after gc ( #13844 )
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-24 20:10:57 +08:00
Will Sun
75da08303a
Improve scan all page
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-24 17:36:03 +08:00
Wenkai Yin
923a538570
Provide the function to update extra attributes in the task manager
...
Provide the function to update extra attributes in the task manager
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-12-24 15:52:37 +08:00
He Weiwei
7b4c4b76e7
feat: add trigger to the metrics of the scan all job ( #13838 )
...
Add the trigger to the metrics of the scan all job so that the customer
can know who trigger the latest scan all job.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-24 14:30:43 +08:00
Wenkai Yin(尹文开)
d32a243508
Use the same transaction to remove the schedule to avoid dead lock in database ( #13820 )
...
Use the same transaction to remove the schedule to avoid dead lock in database
Fixes #13808
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-12-23 15:37:51 +08:00
Will Sun
28734d7ac4
Fix a save button bug on system setting page ( #13830 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-23 13:00:45 +08:00
Daniel Jiang
c660727877
Merge pull request #13800 from reasonerjt/authproxy-redirect
...
Add handler to handle redirect via authproxy
2020-12-23 03:00:18 +08:00
stonezdj(Daojun Zhang)
bc0b6b43ed
Merge pull request #13791 from reasonerjt/oidc-redirect-extra-parm
...
Add extra parms when forming redirect URI for OIDC
2020-12-22 21:45:53 +08:00
Daniel Jiang
7321e3547d
Add handler to handle redirect via authproxy
...
This commit add a handler to handle the request to
"/c/authproxy/redirect". Harbor is configured to authenticate against
an authproxy, if a request with query string `?token=xxxx`
is sent to this URI, the handler will do tokenreview according to the
setting of authproxy and simulate a `login` workflow based on the result
of token review.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-12-22 18:59:17 +08:00
He Weiwei
3831e82b20
refactor: remove code of admin job ( #13819 )
...
Remove code of admin job as it's not needed by scan all/gc now.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-22 11:48:16 +08:00
He Weiwei
8fa03e3739
refactor: remove code of scan all job ( #13821 )
...
Remove code of scan all job as it's implemented by execution now.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-22 11:39:18 +08:00
stonezdj
aa3002e7a5
Add content type and length in header
...
Fixes #13740
Update ManifestExist to return Descriptor instead of digest
For docker 20.10 or containerd, it HEAD the manifest before pull, then
it GET the manifest with digest, add logic to handle this scenario and
correlate the tag between the digest in proxy cache
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-12-21 20:21:28 +08:00
Wenkai Yin(尹文开)
53c8ad8228
Merge pull request #13813 from heww/scan-all-apis
...
refactor(api): move scan all apis to go-swagger
2020-12-21 16:40:09 +08:00
fanjiankong
1b93a9f4b0
Remove some TCR UT Case
...
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-12-21 16:24:46 +08:00
AllForNothing
b749ba4e54
Fix filter bug for replication tasks page
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-21 15:11:35 +08:00
He Weiwei
ce6ed3eeb7
refactor(api): move scan all apis to go-swagger
...
Move scan all APIs from beego to go-swagger.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-21 02:17:02 +00:00
Wang Yan
9bc6f3cee4
fix robot account update issue ( #13741 )
...
* fix robot account update issue
enable the update method to support both v1 & v2 robot update
Signed-off-by: Wang Yan <wangyan@vmware.com>
* resolve review comments
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-18 20:01:26 +08:00
Wang Yan
6bc1047013
migration admin job data ( #13766 )
...
1, migrate gc and scan all schedule to schedule/task/exectuion
2, migrate gc history to task/execution
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-18 16:35:24 +08:00
Will Sun
4392a626f3
Merge pull request #13804 from AllForNothing/scan-all
...
Fix robot account UI issues
2020-12-18 15:48:26 +08:00
Wang Yan
e9797d7c16
fix gc log not found issue ( #13790 )
...
It needs to use the execution ID to get task firstly and then use the required task id to query GC log
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-18 14:50:50 +08:00
AllForNothing
b20cc474b3
Fix robot account UI issues
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-18 14:11:08 +08:00
stonezdj
3334defd92
Revert "fix issue"
...
This reverts commit e6f80259
This reverts commit 918fe125
Signed-off-by: stonezdj <stonezdj@gmail.com>
Revert "Add content type and length in header"
This reverts commit ca379111
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-12-18 12:35:39 +08:00
stonezdj(Daojun Zhang)
05f327cfbd
Merge pull request #13751 from stonezdj/201211_add_content_type_length
...
Add content type and length in header
2020-12-17 18:19:38 +08:00
Wang Yan
dfe678457f
fixes robot account list permission issue ( #13792 )
...
fixes #13786 , do not add the removed project into the permission list of a system level robot account.
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-17 17:50:14 +08:00
He Weiwei
792dcc4ac3
fix(scan): returns 400 when artifact not support by scanner ( #13785 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-17 16:58:49 +08:00
stonezdj
e6f80259f7
fix issue
...
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-12-17 16:33:17 +08:00
stonezdj
918fe125b7
fix issue
...
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-12-17 16:17:56 +08:00
stonezdj
ca37911113
Add content type and length in header
...
Fixes #13740
Update ManifestExist to return Descriptor instead of digest
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-12-17 15:42:49 +08:00
He Weiwei
18b850782e
fix: fix errors detected by codeql
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-17 06:15:34 +00:00
Daniel Jiang
c1c55d0cee
Add extra parms when forming redirect URI for OIDC
...
Fixes #13092
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-12-16 19:41:13 +08:00
Daniel Jiang
3b04d2f8f5
Escape the values to contains
operator in dao packages ( #13774 )
...
fixes #13018
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-12-16 14:19:20 +08:00
Will Sun
488d802a2b
Merge pull request #13768 from AllForNothing/permission-list
...
Add new permissions to robot account
2020-12-16 13:30:24 +08:00
Wang Yan
01eb60c36b
add permission checking for gc operation ( #13756 )
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-15 23:27:12 +08:00
AllForNothing
055572df3d
Add new permissions to robot account
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-15 18:34:37 +08:00
stonezdj(Daojun Zhang)
1eb0287ecb
Merge pull request #13709 from stonezdj/201209_dockerhub_limit2
...
Cache manifest list for proxy cache
2020-12-15 14:03:39 +08:00
Will Sun
6849cd03a9
Merge pull request #13719 from sluetze/13568-typofix
...
fixed small typos in variable names
2020-12-15 13:47:30 +08:00
stonezdj
670a94835b
Cache manifest list for proxy cache
...
Fixes #13566 : Quota of dockerhub is still used in v2.1.1 after the image is cached
Cache manifest list in redis cache.
Trade off between efficiency and data integrity, it might cause the proxy cache return the full content of a manifest list instead of the actual manifest list saved in the Harbor storage, which is a part of the manifest list. but this change doesn't break any /v2/ API, just caches full manifest list.
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-12-15 11:30:30 +08:00
He Weiwei
10e4350360
test(cache): increase sleep time to fix ut ( #13761 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-14 19:22:42 +08:00
Wenkai Yin(尹文开)
fd900889c1
Merge pull request #13729 from ywk253100/201210_fix
...
Tiny fixes for task manager
2020-12-14 18:41:46 +08:00
Wenkai Yin(尹文开)
c6bfa04661
Merge pull request #13759 from bitsf/fix_tencenttcr_getAdapterInfo
...
fix_tencenttcr_getAdapterInfo
2020-12-14 17:30:22 +08:00
Wenkai Yin
69808f033e
Tiny fixes for task manager
...
1. Add update time for execution
2. Add unique constraint for schedule to avoid dup records when updating policies
3. Format replication log
4. Keep the webhook handler for legacy replication jobs to avoid jobservice resending the status change request
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-12-14 17:26:32 +08:00
Will Sun
fff1bbe8d9
Merge pull request #13757 from AllForNothing/new-auth-mode
...
Add admin groups parameter to http auth
2020-12-14 17:02:24 +08:00
AllForNothing
11b706adeb
Add admin groups parameter to http auth
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-14 16:02:34 +08:00
Ziming Zhang
d8b5746df1
fix_tencenttcr_getAdapterInfo
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-12-14 16:02:19 +08:00
He Weiwei
af24a073dc
feat(api): support project name in the path of apis ( #13744 )
...
Support project name in the path of projects and robotsV1 APIs.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-14 15:48:52 +08:00
Will Sun
949379f7bc
Merge pull request #13755 from AllForNothing/new-registry
...
Improve regitries UI to cover new registries
2020-12-14 14:45:23 +08:00
AllForNothing
8de8122119
Improve regitries UI to cover new registries
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-14 14:07:36 +08:00
He Weiwei
08580f9fec
refactor(scan): refactor scan/scan all job to task manager ( #13684 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-14 13:34:35 +08:00
Will Sun
90f9bea965
Merge pull request #13752 from AllForNothing/improve-robot
...
Improve refresh secret page for robot account UI
2020-12-14 11:13:10 +08:00
Wenkai Yin(尹文开)
6569016d35
Merge pull request #13139 from wy65701436/migrate-gc
...
Migrate gc to task manager
2020-12-14 10:43:44 +08:00
Wang Yan
39e1a4f2b4
add extra attributes in the schedule table
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-14 02:28:52 +08:00
Wenkai Yin(尹文开)
43104ab0b9
Merge pull request #13724 from reasonerjt/http-auth-admin-grp
...
Support admin group in http authproxy
2020-12-11 13:06:26 +08:00
Daniel Jiang
4ff1c99ea0
Merge pull request #13539 from ninjadq/add_exporter_for_harbor
...
Add exporter for harbor
2020-12-11 12:52:03 +08:00
Daniel Jiang
fc94da54c1
Merge pull request #13728 from heww/fix-ut-for-get-reserved-resources
...
test(quota): increase sleep time to fix fail of test
2020-12-11 12:49:01 +08:00
Wenkai Yin(尹文开)
a4f21b1d85
Merge pull request #13694 from kofj/ghcr-provider
...
GHCR Provider
2020-12-11 09:41:10 +08:00
He Weiwei
2e09e54b38
test(quota): increase sleep time to fix fail of test
...
Increase the sleep time to fix the fail in TestGetReservedResources of
quota
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-10 11:23:47 +00:00
wang yan
1bb79d402d
update code per review comments
...
Signed-off-by: wang yan <wangyan@vmware.com>
2020-12-10 16:08:52 +08:00
Daniel Jiang
60e3668d43
Support admin group in http authproxy
...
This commit adds admin_groups into the configuration of http_auth
settings, it's a string in the form of "group1, group2". If the token
review result shows the user is in one of the groups in the setting he
will have the administrator role in Harbor.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-12-10 15:57:15 +08:00
Wang Yan
dba5522d0b
Migrate to task manager ( #129 )
...
1, remove the gc to new programming model
2, move api define to harbor v2 swagger
3, leverage task & execution manager to manage gc job schedule, trigger and log.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-12-10 14:00:33 +08:00
sluetze
5584e55070
fixed small typos in variable names
...
Signed-off-by: sluetze <13255307+sluetze@users.noreply.github.com>
2020-12-09 15:24:22 +01:00
DQ
85bf88c74e
Add test case exporter
...
- cache ut
- cli ut
- project collector ut
- system collector ut
Signed-off-by: DQ <dengq@vmware.com>
2020-12-09 21:47:29 +08:00
DQ
d95f22448c
Add cache for exporter
...
Add timed cache for exporter
default cache time is 30s, cleanup job run every 4 hours
Signed-off-by: DQ <dengq@vmware.com>
2020-12-09 21:22:40 +08:00
DQ
ade69e20ef
Fix typo
...
Signed-off-by: DQ <dengq@vmware.com>
2020-12-09 20:42:21 +08:00
DQ
e6b53593ee
Add exporter to harbor
...
- add main file
- add pkg file
- update go.mod
- update vendor
Signed-off-by: DQ <dengq@vmware.com>
2020-12-09 20:42:14 +08:00
Steven Zou
c12664122c
fix(api):update stop job api
...
- update StopJob() of basic worker
- update UnSchedule() of basic scheduler
- update the policy store to get more data
fix #13599 , fix #13597
Signed-off-by: Steven Zou <szou@vmware.com>
2020-12-09 20:42:01 +08:00
Steven Zou
4acb708938
Merge pull request #13705 from steven-zou/fix/js_api
...
fix(api):update stop job api
2020-12-09 13:41:58 +08:00
Will Sun
13900df810
Merge pull request #13710 from AllForNothing/ut-case
...
Fix UI UT failure
2020-12-09 12:13:34 +08:00
AllForNothing
2f2e85577d
Fix UI UT failure
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-09 11:33:55 +08:00
fanjiankong
2898117411
GHCR Provider
...
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-12-09 09:54:04 +08:00
Steven Zou
85783f3c0c
fix(api):update stop job api
...
- update StopJob() of basic worker
- update UnSchedule() of basic scheduler
- update the policy store to get more data
fix #13599 , fix #13597
Signed-off-by: Steven Zou <szou@vmware.com>
2020-12-08 23:15:05 +08:00
He Weiwei
e92674a42a
feat: add cache library and enable it in config manager ( #13525 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-12-08 17:40:03 +08:00
疯魔慕薇
9f8a743da9
Tecent TCR Provider
...
1. Docker image registry.
2. Helm chart registry.
Signed-off-by: 疯魔慕薇 <kfanjian@gmail.com>
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-12-08 15:44:18 +08:00
AllForNothing
7cddb5845f
Improve refresh secret page for robot account UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-08 13:42:32 +08:00
stonezdj(Daojun Zhang)
ec2f251d63
Merge pull request #13685 from wy65701436/robot-name-conflict
...
fix robot name conflicate issue
2020-12-07 11:18:49 +08:00
Wenkai Yin(尹文开)
65b6ae08bb
Merge pull request #13618 from mmpei/official-feature-artifact-hub
...
Support replicate from artifact hub
2020-12-07 10:47:05 +08:00
Daniel Jiang
fef5317aef
Merge pull request #13382 from flaviodsr/fix_core_init
...
Fix deadlock on harbor-core initialization
2020-12-04 19:51:56 +08:00
Will Sun
0840a10752
Merge pull request #13615 from AllForNothing/too-much-tag
...
Add limitation to artifact tags
2020-12-04 15:47:37 +08:00
AllForNothing
6e52fbdf71
Add system robot accout UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-12-04 14:19:36 +08:00
Wang Yan
e3a353d8ae
fix robot name conflicate issue
...
add project name into project level robot account name
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-04 12:40:59 +08:00
Wang Yan
d2fa2e6b84
update robot secret ( #13654 )
...
* update robot secret
1, use SHA256 to generate and validate robot secret instread of symmetric encryption.
2, update the patch input object
Signed-off-by: Wang Yan <wangyan@vmware.com>
* update robot secret
1, use SHA256 to generate and validate robot secret instread of symmetric encryption.
2, update the patch input object
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-03 18:13:06 +08:00
Daniel Jiang
73c3f7c7ea
Fix the pattern to match v2 catalog URI
...
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-12-03 12:53:04 +08:00
Wenkai Yin(尹文开)
ddb29f2243
Set timezone as UTC for database connection ( #13661 )
...
Set timezone as UTC for database connection
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-12-03 08:55:48 +08:00
Wenkai Yin(尹文开)
7e289e67ca
Merge pull request #13666 from reasonerjt/bump-up-goldap
...
Bump up go-ldap to v3.2.4
2020-12-02 18:15:00 +08:00
Daniel Jiang
34d776b062
Bump up go-ldap to v3.2.4
...
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-12-02 15:28:54 +08:00
Will Sun
dbec54573c
Merge pull request #13511 from sluetze/12807-i18n-de-de
...
[i18n] added support for German
2020-12-02 13:42:52 +08:00
Qian Deng
688dc3af70
Merge pull request #13652 from ninjadq/fix_metric_inc_with_huge_num
...
Fix instrumenting handler nest issue
2020-12-01 20:23:41 +08:00
Daniel Jiang
0edbc0db75
Merge pull request #13641 from reasonerjt/v2-auth-host
...
Consider the default port when comparing the hosts
2020-12-01 18:55:34 +08:00
Wang Yan
732e9a21cd
updates on robot accounts ( #13623 )
...
* updates on robot accounts
1, add patch method to refresh secret of a robot
2, fix robot account update issue
3, add editable attribute to handle the version 1 robot account
4, add duration for robot account
5, hide secret for get/list robot account
Signed-off-by: wang yan <wangyan@vmware.com>
* update code per review comments
1, change expirate creation func to AddDate().
2, remove the scanner duration specification, use the default value.
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-12-01 18:31:34 +08:00
DQ
72ff33f80b
Fix instrumenting handler nest issue
...
remove nested handler for instrumenting
Signed-off-by: DQ <dengq@vmware.com>
2020-12-01 17:12:19 +08:00
Steven Zou
2b65f7eb4b
Merge pull request #13534 from bitsf/fix_redis_sentinel_chart
...
fix(redis) redis sentinel for chart cache
2020-12-01 16:56:24 +08:00
Daniel Jiang
413dad98a8
Consider the default port when comparing the hosts
...
This commit cover the cases when the port is set in one of the Host of
request or the core URL, to make sure the comparison works as expected
when the default port (80, 443) is added in only one of them.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-12-01 16:48:28 +08:00
AllForNothing
b0ec990ce6
Fix null pointer exception for auth guard
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-11-30 22:55:11 +08:00
Wang Yan
8cbfa6f382
add with details option for list project ( #13634 )
...
default is true and doesn't break any existing api, and when to set it to false, the api only return the basic project infor
without meta, CVE settings and etc of the project.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-11-30 16:13:07 +08:00
Qian Deng
b80b1a7abf
Merge pull request #13617 from ninjadq/remove_clair_in_harbor_code
...
Remove clair code in harbor
2020-11-30 15:28:02 +08:00
Daniel Jiang
db8ce49133
Rework systeminfo API. ( #13606 )
...
This commit rework the systeminfo API under new programming model.
Also fixes #9149
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-11-30 14:15:18 +08:00
sluetze
33fe276114
added support for german
...
Signed-off-by: sluetze <13255307+sluetze@users.noreply.github.com>
2020-11-27 16:43:31 +01:00
DQ
590212b485
Remove clair related code
...
- clair code in harbor core
- clair code in frontend
- clair code in robotcase
Signed-off-by: DQ <dengq@vmware.com>
2020-11-27 14:01:04 +08:00
stonezdj(Daojun Zhang)
dec12308a1
Merge pull request #13621 from stonezdj/201127_fail_to_add_ldap_group
...
Lowercase the LDAP DN in UnderBaseDN
2020-11-27 11:45:07 +08:00
stonezdj(Daojun Zhang)
5a34f4e8fa
Merge pull request #13548 from wy65701436/robot2-swagger-api-dev
...
add robot account 2 api handler
2020-11-27 11:32:24 +08:00
Ziming Zhang
e44d58ee41
fix(redis) redis sentinel for chart cache
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-11-27 11:08:38 +08:00
stonezdj
ca245d3545
Lowercase the LDAP DN in UnderBaseDN
...
Fixes #13362 : Unable to add LDAP group with different letter case in DN
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-11-27 10:30:19 +08:00
peimingming
186109162b
Support replicate from artifact hub
...
Signed-off-by: peimingming <peimingming@corp.netease.com>
2020-11-26 21:41:24 +08:00
Daniel Jiang
fd54a568d0
Merge pull request #13500 from thechristschn/fix-searchgroupbyname
...
Fix api ldap group search by name
2020-11-26 16:38:13 +08:00
AllForNothing
4390b2f259
Add limitation to artifact tags
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-11-26 14:39:33 +08:00
Wang Yan
02846194e0
parent 8e61a3ea31
...
author Wang Yan <wangyan@vmware.com> 1605849192 +0800
committer Wang Yan <wangyan@vmware.com> 1606361046 +0800
update code per review comments
Signed-off-by: wang yan <wangyan@vmware.com>
2020-11-26 14:10:12 +08:00
Wang Yan
8e61a3ea31
add robot account 2 api handler
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-11-26 11:10:05 +08:00
stonezdj(Daojun Zhang)
90c5505430
Merge pull request #13591 from heww/fix-issue-13387
...
fix(quota): ignore the fail when getting reference of quota
2020-11-25 15:09:22 +08:00
He Weiwei
eb38180483
fix(quota): ignore the fail when getting reference of quota
...
1. Clean the dirty data in quota/quota_usage.
2. Ignore the fail when getting the reference of quota.
Closes #13387
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-11-24 14:50:38 +00:00
Will Sun
039722c518
Merge pull request #13585 from AllForNothing/proxy
...
Add new supported registries for proxy cache on UI
2020-11-24 16:45:07 +08:00
Will Sun
fc4a6fdd7b
Merge pull request #13496 from AllForNothing/rep-cron
...
Improve adding replication rule page
2020-11-24 16:16:37 +08:00
AllForNothing
69b5722cef
Add new supported registries for proxy cache on UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-11-24 15:56:18 +08:00
Wenkai Yin(尹文开)
fe8b628f0c
Merge pull request #13437 from ywk253100/200929_replication
...
Refactor the replication execution
2020-11-24 10:38:22 +08:00
Steven Zou
35a0fc7afd
Merge pull request #13330 from chlins/fix/scanner-apikey-authorization
...
fix: fix scanner apikey type match error
2020-11-23 17:06:35 +08:00
Wenkai Yin
294385c34d
Refactor the replication execution
...
1. Use the task manager to manage the underlying execution/task
2. Use the pkg/scheduler to schedule the periodical job
3. Apply the new program model
4. Migration the old data into the new data model
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-11-23 14:24:10 +08:00
Daniel Jiang
3536a5dfac
Merge pull request #13452 from ninjadq/fix_status_code_issue_on_metrics
...
Fix status code in metrics issue
2020-11-23 10:37:47 +08:00
Daniel Jiang
00c941a413
Merge pull request #13557 from heww/fix-issue-13556
...
fix: remove auto re-readable body in BeforeRequest
2020-11-23 01:08:52 +08:00
He Weiwei
f733f95300
fix: remove auto re-readable body in BeforeRequest
...
Remove nop close body in the BeforeRequest helper function.
Middleware must make the request body re-readable itself when it wants
read the body in the middleware.
Closes #13556
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-11-20 01:41:12 +00:00
Wang Yan
04c4354df9
add robot account version 2 controller ( #13472 )
...
the controller is for the enhanced robot account
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-11-19 15:39:45 +08:00
Wenkai Yin(尹文开)
def782b6f8
Don't escape the name when doing the exact matching for tag ( #13533 )
...
Don't escape the name when doing the exact matching for tag
Fixes #13106
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-11-18 14:34:48 +08:00
DQ
a6edf51574
Fix status code in metrics issue
...
Stauts code can't get from request. It shoud be recorded by a delegator
Signed-off-by: DQ <dengq@vmware.com>
2020-11-17 19:53:06 +08:00
stonezdj(Daojun Zhang)
fb549b2d9e
Merge pull request #13444 from wy65701436/robot2-self-mgr
...
add robot mgr
2020-11-16 11:33:33 +08:00
Christian Baumann
4530e9feee
Fix api ldap group search by name
...
Signed-off-by: Christian Baumann <thechristschn@gmail.com>
2020-11-12 23:01:02 +00:00
sshijun
3d526e220c
Improve adding replication rule page
...
Signed-off-by: sshijun <sshijun@vmware.com>
2020-11-12 18:17:26 +08:00
He Weiwei
76f1afbe0d
refactor: remove core/promgr pkg ( #13408 )
...
* refactor: remove core/promgr pkg
Remove `core/promgr` package and use `controller/project` instead of it.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-11-12 15:33:13 +08:00
Wang Yan
3550b5e5e9
add robot mgr
...
the robot account manager to handle the CRUD
Signed-off-by: wang yan <wangyan@vmware.com>
2020-11-11 13:47:03 +08:00
stonezdj(Daojun Zhang)
ca8cb87790
Merge pull request #13439 from wy65701436/robot2-mgr
...
add role permission manager for robot enhancement
2020-11-11 10:35:10 +08:00
Will Sun
d32527dfd7
Merge pull request #13470 from AllForNothing/tooltp
...
Fix tooltip bug for adding replication rule page
2020-11-10 20:43:12 +08:00
Wang Yan
9723655378
update code per review comments
...
1, rename table name to permission_policy
2, rename functions name
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-11-10 18:11:31 +08:00
Wang Yan
ec15e320bf
add role permission manager for robot enhancement
...
1, add two db tables of role permission and rbac policy
2, add manager of these two tables
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-11-10 16:49:29 +08:00
He Weiwei
ebc3443da9
Merge pull request #13474 from heww/fix-issue-11892
...
fix: compute artifact size from db for schema1 manifest
2020-11-10 16:20:39 +08:00
sshijun
bf99f6d5cd
Fix tooltip bug for adding replication rule page
...
Signed-off-by: sshijun <sshijun@vmware.com>
2020-11-10 10:29:08 +08:00
Wenkai Yin
69ddb9c2a8
Downgrade the version of github.com/prometheus/client_golang to 1.7.1 to avoid the compile error in mac
...
The version 1.8.0 of "github.com/prometheus/client_golang" bumps up lib "golang.org/x/sys" which referenced by "github.com/docker/docker@1.4.2". The changes of "golang.org/x/sys" causes the compile error in mac
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-11-10 08:49:03 +08:00
He Weiwei
9c8377909b
fix: compute artifact size from db for schema1 manifest
...
Closes #11892
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-11-09 12:32:07 +00:00
Will Sun
039733b200
Merge pull request #13435 from AllForNothing/robot-prefix
...
[UI]add robot name prefix
2020-11-05 10:36:53 +08:00
He Weiwei
955431257c
Merge pull request #13422 from heww/disable-db-acess-for-ping
...
feat: skip middlewares require db for ping
2020-11-05 08:19:49 +08:00
stonezdj(Daojun Zhang)
7c1ad11763
Merge pull request #13425 from wy65701436/robot-prefix
...
add robot name prefix
2020-11-04 11:48:42 +08:00
Steven Zou
af7000d277
Merge pull request #13417 from bitsf/fix_gitlab_replication_task_num
...
fix(replication) gitlab replication task num not correct
2020-11-04 11:33:57 +08:00
Will Sun
c42ffe0915
Merge pull request #13410 from AllForNothing/helm-hub
...
Add deprecated mark to Helm Hub
2020-11-04 11:03:45 +08:00
Wang Yan
62208dc3e4
fix code conflict
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2020-11-03 09:42:37 -08:00
AllForNothing
ca93eb2218
Add robot name prefix to system setting UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-11-03 16:34:36 +08:00
Will Sun
e0617be15d
Merge pull request #13419 from AllForNothing/improve-ui
...
Improve UI according to the designer's commonts
2020-11-03 16:11:33 +08:00
Wang Yan
5a22019e3d
add robot name prefix
...
The system admin can set the prefix in configuration UI.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-11-02 23:12:57 -08:00
AllForNothing
6452d38925
Add deprecated mark to Helm Hub
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-11-03 15:04:15 +08:00
DQ
ae80aa796e
Upgrade Prometheus Client Version
...
upgrade to v1.8.0
Signed-off-by: DQ <dengq@vmware.com>
2020-11-03 14:33:11 +08:00
DQ
eb470501be
Add metrics to Harbor Core
...
1. Add configs in prepare
2. Add models and config items in Core
3. Encapdulate getting metric in commom package
4. Add a middleware for global request to collect 3 metrics
Signed-off-by: DQ <dengq@vmware.com>
2020-11-03 14:33:10 +08:00
Ziming Zhang
8c2c758677
fix(replication) gitlab replication task num not correct
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-11-03 10:55:46 +08:00
Wenkai Yin(尹文开)
99d818f4db
Merge pull request #13406 from mmpei/offical-replicate-chart-fix-20201031
...
fix chart replication issue of uppercase letters
2020-11-03 10:55:40 +08:00
He Weiwei
0c5aedb3d9
feat: skip middlewares require db for ping
...
The ping endpoint will be blocked when DB conns reach the max open conns
of the sql.DB which will make ping request timeout,
so skip the middlewares which will require DB conn.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-11-03 01:58:59 +00:00
AllForNothing
58450c335f
Improve UI according to the designer's commonts
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-11-02 17:17:35 +08:00
Wenkai Yin(尹文开)
dd3ffd4147
Merge pull request #13361 from bitsf/aws_adapter_namespace_check
...
feature(replication) check namespace existing first for AWS adapter
2020-11-02 16:56:50 +08:00
Will Sun
9a38dca1a6
Merge pull request #13401 from AllForNothing/label-selection
...
Improve label selection for artifact list page
2020-11-02 13:44:28 +08:00
peimingming
6394cc767e
fix chart replication issue of uppercase letters
...
Signed-off-by: peimingming <peimingming@corp.netease.com>
2020-11-01 00:29:46 +08:00
疯魔慕薇
2bab4a10db
Merge pull request #13393 from chlins/fix/p2p-preheat-instance-and-policy-post-no-location
...
fix(preheat): add location when create instance and policy
2020-10-31 23:48:41 +08:00
AllForNothing
120e8dd3d1
Improve label selection for artifact list page
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-30 14:43:59 +08:00
Will Sun
a255f3e74d
Merge pull request #13376 from AllForNothing/p2p-css
...
Fix a bug for editing p2p instance
2020-10-29 19:57:51 +08:00
Will Sun
8fda6bbb83
Merge pull request #13386 from AllForNothing/align
...
Fix css bug for adding p2p policy
2020-10-29 19:57:14 +08:00
Greg
d1ee94bbc9
DTR replication support ( #9512 )
...
Adding DTR replication support
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
2020-10-29 18:54:44 +08:00
chlins
9887154a0a
fix(preheat): add location when create instance and policy
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-10-29 18:16:59 +08:00
AllForNothing
1417be1ffc
Fix css bug for adding p2p policy
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-29 09:25:35 +08:00
AllForNothing
cc1eb1de86
Fix a bug for editing p2p instance
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-29 09:14:14 +08:00
Will Sun
fc65f5bf69
Merge pull request #13375 from AllForNothing/rep-filter
...
Fix filter bug for replication rule list
2020-10-29 09:10:31 +08:00
Daniel Jiang
535728d11f
Merge pull request #13306 from heww/refactor-security-context
...
refactor(security): use controller instead of promgr in security
2020-10-29 02:39:59 +08:00
Flávio Ramalho
ef6414be3e
Fix deadlock on harbor-core initialization
...
During the harbor core initialization if the database takes longer to
be ready there is a risk of deadlock when checking for the TCP connection
with the database.
The `TestTCPConn` function uses unbuffered channels to check when the
connection succeeds/timeouts. The timeout check is executed in parallel
with the connection check (this runs in a gorountine). The deadlock happens
when the goroutine execution takes longer than the function timeout
(hence setting `cancel <- 1`) and the DialTimeout call succeeds (hence
setting `success <- 1`). At this point both threads are waiting for the
channels values to be read.
This is reproducible mostly on slow systems where initializing the
database takes longer and finishes during the 5th time of the
`DialTimeout` call where it eventually exceeds the TestTCPConn timeout.
This fix sets the `success` and `cancel` channels as buffered
(non-blocking).
Signed-off-by: Flávio Ramalho <framalho@suse.com>
2020-10-28 17:09:34 +01:00
AllForNothing
53dc8f0bcf
Fix filter bug for replication rule list
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-28 12:29:33 +08:00
Will Sun
ec790d0afd
Merge pull request #13347 from AllForNothing/vul-list
...
Improve vilnerability list UI
2020-10-28 10:24:18 +08:00
Ziming Zhang
a7d906649c
feature(replication) check namespace existing first for AWS adapter
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-10-26 16:40:13 +08:00
AllForNothing
5475738a28
Fix css and i18n bugs
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-26 16:09:13 +08:00
AllForNothing
64ddef2e1d
Improve vilnerability list UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-23 15:03:33 +08:00
Daniel Jiang
9c1da3a405
Add more info in log message to help debug
...
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-10-22 18:55:01 +08:00
Daniel Jiang
eadb65f988
Merge pull request #13312 from reasonerjt/oidc-admin-group
...
Add admin group support to OIDC auth mode
2020-10-22 18:30:10 +08:00
Daniel Jiang
649c9814e4
Address review comment by Yan
...
Resolve review comment in PR #13312
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-10-22 16:53:37 +08:00
AllForNothing
ea494af06e
Fix a css bug of Clarity page size selection
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-22 16:48:35 +08:00
chlins
21b56d241a
fix: fix scanner apikey type match error
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-10-21 18:29:19 +08:00
danfengliu
8af343f27a
Merge pull request #13324 from ywk253100/201021_project_cherry_pick
...
Return the location header when creating proxy cache project
2020-10-21 17:07:15 +08:00
Wenkai Yin(尹文开)
84971fc77d
Merge pull request #13316 from stonezdj/201020_dup_group_filter
...
Remove dup call to createGroupSearchFilter in searchGroup
2020-10-21 14:53:45 +08:00
Wenkai Yin
3021558272
Return the location header when creating proxy cache project
...
Fixes #13303 . Return the location header when creating proxy cache project
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-10-21 14:35:48 +08:00
Will Sun
1e421748bc
Merge pull request #13302 from AllForNothing/rep-rule
...
Add page size options to datagrid
2020-10-21 11:14:44 +08:00
Daniel Jiang
7c57e984a8
Merge pull request #13313 from AllForNothing/oidc
...
[UI]Add admin group support to OIDC auth mode
2020-10-21 11:10:28 +08:00
stonezdj
ca7258617b
Remove dup call to createGroupSearchFilter in searchGroup
...
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-10-20 19:07:33 +08:00
AllForNothing
e7c53dc28a
Add oidc admin group to oidc setting ui
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-20 17:47:00 +08:00
Daniel Jiang
f4ff369ed0
Add admin group support to OIDC auth mode
...
Add oidc_admin_group to configuration, and make sure a token with the
group name in group claim has the admin authority.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-10-20 15:38:58 +08:00
chlins
73981062a9
fix: fix quay adapter catalog api return error
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-10-20 14:24:25 +08:00
AllForNothing
7b32fdb9f9
Add page size options to datagrid
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-19 18:42:19 +08:00
He Weiwei
ea0fbbeace
refactor(security): use controller instead of promgr in security
...
Use `project.Controller` instead of `promgr.ProjectManager` in security
implementations because we will remove `promgr` package later.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-10-19 10:33:51 +00:00
Will Sun
69b6bfd50a
Merge pull request #13239 from AllForNothing/unlogged
...
Allow un-logged users to visit public repos
2020-10-19 11:22:43 +08:00
stonezdj(Daojun Zhang)
88005e5028
Merge pull request #13267 from stonezdj/201014_no_default_group_filter
...
Refine ldap searchGroup function
2020-10-19 09:58:04 +08:00
stonezdj(Daojun Zhang)
8156f74bf4
Merge pull request #13266 from stonezdj/201009_proxy_head_containerd
...
Add middleware to proxy HEAD request for proxy cache project
2020-10-16 20:26:01 +08:00
AllForNothing
59fe9830b5
Allow un-logged users to visit public repos
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-10-16 17:21:36 +08:00
Wenkai Yin(尹文开)
c491c4f513
Merge pull request #13257 from reasonerjt/jwt-refact
...
Use pkg/token to generate JWT token
2020-10-16 16:31:26 +08:00
stonezdj
20ef7d3219
Refine LDAP searchGroup function
...
Search LDAP group with groupDN+filter, then match baseDN
Create a default filter when ldap group filter is empty
Fixes #13156
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-10-16 16:20:41 +08:00
stonezdj
0641b300f3
Add middleware to proxy HEAD request for proxy cache project
...
Fixes : #13153 , containerd need to head manifest before pull image
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-10-16 13:02:32 +08:00
Daniel Jiang
fb687aeef8
Use pkg/token to generate JWT token
...
This commit refactors the approach to encode a token in handler of /service/token,
by reusing pkg/token to avoid inconsistency.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-10-15 16:16:44 +08:00
stonezdj(Daojun Zhang)
cdd0eee2d4
Merge pull request #13162 from stonezdj/200921_rating_limit
...
Change the condition of LocalManifest
2020-10-14 19:34:38 +08:00
stonezdj
ee4b16ccdb
Change the condition of LocalManifest
...
Compare the local digest and the remote digest when pull by tag
Use HEAD request (ManifestExist) instead of GET request (GetManifest) to avoid been throttled
For manifest list, it can avoid GET request because cached manifest list maybe different with the original manifest list
Make RemoteInterface public
Fixes #13112
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-10-14 15:15:48 +08:00
stonezdj
9264105934
Add pull time for proxy cache artifact in first pull
...
Fixes #13152
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-10-14 13:35:42 +08:00
Daniel Jiang
c93858cdbc
Remove UT for helm hub adapter ( #13255 )
...
The helm hub adapter will not work due to the shift to artifact hub and
the API has changed. more details see #13244
Remove the UT for helm hub adapter to unblock CI.
Later we need to rework the adapter to replicate from artifact hub.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-10-14 10:22:03 +08:00
Wenkai Yin(尹文开)
4d78fd4e4e
Merge pull request #13126 from Thoro/fix-10913-oidc-error-after-restart
...
fix #10913 : initialize oidc provider before calling Load
2020-10-14 10:13:52 +08:00
Thomas Rosenstein
874b0b1c0c
fix #10913 : initialize provider before calling Load
...
Signed-off-by: Thomas Rosenstein <thomas.rosenstein@creamfinance.com>
2020-09-30 17:25:29 +02:00
stonezdj(Daojun Zhang)
5293c8ff4b
Merge pull request #13053 from reasonerjt/fix-ldap-admingroup
...
Revert "Store User ID in session instead of the whole user model (#12…
2020-09-30 20:18:30 +08:00
AllForNothing
e999a15b02
Handle 504 error from backend
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-28 18:09:05 +08:00
AllForNothing
8d9a18b539
Update UI package to latest version
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-25 09:46:05 +08:00
Will Sun
18f41bad88
Merge pull request #13085 from AllForNothing/replication
...
Add disable/enable function to replication rules
2020-09-24 17:35:51 +08:00
Wenkai Yin(尹文开)
8b9727f53f
Support store the cron type in the schedule ( #13097 )
...
There is requirement that show the cron type(daily, weekly, etc.) on the UI, this commit adds the support for storing the cron type in the schedule model
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-09-24 16:48:56 +08:00
Wang Yan
1af4c5e7cb
bump up go-digest version ( #12992 )
...
Signed-off-by: wang yan <wangyan@vmware.com>
2020-09-24 16:47:29 +08:00
Wenkai Yin(尹文开)
a62f05893f
Merge pull request #13129 from ywk253100/200917_task_mgr
...
Tiny improvement for the task manager
2020-09-24 16:46:44 +08:00
Wenkai Yin
1a4106a996
Tiny improvement for the task manager
...
Add a new method "StopAndWait" which stops the execution and wait until the execution stopped or get an error
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-09-23 15:24:26 +08:00
stonezdj(Daojun Zhang)
20d4e86e0d
Merge pull request #13109 from Thoro/fix-encrypt-error-message
...
Add error log in case encryption on config save fails
2020-09-23 14:03:20 +08:00
Wenkai Yin(尹文开)
59f9ef7e5c
Abstract more info into the extra attributes for images ( #13014 )
...
1. Abstract the "config" property(which contains labels) of config layer into the extra attributes for images
2. Try to get the author information from the "maintainer" label
fixes 12066
fixes 12734
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-09-23 10:42:47 +08:00
Thomas Rosenstein
452a0c9c45
Add error log in case encryption on config save fails
...
Signed-off-by: Thomas Rosenstein <thomas.rosenstein@creamfinance.com>
2020-09-22 10:09:47 +02:00
AllForNothing
074f70158e
Improve i18n for tag deletion
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-18 09:33:24 +08:00
AllForNothing
abdbd79ed4
Add disable/enable function to replication rules
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-17 10:29:31 +08:00
AllForNothing
2d1c7ac76b
Disable endpont input fot docker-hub and helm-hub
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-16 14:56:31 +08:00
Wenkai Yin(尹文开)
5d22644136
Merge pull request #13040 from bitsf/replication_ecr_auth_role
...
feature(replication) enable role based auth for AWS ECR
2020-09-15 19:13:05 +08:00
Ziming Zhang
699518a22e
feature(replication) enable role based auth for AWS ECR
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-09-15 12:46:28 +08:00
Daniel Jiang
df106cf243
Revert "Store User ID in session instead of the whole user model ( #12984 )"
...
This reverts commit 6fc0c9d75a
.
Because this erases the AdminRoleInAuth attribute in user model as it is
not stored in DB and it will break the admin group of LDAP.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-09-15 10:05:31 +08:00
AllForNothing
60c2350088
Improve notary cmd on UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-14 18:39:22 +08:00
Will Sun
49c80f954c
Merge pull request #13025 from AllForNothing/uppercase
...
Change EXECUTE button to uppercase
2020-09-11 11:01:03 +08:00
Daniel Jiang
8846011571
Merge pull request #13017 from chlins/fix/webhook-verify-cert
...
fix(webhook): fix the verify cert logic of webhook endpoint
2020-09-11 02:18:57 +08:00
chlins
685d9277c4
fix(webhook): fix the verify cert logic of webhook endpoint
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-09-10 21:01:25 +08:00
Daniel Jiang
354eaac195
Escape the query string in list user ( #13013 )
...
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-09-10 20:17:53 +08:00
AllForNothing
01d4539a99
Change EXECUTE button to uppercase
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-10 11:09:13 +08:00
stonezdj(Daojun Zhang)
97b9cc2d5e
Merge pull request #12997 from stonezdj/200902_ldap_filter_fail
...
Add ldap filter syntax validation when create search filter
2020-09-09 16:21:01 +08:00
stonezdj
b9752f3112
Add ldap filter syntax validation when create search filter
...
Correct ldap search filter is enclosed with '(' and ')'
Search ldap group with the ldap group base DN instead of group DN
Fixes #12613 LDAP Group Filter and Group Base DN have no affect
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-09-09 10:07:07 +08:00
Daniel Jiang
513c48d47c
Merge pull request #12936 from wy65701436/fix-swagger-dep
...
remove the dependency on swagger models
2020-09-08 18:14:42 +08:00
Will Sun
5586fe86bf
Merge pull request #12988 from AllForNothing/test-4
...
Fix UI issues found on testing day
2020-09-08 01:12:10 +08:00
He Weiwei
6d50988c8b
fix(project): change to use user id to query projects of member
...
We know the user id when query projects by member, so use the user id
as entity_id directly in project_member, no need to join harbor_user
table.
Closes #12968
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-09-07 06:35:26 +00:00
AllForNothing
3fa3e14bb6
Fix UI issues found on testing day
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-07 12:50:48 +08:00
Daniel Jiang
6fc0c9d75a
Store User ID in session instead of the whole user model ( #12984 )
...
This commit makes a change so that the user id will be stored in sessoin
after user login instead of user model to avoid data inconsistency when
user model changes.
Fixes #12934
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-09-07 11:43:37 +08:00
stonezdj(Daojun Zhang)
4267570e99
Merge pull request #12960 from heww/ignore-enable-content-trust-for-proxy-cache
...
feat(project): ignore enable_content_trust for proxy project
2020-09-07 11:25:53 +08:00
Daniel Jiang
2f7c8c2abd
Check the tag in isArtifactSigned func
...
This commit ensures that when CLI is pulling a tag, the content trust middleware check the data in notary to ensure the particular tag is signed, not only the digest.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-09-05 17:00:55 +08:00
Chlins Zhang
0465ad733f
Merge pull request #12916 from chlins/fix/project-deletion-needs-delete-preheat-policy
...
fix(p2p): delete all preheat policies before delete project
2020-09-03 17:32:20 +08:00
Daniel Jiang
66c3fa9eec
Return basic auth challenge for /v2/_catalog ( #12956 )
...
Fixes #12192
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-09-03 11:31:57 +08:00
He Weiwei
f4938ca966
fix(scanner): move RemoveImmutableScanners before EnsureScanners ( #12957 )
...
RemoveImmutableScanners may delete the default scanner, so move it
before the EnsureScanners.
Closes #12938
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-09-03 11:11:16 +08:00
He Weiwei
41c839af88
feat(project): ignore enable_content_trust for proxy project
...
Ignore enable_content_trust metadata for proxy cache project, see
https://github.com/goharbor/harbor/issues/12940 to get more info
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-09-02 15:24:45 +00:00
Wang Yan
262f22f5ef
fix gc log issue ( #12943 )
...
1, Do not log redis url, just log the user input from UI.
2, Format the artifact trash items.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-09-02 17:11:05 +08:00
chlins
e01de8b201
fix(p2p): delete all preheat policies before delete project
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-09-02 16:39:51 +08:00
Wenkai Yin
7816ff5e85
retry several times when failed to copy blob during the replication
...
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-09-02 16:07:20 +08:00
wang yan
116d295462
remove the dependency on swagger models
...
1, remove the pkg dependency on v2.0/server/models
2, remove the controller dependency on v2.0/server/models
Signed-off-by: wang yan <wangyan@vmware.com>
2020-09-01 17:43:44 +08:00
Steven Zou
d4108e3fac
fix(preheat):handle fail case of preheat in job
...
Signed-off-by: Steven Zou <szou@vmware.com>
2020-08-28 17:55:36 +08:00
Wenkai Yin(尹文开)
560eba7bd1
Merge pull request #12894 from stonezdj/200827_dockerhub_offline
...
Fallback to local repo on errors when proxy to remote repo
2020-08-28 15:14:21 +08:00
Wenkai Yin(尹文开)
3abe8b8fab
Merge pull request #12456 from julienvey/fix-sql-typo
...
Fix typo in sql log
2020-08-28 10:04:27 +08:00
Wenkai Yin(尹文开)
bad704d38b
Merge pull request #12897 from reasonerjt/icon-refactor
...
Fill in the icon of known artifacts in artifact controller
2020-08-28 10:03:12 +08:00
Daniel Jiang
91e2779822
Fill in the icon of known artifacts in artifact controller
...
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-28 01:33:26 +08:00
Ziming Zhang
bda66e9e1f
Add aws China regions ECR support, both of cn-north-1 and cn-northwest-1 endpoints.
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-08-27 23:43:16 +08:00
stonezdj
6967d73476
Fallback to local repo on errors when proxy to remote repo
...
When the remote repo is offline or network issue or credential issue, fall back to local repo.
Fixes #12853
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-08-27 22:10:54 +08:00
Daniel Jiang
a651eb0949
Merge pull request #12883 from wy65701436/fixes-12254
...
fix event log issue
2020-08-27 16:52:24 +08:00
wang yan
b51aaac26e
fix event log issue
...
fixes #12554
Add string method for each event, and the detail can be logged in the core.log
Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-26 18:27:21 +08:00
He Weiwei
815ab61bc6
Merge pull request #12881 from heww/operator-from-security-username
...
refactor(event): change default operator to username of security
2020-08-26 15:42:36 +08:00
Ziming Zhang
c3fde4e483
fix(replication) gcr deletion and tag deletion
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-08-26 15:18:05 +08:00
He Weiwei
793c5ca57b
refactor(event): change default operator to username of security
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-26 05:52:02 +00:00
Steven Zou
87d18268e0
Merge pull request #12879 from kofj/fix_schedule_error_msg
...
Fix schedule error msg.
2020-08-26 11:04:10 +08:00
Steven Zou
79665ed997
Merge pull request #12875 from chlins/fix/disable-change-p2p-provider-vendor
...
fix(p2p): disable change provider vendor type
2020-08-26 10:59:50 +08:00
fanjiankong
bbad4db645
Fix schedule error msg.
...
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-08-25 23:41:15 +08:00
chlins
d8769a41cd
fix(p2p): disable change provider vendor type
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-25 16:56:17 +08:00
AllForNothing
5ae55eff6c
Fix UI issues found on round-2 testing day
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-25 13:10:45 +08:00
He Weiwei
2ab4fbefd6
Merge pull request #12862 from heww/fix-issue-12861
...
fix(quota): change log to debug level when warning not found
2020-08-24 16:37:58 +08:00
Wang Yan
ad47d2f444
fix upgrade issue ( #12857 )
...
fixes #12849
1, gives a default value to blob status in the migration script, and use none to replace the empty string as
the StatusNone, that will more readable on debugging failure.
2, GC jobs marks all of blobs as StatusDelete in the mark phase, but if encounter any failure in the sweep phase,
GC job will quite and all of blobs are in StatusDelete. If user wants to execute the GC again, it will fail as the
StatusDelete cannot be marked as StatusDelete. So, add StatusDelete in the status map to make StatusDelete can be
marked as StatusDelete.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-24 16:08:15 +08:00
He Weiwei
356be80f56
fix(quota): change log to debug level when warning not found
...
Closes #12861
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-24 07:55:46 +00:00
Daniel Jiang
c0602b5fb3
Merge pull request #12832 from ywk253100/200820_data
...
Add id column to data_migration table
2020-08-21 19:30:05 +08:00
Ted Guan
645dea36a6
Fix for duplicate webhook policy name ( #12729 )
...
Signed-off-by: guanxiatao <guanxiatao@corp.netease.com>
2020-08-20 18:02:13 +08:00
Wenkai Yin
975ef193dd
Add id column to data_migration table
...
Add id column to data_migration table and add logic to make sure there is only one data version record
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-20 17:43:15 +08:00
AllForNothing
b472907362
Change storage of csrf token from cookie to localstorage
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-20 16:22:25 +08:00
Daniel Jiang
05afb94b9b
Store csrf token in the header of response instead of cookie
...
The current approach will prevent the effectiveness of `Cache-Control`
header and gorilla's library add `Vary:Cookie` header in all responses.
We will set the token in a header of response so the response can be
cached when needed.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-20 15:46:02 +08:00
Will Sun
446ae4c173
Merge pull request #12817 from AllForNothing/test-2
...
Fix issues with label target 2.1 and RC
2020-08-20 15:13:27 +08:00
Wenkai Yin(尹文开)
d4f18139ef
Merge pull request #12618 from ywk253100/200729_tk_mgr
...
Refresh the status of execution for every status changing of task
2020-08-20 14:38:09 +08:00
AllForNothing
56083cd5c9
Fix issues with label target 2.1 and RC
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-19 16:46:28 +08:00
wang yan
a7b9495ba0
Merge branch 'master' of https://github.com/goharbor/harbor into fix-resource-order
2020-08-19 15:30:48 +08:00
He Weiwei
d894d4c8bc
Merge pull request #12799 from wy65701436/fixes-12795
...
fix gc job submit issue
2020-08-19 15:27:02 +08:00
Will Sun
c35a39d432
Merge pull request #12814 from AllForNothing/ui-ut
...
Improve UI UT for artifact list page
2020-08-19 15:08:19 +08:00
AllForNothing
2b441a7ee5
Improve UI UT for artifact list page
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-19 12:45:39 +08:00
wang yan
1cc73bd92a
Merge branch 'master' of https://github.com/goharbor/harbor into fix-resource-order
2020-08-19 12:21:45 +08:00
wang yan
648b80bc34
udpate resource list order
...
1, order label by creation time.
2, order webhook policy by creation time.
3, order replication policy by creation time.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-19 11:20:31 +08:00
Steven Zou
c1b6be6ac9
Merge pull request #12801 from heww/fix-issue-9471
...
refactor(scan): remove duplicate CVESet types
2020-08-19 10:37:10 +08:00
Ted Guan
eb317fb8cb
tag retention webhook support ( #12749 )
...
Signed-off-by: guanxiatao <guanxiatao@corp.netease.com>
2020-08-19 00:07:45 +08:00
stonezdj(Daojun Zhang)
f7e1d186e0
Merge pull request #12792 from ywk253100/200814_proxy_cache
...
Return 403 when trying to push artifacts into the proxy cache project…
2020-08-18 16:22:51 +08:00
stonezdj(Daojun Zhang)
716625a769
Merge pull request #12793 from ywk253100/200816_disable_tag
...
Disable the tag creation for the artifact under a proxy cache project
2020-08-18 16:15:33 +08:00
He Weiwei
ef37bd1afb
refactor(scan): remove duplicate CVESet types
...
Closes #9471
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-18 06:33:17 +00:00
wang yan
44f7bf6739
fix gc job submit issue
...
fixes #12795
Return 409 on triggering a GC job when there is a job ongoing.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-18 14:31:54 +08:00
Wang Yan
da52e677e5
remove robot accounts when to delete a project ( #12789 )
...
The robots associate with the project should be removed after the project is deleted.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-18 10:38:45 +08:00
Daniel Jiang
77281ca68b
Token service handling invalid resource ( #12790 )
...
This commit updates the way token service handles invalid resource, for
example a resource without projectname.
It will clear the requested access instead of returning 500 error.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-18 10:37:20 +08:00
Will Sun
89b597a811
Merge pull request #12783 from AllForNothing/p2p-4
...
Fix UI bugs found on testing day for target 2.1
2020-08-18 10:29:52 +08:00
Will Sun
9671ff1f10
Merge pull request #12701 from AllForNothing/artifact-icon
...
get artifact icon from backend API
2020-08-18 10:29:15 +08:00
fanjiankong
09ba463cc7
Fix.
...
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-08-17 21:40:37 +08:00
He Weiwei
16d1613b10
Merge pull request #12786 from heww/fix-artifact-scan-permission
...
fix(scan): fix the permission checking for artifact scanning
2020-08-17 18:30:18 +08:00
He Weiwei
f659523f50
fix(scan): fix the permission checking for artifact scanning
...
Closes #12778
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-17 09:55:38 +00:00
Wenkai Yin
0fd230c2d6
Refresh the status of execution for every status changing of task
...
Refresh the status of execution for every status changing of task to support filtering executions by status directly
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-17 17:38:55 +08:00
AllForNothing
b664c3c235
Fix UI bugs found on testing day for target 2.1
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-17 15:22:18 +08:00
He Weiwei
929fc8b3f7
Merge pull request #12787 from chlins/fix/preheat-get-log-api
...
fix(preheat): fix the swagger definition of preheat get log api
2020-08-17 14:54:12 +08:00
Wenkai Yin(尹文开)
2de10700d8
Merge pull request #12762 from monofone/10712-remove-forgot-password
...
remove reset password dialog from sign-in component
2020-08-17 14:24:36 +08:00
chlins
4f95c4d067
fix(preheat): fix the swagger definition of preheat get log api
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-17 12:41:02 +08:00
AllForNothing
e6541672d5
get artifact icon from backend API
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-17 10:21:47 +08:00
Wenkai Yin
e9ce631aa3
Disable the tag creation for the artifact under a proxy cache project
...
Disable the tag creation for the artifact under a proxy cache project
Fixes #12713
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-16 22:02:30 +08:00
Wenkai Yin
a73742c0a7
Return 403 when trying to push artifacts into the proxy cache project to avoid the retrying in the docker client
...
Return 403 when trying to push artifacts into the proxy cache project to avoid the retrying in the docker client
fixes #12731
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-16 21:22:22 +08:00
He Weiwei
f309896f2f
refactor(api): generate project apis by go-swagger
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-15 16:10:57 +00:00
Wenkai Yin
b1ddb5e2cc
Implement the icon API to get the icon of artifact
...
Implement the icon API to get the icon of artifact
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-15 08:40:38 +08:00
stonezdj(Daojun Zhang)
205f4f6695
Merge pull request #12768 from stonezdj/200813_bug12741
...
Use orm.Context instead request context in background go routing
2020-08-14 21:15:15 +08:00
stonezdj
ff937e90d3
Use orm.Context instead request context in background go routing
...
Fixes #12741 ,
Avoid use ctx info in event handler because it is background go routine
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-08-14 15:25:06 +08:00
Wenkai Yin
cca1dcca51
Use a separated database table to store the data version
...
Use a separated database table to store the data version.
Fixes #12747
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-14 11:38:13 +08:00
Sören Rohweder
8e876cb946
remove reset password dialog from sign-in component
...
As mentioned in #10712 forgot password should be removed. The
dialog was left in place.
Signed-off-by: Sören Rohweder <soeren.rohweder@fastleansmart.com>
2020-08-13 08:27:07 +02:00
Wang Yan
01e4aa61f7
fix gc remove manifest issue ( #12748 )
...
fixes #12720
The GC job doesn't remove the manifest of scheme1.MediaTypeSignedManifest as it's recognized by GC job.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-13 11:25:06 +08:00
He Weiwei
e476286fdc
Merge pull request #12755 from heww/expired-blob-size
...
fix(blob): make blob size in redis expired in 24 hours
2020-08-13 11:23:27 +08:00
chlins
b3012ec08d
fix(replication): fix quay adapter authorization
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-12 22:12:08 +08:00
He Weiwei
e3fd83aad1
fix(blob): make blob size in redis expired in 24 hours
...
Closes #11873
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-12 11:45:50 +00:00
Wang Yan
980c6291df
fix gc foreign layer issue ( #12736 )
...
fixes #12717
Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-12 16:43:26 +08:00
Yiyang Huang
b98dc97fbd
feat: enhanced default processor
...
Signed-off-by: Yiyang Huang <huangyiyang.huangyy@bytedance.com>
2020-08-11 01:31:02 +08:00
Yiyang Huang
b98b8b9159
Unify parameters for functions in Processor interface
...
Signed-off-by: Yiyang Huang <huangyiyang@caicloud.io>
2020-08-11 01:30:00 +08:00
Chlins Zhang
ad158964bb
Merge pull request #12690 from chlins/fix/preheat-disable-instance-precheck
...
fix(preheat): add precheck before disable instance
2020-08-10 17:36:29 +08:00
stonezdj(Daojun Zhang)
49f4559608
Merge pull request #12518 from stonezdj/202020717_duplicate_op
...
Fix #12487 : Proxy cache create duplicated operation log
2020-08-10 17:01:07 +08:00
Wenkai Yin(尹文开)
d599cd98bf
Merge pull request #10455 from chlins/fix/quay-replication-adapter-refactor
...
fix(replication): refactor quay adapter to fix authorization and supp…
2020-08-10 16:37:19 +08:00
stonezdj
aa8b3a1343
Fix #12487 : Proxy cache create duplicated operation log
...
Change method UseLocalManifest to avoid pull manifest frequently
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-08-10 16:27:59 +08:00
chlins
3340086af5
fix(preheat): add precheck before disable instance
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-10 15:35:44 +08:00
Wenkai Yin(尹文开)
e8f9fb63c0
Merge pull request #12674 from reasonerjt/standalone-db-migrator
...
Provide a standalone migrator to migrate DB schema.
2020-08-10 15:11:52 +08:00
Will Sun
f31b29a01c
Merge pull request #12675 from AllForNothing/p2p-3
...
Add name and endpoint check for p2p-preheat
2020-08-10 10:16:03 +08:00
Chlins Zhang
0cd820ae6c
Merge pull request #12669 from steven-zou/fix/reuse_pro_config
...
fix(preheat):leverage project settings
2020-08-08 13:23:37 +08:00
chlins
b765cfe0ce
fix(replication): refactor quay adapter to fix authorization and support quay.io and enterprise quay ( #10317 )
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-08 13:17:01 +08:00
Chlins Zhang
6b9929d848
Merge pull request #12678 from chlins/fix/preheat-delete-instance-precheck
...
fix(preheat): add precheck when delete instance
2020-08-08 12:54:00 +08:00
Wenkai Yin
219b9910eb
Show the detail error message when failed to fetch the artifacts during replication
...
Show the detail error message when failed to fetch the artifacts during replication
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-07 18:31:02 +08:00
AllForNothing
041a489fad
Add name and endpoint check for p2p-preheat
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-07 16:44:15 +08:00
chlins
5c433c0875
fix(preheat): add precheck when delete instance
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-07 14:06:35 +08:00
疯魔慕薇
19234cdb46
Merge pull request #12673 from chlins/fix/preheat-execution-and-task-pagination
...
fix(preheat): add pagination for execution and task list api
2020-08-06 23:08:21 +08:00
Daniel Jiang
4f94f59d2a
Provide a standalone migrator to migrate DB schema.
...
Fixes #11885
This part will not by default be packaged into release.
A README.md will be added in another commit.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-06 18:57:55 +08:00
chlins
302e4c6659
fix(preheat): add pagination for execution and task list api
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-06 16:59:38 +08:00
Steven Zou
f7bb6dd233
Merge pull request #12665 from chlins/fix/preheat-list-providers-under-project
...
fix(preheat): provider more info about p2p provider instance
2020-08-06 16:57:21 +08:00
Steven Zou
4f90ebce9f
Merge pull request #12668 from chlins/fix/preheat-delete-policy
...
fix(preheat): check running executions when delete policy
2020-08-06 16:47:53 +08:00
Steven Zou
d7bb6dac17
fix(preheat):leverage project settings
...
- use content trust settings of project configurations
- use vulnerability severity settings of project configurations
Signed-off-by: Steven Zou <szou@vmware.com>
2020-08-06 14:15:21 +08:00
chlins
5a2d4dd552
fix(preheat): check running executions when delete policy
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-05 17:54:20 +08:00
Wenkai Yin
d6288a43e8
Do some refine for the scheduler
...
1. Accept vendorType and vendorID when creating the schedule
2. Provide more methods in the scheduler interface to reduce the duplicated works of callers
3. Use a new ormer and transaction when creating the schedule
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-08-05 17:43:18 +08:00
chlins
89972f766f
fix(preheat): provider more info about p2p provider instance
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-05 17:23:43 +08:00
fanjiankong
4570a46823
Fix bug of update preheat instance default.
...
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-08-04 18:54:03 +08:00
Will Sun
5b4573c3ac
Merge pull request #12628 from AllForNothing/pull-by-tag
...
Add pull command by tag for artifact detail page
2020-08-04 09:59:54 +08:00
Will Sun
1006386572
Merge pull request #12641 from AllForNothing/improve-p2p-2
...
Improve p2p UI
2020-08-04 09:59:23 +08:00
Will Sun
18196edaa8
Merge pull request #12642 from AllForNothing/cron
...
Improve cron component and create project component
2020-08-04 09:58:52 +08:00
Chlins Zhang
dc58271d3e
Merge pull request #12649 from chlins/fix/prheat-log-display
...
fix(preheat): fix preheat task log display
2020-08-03 23:01:28 +08:00
Chlins Zhang
6f6742894c
Merge pull request #12647 from chlins/refactor/preheat-policy-serialize
...
refactor(preheat): refactor policy schema serialize funcs
2020-08-03 23:01:01 +08:00
AllForNothing
7065a7a0a7
Improve p2p UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-03 18:56:28 +08:00
Daniel Jiang
53577ceb13
Merge pull request #12650 from wy65701436/fix-gc-art-trash
...
update GC job
2020-08-03 18:54:22 +08:00
Wenkai Yin(尹文开)
bfb8f4aca0
Merge pull request #12622 from bitsf/fix_aliacr_pull
...
fix[replicatioin] aliyun acr pull with repo filter
2020-08-03 18:27:23 +08:00
Steven Zou
a6e85c1f8a
Merge pull request #12608 from bitsf/fix_gitlab_pull
...
fix[replication] gitlab pull-based multi namespace
2020-08-03 18:24:45 +08:00
AllForNothing
dff472c497
Improve cron component and create project component
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-08-03 17:36:54 +08:00
wang yan
e7c7c03b8c
update GC job
...
Remove the artifact trash record after manifest delete success.
Don't use the flush method is because that when all of records are removed, only GC job knows these informations, and they are in the memory. Once the jobservice is crashed and restarted at GC job execution phase, the trash records are lost, then these manifest are become orphan manifests, cannot be removed any more.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-03 12:08:00 +08:00
chlins
b008dffe70
fix(preheat): fix preheat task log display
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-03 09:45:18 +08:00
chlins
4446302330
refactor(preheat): refactor policy schema serialize funcs
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-08-02 14:43:30 +08:00
He Weiwei
df1bdc1020
refactor(project): add more methods to project controller and manager
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-31 17:55:35 +00:00
Wang Yan
9ce29c9dc8
update time format of audit log ( #12629 )
...
fixes #11522
use the format: date-time as the format of audit op_time, then it could be rendered by FF and Chrome.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-30 17:29:25 +08:00
AllForNothing
58b8183503
Add pull command by tag for artifact detail page
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-30 16:38:45 +08:00
Wang Yan
e14e6938da
add gc read only job ( #12591 )
...
Add the read only job as a back up plan, user still can use it but just with API, and specify the parameter read_only:true
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-30 15:30:52 +08:00
stonezdj(Daojun Zhang)
518a1721a7
Merge pull request #12571 from ywk253100/200723_proxy_cache_secret
...
Limit the permission of secret used by proxy cache service
2020-07-30 14:04:54 +08:00
Daniel Jiang
0a9219dcd6
Merge pull request #12615 from wy65701436/update-logs
...
revise the blob logs
2020-07-30 09:10:07 +08:00
疯魔慕薇
4dbbf79265
Merge pull request #12617 from steven-zou/fix/preheat_npe_issues
...
fix(preheat): fix npe issues
2020-07-30 08:14:28 +08:00
Steven Zou
507d792655
fix(preheat): fix npe issues
...
- fix npe issue in create/update policy
- fix issue of missing schedule job id in the preheat policy
Signed-off-by: Steven Zou <szou@vmware.com>
- increase the client timeout
2020-07-30 00:29:26 +08:00
Daniel Jiang
1ee4b3dc82
Refine request checking for OIDC CLI secret ( #12596 )
...
This commit makes OIDC CLI secret filter allow more URLs so that the
OIDC CLI secret can be used for replication
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-07-30 00:21:27 +08:00
Ziming Zhang
d16753ae96
fix[replicatioin] aliyun acr pull with repo filter
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-07-30 00:07:54 +08:00
stonezdj(Daojun Zhang)
5b1b94f25c
Merge pull request #12512 from ywk253100/200717_summary
...
Include the registry info in the project summary API for proxy cache project
2020-07-29 14:39:30 +08:00
Steven Zou
5d76a1bd51
Merge pull request #12567 from kofj/schedule-preheat
...
Schedule preheat policy.
2020-07-29 13:56:08 +08:00
wang yan
20df844d5a
revise the blob logs
...
1, update typo in the update blob status sql, the typo will not impact the sql result.
2, correct blob status in the middleware & GC job log.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-29 12:45:30 +08:00
Wang Yan
cf46775fd7
remove limitation of artifact in the GC job ( #12595 )
...
To handle the orphan blobs that created in the quota exceeding case deletion, remove the limition of artifact remove.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-29 12:04:30 +08:00
Will Sun
b2593589ec
Merge pull request #12602 from AllForNothing/task-col
...
Modify column name for preheat task list UI
2020-07-29 10:45:37 +08:00
fanjiankong
3653d3cdef
Schedule preheat policy.
...
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-07-29 00:36:34 +08:00
Steven Zou
d392e27ef9
fix(preheat):enhance preheat job
...
- add job stop check points in preheat job
- add missing digest property for the preheat request sent to the provider
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-28 22:19:00 +08:00
Steven Zou
be5858b1ed
fix(preheat):fix issues of event-based preheat
...
- fix issue of missing handling error in the preheat event handler
- change preheat artifact logic to reduce health check times
- publish pushed events only for the tagged artifacts
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-28 18:32:26 +08:00
Ziming Zhang
e7f8869ff7
fix[replication] gitlab pull-based multi namespace
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-07-28 15:51:49 +08:00
Steven Zou
1d361a89a0
Merge pull request #12599 from steven-zou/fix/p2p_job_log
...
fix(preheat):improve preheat job logs
2020-07-28 13:10:37 +08:00
Daniel Jiang
8fae685708
Merge pull request #11060 from stonezdj/20200311_ldap_group_name
...
Set LDAP groupname when PopulateGroup
2020-07-28 12:47:45 +08:00
AllForNothing
71fa6e9c13
Modify column name for preheat task list UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-28 12:18:39 +08:00
Wang Yan
588bf475ae
fix update pull time issue ( #12601 )
...
fixes #12574
let the tag ID as 0 when tags array is empty when to update pull time
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-28 12:15:46 +08:00
stonezdj
7d97ae6ea2
Set LDAP groupname when PopulateGroup
...
Search ldap group name with default ldap group attribute name
fixes #10940
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-07-28 10:27:15 +08:00
Steven Zou
8f6fb7db5b
Merge branch 'master' into fix/p2p_job_log
2020-07-27 22:47:15 +08:00
Steven Zou
1adaf58ab1
fix(preheat):improve preheat job logs
...
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-27 22:43:18 +08:00
Steven Zou
0bd321edf7
Merge pull request #12586 from ninjadq/extending_chart_client_timeout
...
Enhance: Prolong the timeout of chartclient
2020-07-27 16:05:29 +08:00
Will Sun
7367227462
Merge pull request #12589 from AllForNothing/fc-bug-css
...
Fix css bugs with label target 2.1.0
2020-07-27 15:43:23 +08:00
Will Sun
0598b3f712
Merge pull request #12592 from AllForNothing/improve-p2p
...
Improve p2p-preheat ui
2020-07-27 15:33:06 +08:00
Will Sun
fab3cfab92
Merge pull request #12585 from AllForNothing/fc-bug
...
Fix ui bugs with label target2.1.0
2020-07-27 15:07:24 +08:00
AllForNothing
71852f6200
Fix css bugs with label target 2.1.0
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-27 15:06:42 +08:00
AllForNothing
7e7663648c
Improve p2p-preheat ui
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-27 14:36:50 +08:00
DQ
7bf8a2d044
Enhance: Prolong the timeout of chartclient
...
In some perspectives to reduce the too many charts performence issue
Signed-off-by: DQ <dengq@vmware.com>
2020-07-27 12:06:24 +08:00
Wenkai Yin
ced7b73322
Limit the permission of secret used by proxy cache service
...
Limit the permission of secret used by proxy cache service, fixes #12257
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-07-27 10:15:00 +08:00
Daniel Jiang
3445608e62
Merge pull request #12416 from jonasrosland/move-docs-to-website
...
Moving docs from the harbor to the website repo
2020-07-27 09:45:37 +08:00
Steven Zou
522bd7a8ee
Merge pull request #12582 from steven-zou/fix/nothing_filtered_out_issue
...
fix(p2p-preheat):fix issues of triggering preheat
2020-07-26 22:05:22 +08:00
Steven Zou
716da7f3ff
fix(p2p-preheat):fix issues of triggering preheat
...
- fix invalid data type of vulnerability filter param
- add more debug logs
- add more logs in the preheat job
- fix issue of getting empty list when doing querying artifacts
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-26 13:47:58 +08:00
Wenkai Yin(尹文开)
6df1f8ae5c
Merge pull request #12549 from chlins/fix/jfrog-replication
...
fix(replication): fix jfrog replication when filter includes multi im…
2020-07-24 16:50:36 +08:00
Steven Zou
cafb2e819c
Merge pull request #12547 from kofj/fix-transaction
...
Fix: preheat install update transaction.
2020-07-24 16:33:29 +08:00
AllForNothing
15d813d479
Add p2p-preheat policy UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-23 18:06:16 +08:00
AllForNothing
cc05a60ec5
Fix ui bugs with label target2.1.0
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-23 18:04:03 +08:00
Daniel Jiang
a6c7e15d7e
Merge pull request #12556 from wy65701436/rm-mf-404
...
handle path not found when to delete manifest
2020-07-23 11:22:21 +08:00
stonezdj(Daojun Zhang)
8bbfb811a4
Merge pull request #12543 from stonezdj/200721_release_conn_ldap
...
Release connection after search ldap user
2020-07-23 11:06:14 +08:00
wang yan
53fb5c4230
handle path not found when to delete manifest
...
Return not found error if gets the driver PathNotFound.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-23 03:37:11 +08:00
Daniel Jiang
2041fd337b
Merge pull request #12448 from ninjadq/update_chart_client
...
Fix Chart V2 Can't parse
2020-07-22 13:31:05 +08:00
chlins
f70b674b3f
fix(replication): fix jfrog replication when filter includes multi images
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-22 12:30:26 +08:00
He Weiwei
06dc5bf10a
Merge pull request #12548 from heww/gen-and-check-mocks
...
chore(mocks): add make targets to generate and check mocks
2020-07-22 11:28:13 +08:00
He Weiwei
e3b1ec775f
refactor(quota): align Get and List methods of quota controller ( #12434 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-22 11:18:05 +08:00
Wang Yan
eeb8fca255
add debugging env for GC time window ( #12528 )
...
* add debugging env for GC time window
For debugging, the tester/users wants to run GC to delete the removed artifact immediately instead of waitting for two hours, add the env(GC_BLOB_TIME_WINDOW) to meet this.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-22 11:09:01 +08:00
Will Sun
46fa64462a
Merge pull request #12532 from AllForNothing/proxy-sum
...
Get registrry from project summary api
2020-07-22 11:01:39 +08:00
Will Sun
f9a66ca666
Merge pull request #12531 from AllForNothing/gc-dry-run
...
Add dry run to gc page
2020-07-22 11:01:10 +08:00
He Weiwei
aa55fcfce7
chore(mocks): add make targets to generate and check mocks
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-22 01:59:32 +00:00
Daniel Jiang
4170b267a1
Merge pull request #12496 from reasonerjt/secret-mgr-proxycache
...
Provide secret manager for proxy cache project
2020-07-22 09:48:24 +08:00
fanjiankong
adbdaaffe6
Fix: preheat install update transaction.
...
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-07-22 08:15:18 +08:00
jonasrosland
e7d1563c6b
Moving docs from the harbor to the website repo
...
Signed-off-by: jonasrosland <jrosland@vmware.com>
2020-07-21 12:41:24 -04:00
Wenkai Yin(尹文开)
112e38a080
Merge pull request #12541 from stonezdj/20200720_tag_ret_proxy
...
Add default retention policy
2020-07-21 19:31:12 +08:00
He Weiwei
f18ff08008
Merge pull request #12538 from heww/db-tx-skippers
...
perf(db): skip tx for get blob, patch/put blob upload apis
2020-07-21 19:04:18 +08:00
stonezdj
07694db90d
Release connection after search ldap user
...
Fixes: 12162
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-07-21 18:00:39 +08:00
stonezdj
2f0f3c45d2
Add default retention policy
...
Remove images that are not visited in last 7 days
Add a build method in policy models.go
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-07-21 16:49:35 +08:00
DQ
b62bebc005
Update vendor file
...
Signed-off-by: DQ <dengq@vmware.com>
2020-07-21 10:16:22 +08:00
AllForNothing
2396410cce
get registrry from project summary api
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-21 10:10:09 +08:00
DQ
f957acf763
Fix Chart V2 Can't parse
...
Use helm v3 libary to replace v2
Signed-off-by: DQ <dengq@vmware.com>
2020-07-21 10:07:08 +08:00
AllForNothing
8d9b1e18d3
Add dry run to gc page
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-21 09:51:31 +08:00
He Weiwei
6db1a1cb91
perf(db): skip tx for get blob, patch/put blob upload apis
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-20 16:42:16 +00:00
Steven Zou
cae087ba49
Merge pull request #12511 from steven-zou/fix/p2p_provider_health_check
...
fix(preheat):remove health property check when saving instance
2020-07-20 21:52:06 +08:00
Steven Zou
ee35e1ecc6
Merge pull request #12507 from chlins/fix/preheat-update-instance
...
fix(preheat): fix preheat handler PingInstance and UpdateInstance
2020-07-20 17:45:24 +08:00
jwangyangls
25e0f161ea
Merge pull request #12508 from jwangyangls/unified-processing-session-expired
...
[fix][ui] Operation unified processing session expired
2020-07-20 17:21:54 +08:00
Steven Zou
144edcc0c4
fix(preheat):fix ctl ut failure case
...
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-20 17:14:17 +08:00
Steven Zou
6b9e0e66c4
Merge branch 'master' into fix/p2p_provider_health_check
2020-07-20 16:02:40 +08:00
Daniel Jiang
14203169bf
Add GC mechanism to secret manager
...
When Generate is called and the size is larger than cap, GC will be
triggered.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-07-20 15:53:36 +08:00
Steven Zou
46d7434d0b
Merge pull request #12473 from ywk253100/200706_scheduler
...
Refactor the scheduler with the task manager mechanism
2020-07-20 15:53:14 +08:00
chlins
78927af032
fix(preheat): fix preheat handler PingInstance and UpdateInstance
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-20 15:42:24 +08:00
Wenkai Yin
4dc4b6728c
Refactor the scheduler with the task manager mechanism
...
Refactor the scheduler with the task manager mechanism, this will reduce the duplicate code
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-07-20 14:03:15 +08:00
Steven Zou
3c02b5da03
fix(preheat):remove health property check when saving instance
...
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-20 13:53:06 +08:00
Steven Zou
a11c2f32da
Merge pull request #12502 from bitsf/fix_replication_swr_pull
...
fix SWR replication adapter pull-based
2020-07-20 13:25:47 +08:00
Wang Yan
24ed52112e
fix blob deleting status issue ( #12481 )
...
1, The update blob status method should udpate the blob version of the blob object as well, otherwise the GC job cannot handle the blob status transform(none - delete - deleting - deletefailed)
as the method is using version equals as the query condition.
2, For the deleting blob which marked for more than 2 hours, it should be set to delete failed in head blob & put manifest request
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-20 11:44:29 +08:00
Wenkai Yin(尹文开)
5a898c1661
Merge pull request #12510 from ywk253100/200717_copy_proxy
...
Prevent copying artifact to a proxy cache project
2020-07-20 11:10:46 +08:00
Wenkai Yin(尹文开)
c654b08346
Merge pull request #12506 from ywk253100/200717_save_registry
...
Don't return the error detail back to the client when adding registry
2020-07-20 11:09:36 +08:00
Ziming Zhang
8857e89e40
feature(redis) support redis sentinel
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-07-19 21:19:03 +08:00
Daniel Jiang
d891e023db
Merge pull request #9311 from airadier/autoonboard-and-custom-user-claim
...
Add options for automatic onboarding and username claim
2020-07-19 19:15:34 +08:00
Steven Zou
d9ca9bbc69
fix(jobservice):add job id in log getting error ( #12513 )
...
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-17 22:33:41 +08:00
Wenkai Yin
d7327d8d8e
Include the registry info in the project summary API for proxy cache project
...
Include the registry info in the project summary API for proxy cache project
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-07-17 16:14:45 +08:00
wang yan
3345b8aae2
fix get manifest return code
...
When to call,
~~~ REQUEST ~~~
GET /v2/conformance/testrepo/manifests/.INVALID_MANIFEST_NAME
Per OCI distribution spec, it has to return 404, instead of 400 (project name required)
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-17 15:40:52 +08:00
Yogi_Wang
7b22b38c5c
[fix][ui] Operation unified processing session expired
...
fix #11268 includes the following functions:
delete group delete chart version delete project delete member add group delete repo delete artifact delete tag delete robot delete user delete registry delete label delete replication list replication
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-07-17 15:33:39 +08:00
Wenkai Yin
54a1155140
Prevent copying artifact to a proxy cache project
...
Prevent copying artifact to a proxy cache project
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-07-17 15:24:18 +08:00
Wenkai Yin
9493611666
Don't return the error detail back to the client when adding registry
...
Don't return the error detail back to the client when adding registry to avoid security issue
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-07-17 11:58:08 +08:00
Ziming Zhang
e7c89ce1d9
fix SWR replication adapter pull-based
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-07-16 19:19:18 +08:00
Daniel Jiang
840aa86dfa
Provide secret manager for proxy cache project
...
This commit provides the secret manager for proxy cache.
The secret is used for pushing blobs to local when it's proxied from
remote registry.
Each secret can be used only once and has a relatively short expiration
time.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-07-16 19:12:52 +08:00
Alvaro Iradier
81a7239c66
Better error handling
...
* Raise an internal error if username claim is not found, instead of just logging a warning
* Don't remove userInfoKey for session on error when it is not required
* Rename "OIDC Username Claim" to just "Username claim"
Signed-off-by: Alvaro Iradier <airadier@gmail.com>
2020-07-16 12:12:08 +02:00
Alvaro Iradier
6f88ff7429
Fix test suite and add test for userClaim
...
Signed-off-by: Alvaro Iradier <airadier@gmail.com>
2020-07-16 12:12:08 +02:00
Alvaro Iradier
714f989759
Add options for automatic onboarding and username claim
...
- Add an option in the UI to enable or disable the automatic user onboarding
- Add an option to specify the claim name where the username is retrieved from.
Signed-off-by: Alvaro Iradier <airadier@gmail.com>
2020-07-16 12:12:08 +02:00
Wang Yan
bad8f026fc
upgrade golang to v1.14.5 ( #12489 )
...
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-16 16:20:54 +08:00
Wang Yan
d73265d10d
revise gc job to align non blocking gc ( #12439 )
...
two phases:
1, mark, select the gc candidates bases on the DB and mark them as status delete.
2, sweep, select the candidate and mark it as status deleting and remove it from backend and database.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-16 14:35:54 +08:00
Steven Zou
4d4a04fad4
Merge pull request #12478 from steven-zou/feat/read_pro_config
...
feat(p2p):enhance policy enforcer
2020-07-16 11:40:29 +08:00
Ted Guan
9e7edb7a6e
Fix for project metadata ( #12410 )
...
Signed-off-by: guanxiatao <guanxiatao@corp.netease.com>
2020-07-15 18:46:45 +08:00
Steven Zou
fcfde5a588
feat(p2p):enhance policy enforcer
...
Read security settings from the project configurations and override the preheat policy settings if necessary.
Check the project security settings and override the related settings in the policy if necessary.
NOTES: if the security settings (relevant with signature and vulnerability) are set at the project configuration,
they will have the highest priority and override the related settings of the preheat policy.
e.g (use signature as an example, similar case to vulnerability severity part):
if policy.signature = false and project.config.signature = true; then policy.signature = true
if policy.signature = true and project.config.signature = true; then policy.signature = true
if policy.signature = true and project.config.signature = false; then policy.signature = true
if policy.signature = false and project.config.signature = false; then policy.signature = false
Signed-off-by: Steven Zou <szou@vmware.com>
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-15 14:18:34 +08:00
He Weiwei
cadcd4b877
Merge pull request #12480 from heww/move-pkg-types
...
refactor(quota): move pkg/types to pkg/quota/types
2020-07-15 11:32:27 +08:00
Daniel Jiang
947eadaa72
Merge pull request #12440 from heww/remove-init-clair-db
...
refactor: remove initialization of clair db
2020-07-15 00:38:12 +08:00
He Weiwei
a22d803a95
refactor(quota): move pkg/types to pkg/quota/types
...
Closes #9664
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-14 14:28:53 +00:00
stonezdj
b9c861f3f1
Add disable push for proxy project
...
Add middleware for blob and manifest push operation
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-07-14 10:13:38 +08:00
疯魔慕薇
f187509a90
Merge pull request #12454 from chlins/feat/list-providers-at-project-level
...
feat(preheat): add list providers under project level handler
2020-07-14 08:17:53 +08:00
chlins
7322d0ac7c
feat(preheat): add list providers under project level handler
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-13 21:53:50 +08:00
stonezdj
3abe77d6cb
Add proxy cache feature
...
Update route to add proxy related middleware
Add proxy controller
Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-07-13 21:18:43 +08:00
chlins
08bd46e125
feat: add preheat execution api handler
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-13 13:14:08 +08:00
chlins
2863e68718
feat: add task controller
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-13 13:02:24 +08:00
fanjiankong
a99aa21c8a
Enable RBAC control in the preheat API
...
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-07-13 11:06:25 +08:00
AllForNothing
4ec919dfe6
Query preheat instance by name
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-11 17:41:56 +08:00
Julien Vey
84c34afa22
Fix typo in sql log
...
Signed-off-by: Julien Vey <vey.julien@gmail.com>
2020-07-10 14:29:04 +02:00
Will Sun
ec1ac6dbc8
Merge pull request #12344 from AllForNothing/p2p
...
Add P2p preheat distribution instance UI
2020-07-10 16:01:04 +08:00
Steven Zou
1dfc93c3f6
Merge pull request #12430 from kofj/preheat_and_healthcheck
...
Preheat and healthcheck
2020-07-10 15:17:34 +08:00
Steven Zou
fdff077ff0
Merge pull request #12445 from chlins/fix/preheat-instance-and-policy-name-validation
...
fix(preheat): validate instance/policy name and set unique name
2020-07-10 15:14:44 +08:00
chlins
38d14dff30
fix(preheat): validate instance/policy name, set unique filed and policy
...
manager adds parsePolicy
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-10 10:29:47 +08:00
fanjiankong
080afbfe1b
Add preheat APIs, handlers.
...
1. Manual preheat.
2. Instance health check.
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-07-10 09:48:35 +08:00
He Weiwei
039aef5356
refactor: remove initialization of clair db
...
To fetch vulnerability database updated time of the Clair had moved to
the Clair adapter so removes the initialization of clair db in the core.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-09 15:26:14 +00:00
He Weiwei
9483559d18
Merge pull request #12433 from heww/fix-db-max-open-conns
...
fix(db): set max open conns of sql.DB manually
2020-07-09 17:58:14 +08:00
疯魔慕薇
5d7f757b7b
Merge pull request #12428 from mmpei/official-master-p2p-200708
...
Add P2P trigger event and handler
2020-07-09 15:54:24 +08:00
He Weiwei
e095958a27
fix(db): set max open conns of sql.DB manually
...
Due to the issues of beego v1.12.1 and v1.12.2, we set the max open conns
ourselves.
Closes #12403
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-09 03:35:41 +00:00
peimingming
65c5561032
Add P2P trigger event and handler
...
Signed-off-by: peimingming <peimingming@corp.netease.com>
2020-07-09 11:20:22 +08:00
fanjiankong
8a44ee400d
Instance handler.
...
- Add logic of preheat instance methods without RBAC.
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-07-09 00:01:14 +08:00
Steven Zou
3b2934bf48
Merge pull request #12419 from chlins/feat/p2p-preheat-healthcheck-controller
...
feat(preheat): add healthcheck methods for p2p preheat controller
2020-07-08 23:49:26 +08:00
Will Sun
71e50bd364
Merge pull request #12420 from AllForNothing/proxy-from-api
...
Add query string for getting registry
2020-07-08 14:20:38 +08:00
Will Sun
96b2326e24
Merge pull request #12418 from goharbor/rename-master-role
...
Rename master role to maintainer
2020-07-08 11:02:24 +08:00
AllForNothing
2c422435d9
Add query string for getting registry
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-08 10:42:55 +08:00
chlins
b6cab91bfa
feat(preheat): add healthcheck methods for p2p preheat controller
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-08 09:58:01 +08:00
Steven Zou
b87aa3b9d5
chore(preheat):add mock policy enforcer ( #12414 )
...
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-08 09:45:14 +08:00
Will Sun
cd66899abb
Merge pull request #12417 from AllForNothing/rename-role
...
Rename project role for UI
2020-07-08 09:21:57 +08:00
Daniel Jiang
1637e6a588
Rename master role to maintainer
...
This commit rename the var name, text appearance, and swagger of "master" role
to "maintainer" role.
It only covers backend code.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-07-08 09:20:07 +08:00
AllForNothing
706c6bdb2b
Rename project role
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-08 09:15:01 +08:00
Steven Zou
b56a49efe2
Merge pull request #12411 from kofj/instance_by_name
...
Get instance by name.
2020-07-07 23:20:01 +08:00
fanjiankong
3c1c799f0d
Get instance by name.
...
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-07-07 22:06:38 +08:00
Wang Yan
c3baeac5ae
add time windows support in artifact trash ( #12400 )
...
support with time window to filter and delete item in artifact trash
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-07 20:13:08 +08:00
AllForNothing
d01ff31dc8
Add P2p preheat distribution instance UI
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-07 19:55:56 +08:00
stonezdj(Daojun Zhang)
6f4e8150d5
Merge pull request #12383 from ywk253100/200702_registry_api
...
Suport filtering registries by type in listing registry API
2020-07-07 14:21:54 +08:00
Wenkai Yin
02690d1d04
Suport filtering registries by type in listing registry API
...
Suport filtering registries by type in listing registry API
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-07-07 10:30:46 +08:00
Steven Zou
642953b9ef
Merge pull request #12395 from chlins/feat/preheat-controller-policy-part
...
Feat/preheat controller policy part
2020-07-06 22:21:34 +08:00
chlins
37a00912b7
feat: add p2p preheat swagger yaml and implement preheat api policy handler
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-06 21:05:22 +08:00
jwangyangls
e498893777
Merge pull request #12391 from jwangyangls/fix-replication-repo
...
[fix] [replication] Success rate should be displayed as 0 when status is inprogress
2020-07-06 10:09:20 +08:00
chlins
254ea193fa
feat: add p2p preheat controller policy releated logic
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-04 12:23:04 +08:00
Steven Zou
2f2c545a0f
Merge pull request #12392 from steven-zou/fix/remove_inst_provider_todo
...
fix(p2p):remove the provider manager related to
2020-07-03 23:59:55 +08:00
Will Sun
7dfab5858c
Merge pull request #12374 from AllForNothing/proxy-cache
...
Add proxy cache ui
2020-07-03 18:14:25 +08:00
Steven Zou
1ee3f00709
fix(p2p):remove the provider manager related to
...
- use real provider instance manager
- move mock insatnce manager to testing/pkg
- modify kraken deriver implementation to remove digest fetcher
- update related UT cases
Signed-off-by: Steven Zou <szou@vmware.com>
2020-07-03 17:30:11 +08:00
Yogi_Wang
de4793c52d
[fix] [replication] Success rate should be displayed as 0 when status is inprogress
...
1.[replication] sccess rate should be displayed as 0 when status is inprogress
2.[repository] fix get repo name error when the repo contains the project name field
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-07-03 16:19:18 +08:00
Steven Zou
c7a050b629
Merge pull request #12389 from chlins/fix/p2p-preheat-policy-count-total
...
fix: add count method of policy manager to replace list method return…
2020-07-03 13:50:34 +08:00
Steven Zou
f3fcb96570
Merge pull request #12335 from kofj/p2p_preheat_api
...
feat(preheat):add preheat api, controller and manager
2020-07-03 13:47:04 +08:00
chlins
ace21240a4
fix: add count method of policy manager to replace list method return wrong counts
...
Signed-off-by: chlins <chlins.zhang@gmail.com>
2020-07-03 11:59:32 +08:00
Wang Yan
e8784de5fe
support list blobs by update time ( #12385 )
...
Add support list blob with update time.
As introduces the time window in GC, it wants to list the blobs less than specific time.
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-03 11:50:53 +08:00
Daniel Jiang
cf07ff0052
Merge pull request #12386 from wy65701436/delete-blob-not-found
...
fix return value for blob & manifest not found
2020-07-03 11:37:31 +08:00
Daniel Jiang
8252930083
Merge pull request #12356 from wy65701436/put-mf-mw
...
add middlware for put manifest
2020-07-03 11:30:25 +08:00
Daniel Jiang
650142e536
Merge pull request #12381 from wy65701436/fix-delete-manifest
...
fix delete manifest route issue
2020-07-03 11:29:06 +08:00
fanjiankong
a0c2d0ac9e
feat(preheat):add preheat api, controller and manager
...
- define instance's api
- define extension models for api
- implement preheat controller
- implement preheat manager
- most code are picked up from the original P2P feat branch
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
2020-07-03 11:25:42 +08:00
AllForNothing
a13642c2af
Add proxy cache ui
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-03 10:20:55 +08:00
wang yan
95bee9a0cc
fix return value for blob & manifest not found
...
When to delete an non exist blob/manifest, the API has to return a 404 instead of 500
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-02 19:18:57 +08:00
wang yan
7d1507feaa
update code arrording to the review comments
...
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-02 14:57:04 +08:00
wang yan
67be511a85
add middlware for put manifest
...
The middleware is to handle manifest(blob) status in different push manifest situation, similar with blob
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-02 14:57:04 +08:00
Steven Zou
264bd02892
Merge pull request #12378 from steven-zou/feat/preheat_policy_enforcement
...
feat(preheat):implement policy enforcer
2020-07-02 14:30:25 +08:00