Wang Yan
885a268268
rename permission of robot account ( #14150 )
...
* rename permission of robot account
fixes #14060
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-02-04 15:32:44 +08:00
He Weiwei
060a282e71
fix: 404 if report not found when updating report
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-02-04 07:10:58 +00:00
Wenkai Yin(尹文开)
c45adabf5d
Merge pull request #14155 from ywk253100/210203_sweeper
...
Ignore the not found error in some cases
2021-02-04 14:02:46 +08:00
Will Sun
e51b98b8dd
Fix UI issues with label 2.2.0 ( #14151 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-02-04 10:32:27 +08:00
Wenkai Yin
027c80ea58
Ignore the not found error in some cases
...
Ignore the not found error in some cases
Fixes #14154
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-02-03 20:26:50 +08:00
Wang Yan
3c9ec4c778
update adapter log level to debug
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-02-03 10:58:05 +08:00
Steven Zou
4737a394ee
Merge pull request #13947 from shaobo322/fix_improper_spell
...
fix improper spelling
2021-02-01 16:50:02 +08:00
Wenkai Yin(尹文开)
120d88a0dd
Merge pull request #14116 from reasonerjt/reduce-oidc-warning
...
Reduce warning logs in OIDC middleware
2021-02-01 09:55:41 +08:00
Wang Yan
1b85c67f63
fix catalog performance issue ( #14120 )
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-31 21:31:21 +08:00
Qian Deng
a211b0c9d7
Merge pull request #14126 from ninjadq/fix_unknown_metrics
...
Fix: unkonw metrics issue
2021-01-29 18:59:35 +08:00
DQ
15ad870262
Fix: unkonw metrics issue
...
Signed-off-by: DQ <dengq@vmware.com>
2021-01-29 18:07:06 +08:00
DQ
eb5e31a442
Chagne quota usage metric name
...
from `harbor_project_usage_byte` to `harbor_project_quota_usage_byte`
Signed-off-by: DQ <dengq@vmware.com>
2021-01-28 18:10:59 +08:00
Daniel Jiang
2dd499bacf
Reduce warning logs in OIDC middleware
...
If the request does not have bearer token in the header, do not decode
the empty string.
Fixes #12261
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-01-28 18:08:28 +08:00
He Weiwei
3ba0d5a590
fix: make a new ctx when start scan all in async
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-28 09:45:17 +00:00
Qian Deng
ebe05919be
Merge pull request #14078 from ninjadq/fix_self_registration_metric
...
Fix metric label related things
2021-01-28 17:27:53 +08:00
Qian Deng
6f3774ac8b
Merge pull request #14084 from ninjadq/support_multiple_artifact_type_in_metric
...
Support multiple artifact type in metric
2021-01-28 17:27:16 +08:00
Daniel Jiang
ea76594469
Improve the way config store transforms a value to string
...
This commit provide a better way to transform the value to string when
they are loaded from the driver.
Fixes #14074
However the way the config driver loaded config values and configstore
stores it back and forth seems repetitive and should be optimized.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-01-27 08:41:49 +00:00
Will Sun
fbfc943e8f
Fix UI bugs found in round 2 testing ( #14098 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-27 15:38:17 +08:00
DQ
a7241c1eb6
Fix: Support multiple type for artifact metrics
...
artiact became a dict
Signed-off-by: DQ <dengq@vmware.com>
2021-01-26 09:05:57 +00:00
DQ
66fd4a9728
change label project id to project name
...
project_name is more accurate
Signed-off-by: DQ <dengq@vmware.com>
2021-01-26 16:15:04 +08:00
Qian Deng
9574f8c3c6
Merge pull request #14056 from ninjadq/reduce_the_number_of_metrics_in_core
...
Aggregate metrics
2021-01-26 10:42:53 +08:00
DQ
23a02bd5a7
Fix sel registration in metric label
...
Original type is bool, should convert it to string
Signed-off-by: DQ <dengq@vmware.com>
2021-01-25 18:53:10 +08:00
DQ
28ae77e5c6
Aggregate metrics
...
1. Add operation id in ctx in baseapi before prepare
2. add operation id for registry proxy request
3. use url for other request
Signed-off-by: DQ <dengq@vmware.com>
2021-01-25 09:59:10 +08:00
He Weiwei
ff9b515630
feat: add health checker for trivy when it's enabled
...
Closes #14055
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-23 05:45:03 +00:00
Daniel Jiang
d3601e5a92
Merge pull request #14058 from reasonerjt/fix-oidc-helper-npe
...
Fix a potential nil pointer issue
2021-01-22 20:57:09 +08:00
He Weiwei
e0f7778027
fix: ignore tag in the scan webhook when it's empty ( #14057 )
...
Closes #13464
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-22 20:08:36 +08:00
Daniel Jiang
5ea43abc67
Fix a potential nil pointer issue
...
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-01-22 19:02:45 +08:00
Wang Yan
8e7a18dc80
fix robot v1 api update issue ( #14050 )
...
For the v1 api, it will not update the description of a robot account.
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-22 18:50:16 +08:00
Sven Haardiek
b2fe254974
Username from /userinfo ( #14038 )
...
This patch enabled Harbor to receive the username from the /userinfo endpoint
instead of only from the ID Token.
Closes #14037
Signed-off-by: Sven Haardiek <sven@haardiek.de>
2021-01-22 18:48:53 +08:00
Qian Deng
045e1d9abe
Merge pull request #14040 from ninjadq/metric_improvement
...
Metric improvement
2021-01-22 17:13:57 +08:00
Will Sun
51a541f1e2
Fix UI issue for success rate calculation ( #14052 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-22 16:44:21 +08:00
He Weiwei
50b40445f4
feat: add BeforePrepare for operation of swagger API ( #14048 )
...
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-22 10:44:25 +08:00
Will Sun
19a72cf350
Improve add scanner and add robot page ( #14042 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-21 10:41:57 +08:00
Will Sun
9a897af67e
Improve vulnerability list page ( #14031 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-21 10:41:09 +08:00
Wenkai Yin(尹文开)
63831dfd08
Merge pull request #14027 from ywk253100/210116_status
...
Don't ignore the NotFoundErr when handling the status hook of tasks to avoid the status out of sync
2021-01-20 17:07:18 +08:00
Wenkai Yin
e55c7d05ff
Don't ignore the NotFoundErr when handling the status hook of tasks to avoid the status out of sync
...
Don't ignore the NotFoundErr when handling the status hook of tasks to avoid the status out of sync
Fixes #14016
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-20 14:53:50 +08:00
He Weiwei
6a16d9a914
fix: correct Authorize of basic and berer authorizer ( #14036 )
...
Closes #13734
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-20 14:33:28 +08:00
DQ
c59b437970
Remove empty label in harbor info
...
some infomation can not get with guest user. So remove them
Signed-off-by: DQ <dengq@vmware.com>
2021-01-20 10:53:55 +08:00
sluetze
cc0e2bdd73
updated german translation for 2.2. ( #13801 )
...
Signed-off-by: sluetze <13255307+sluetze@users.noreply.github.com>
2021-01-19 17:12:36 +08:00
He Weiwei
59a0e321ed
fix: always remove the robot after scan job finished
...
1. Register task status change function for the scan job triggered by
scan all.
2. Always to delete the robot account for the scan job after the job is
finished because the job does not retry again when it's failed.
Closes #14000
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-18 07:37:09 +00:00
Steven Zou
42559479e6
Merge pull request #14023 from ywk253100/210115_scheduled
...
Fix the legacy scheduled job issue for GC/scan all
2021-01-18 14:01:01 +08:00
Wenkai Yin(尹文开)
c3b986cbcd
Merge pull request #14012 from ywk253100/210113_replication
...
Query executions with both vendor type and ID when sweep the execution records
2021-01-18 11:15:31 +08:00
Wenkai Yin
7c072e17a6
Fix the legacy scheduled job issue for GC/scan all
...
Fix the legacy scheduled job issue for GC/scan all
Fixes #13968
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-15 22:02:36 +08:00
Wenkai Yin
38e0f102bf
Query executions with both vendor type and ID when sweep the execution records
...
Query executions with both vendor type and ID when sweep the execution records
Fixes #13996
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-15 20:23:55 +08:00
Will Sun
b7c5fc0562
Modify i18n text for push permission ( #14015 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-15 15:26:48 +08:00
stonezdj(Daojun Zhang)
f31f861e90
Merge pull request #14014 from wy65701436/fixes-13985
...
fix robot list issue
2021-01-15 14:44:35 +08:00
Will Sun
cb040d23d1
Fix developer permission issue for robot account ( #14005 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-15 12:39:40 +08:00
Will Sun
ff3abf047a
Fix UI issues found in testing round 1 ( #14002 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-15 12:37:40 +08:00
Wang Yan
df8e7c45e3
fix robot list issue
...
fixes #13985
Add sorting for listing the robot account
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-15 11:56:53 +08:00
He Weiwei
74d055b26b
fix: correct completed in the metrics of the scan all ( #14003 )
...
Correct the completed count in the metrics of the scan all to be the sum
of success, error and stopped count.
Closes #14001
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-15 10:26:34 +08:00
Wenkai Yin(尹文开)
17652c06a2
Merge pull request #14011 from reasonerjt/tokenreview-rm-header
...
Remove raw token from header in token review reuqest
2021-01-14 18:30:13 +08:00
Daniel Jiang
6ae94d3790
Remove raw token from header in token review reuqest
...
The server to handle token-review may have a limitation for the size of
the header. When the token is huge the token review may fail.
This commit remove the necessary header to harden the flow.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-01-14 17:36:55 +08:00
stonezdj(Daojun Zhang)
2b068c3f86
Merge pull request #13989 from wy65701436/fixes-robot-issues
...
fix robot issues
2021-01-14 15:54:46 +08:00
Ziming Zhang
a7a1149454
fix(retention) execution status for zero repo
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-01-14 06:37:47 +00:00
Wang Yan
77347c54cf
fix robot issues
...
fixes #13980
fixes #13981
1, add the robot prefix to the audit log
2, add duration maximum checking
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-13 18:06:43 +08:00
Wang Yan
dedb86384b
do not add prefix for the legacy robots ( #13966 )
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-12 16:43:54 +08:00
Will Sun
7abe2ad9a3
Fix tag-retention nightly fuilure ( #13965 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-12 16:42:37 +08:00
Wang Yan
2d4456c630
refractor project rbac ( #13924 )
...
As the system rbac introduced, move the code of project rbac into project directory
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-11 11:27:26 +08:00
Wang Yan
64e61c0d11
fix robot cannot update expirsat ( #13944 )
...
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-11 11:26:05 +08:00
Ziming Zhang
be58c1d3ff
fix(retention) swagger test case
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-01-11 03:21:12 +00:00
Daniel Jiang
efa63d905a
Update the reg-exp to match v2/catalog api ( #13941 )
...
A more strict check is applied such that all requests to
/v2/_catalog/... will be verified.
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-01-09 13:17:51 +08:00
shaobo
fba0ff4d83
fix improper spelling
...
Signed-off-by: shaobo <shaobo@caicloud.io>
2021-01-08 16:25:51 +08:00
Wenkai Yin
7b7b5e4977
Check the stop error during the replication process
...
Check the stop error during the replication process
Fixes #13912
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-08 16:14:05 +08:00
Ziming Zhang
39fb500318
feat(retention) refactor to use go swagger api
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-01-08 07:09:28 +00:00
Will Sun
f566748c77
Fix nightly case by add to scan button ( #13937 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-08 15:01:26 +08:00
Steven Zou
1f79ce1181
Merge pull request #13554 from shaobo322/reform_compare_method
...
reform job status compare method
2021-01-08 12:49:39 +08:00
He Weiwei
755c6490f9
feat: remove duplicate CVE in scan report and summary ( #13918 )
...
1. Remove the duplicate CVE records in the report/summary for the image
index.
2. Add scanner field in the scan overview for the API.
Closes #13913
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-08 11:00:43 +08:00
Wenkai Yin(尹文开)
4580aeff3b
Merge pull request #13910 from mmpei/official-feature-artifact-hub-replicate
...
Support artifact hub replication using new API
2021-01-08 10:15:55 +08:00
He Weiwei
9402077695
feat: save summary for the scan all execution ( #13931 )
...
Compute the summary info for the scan all and save it to the extra attrs
of the execution.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-08 10:10:31 +08:00
Will Sun
4ea881564e
Modify UI to match scanner upgrading ( #13915 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-07 17:16:52 +08:00
Wang Yan
0cf43d766c
enable system resource access ( #13826 )
...
1, introduce & define the system resources.
2, replace the IsSysAdmin judge method.
3, give the robot the system access capability.
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-01-07 15:45:04 +08:00
Steven Zou
be98748ca7
Merge pull request #13896 from ywk253100/210105_replication
...
Fix replication filter bug
2021-01-07 13:45:46 +08:00
Wenkai Yin(尹文开)
3408f0b577
Merge pull request #13909 from ywk253100/210106_task
...
Provide a mechanism to sweep the execution/task records in task manager
2021-01-07 13:44:21 +08:00
Will Sun
bd585481c7
Fix tag retention ui loading issue ( #13905 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-07 10:20:12 +08:00
peimingming
28714f8b70
Support artifact hub replication using new API
...
Signed-off-by: peimingming <peimingming@corp.netease.com>
2021-01-06 20:46:04 +08:00
He Weiwei
ed31cf9417
feat: return scan report and summary by header ( #13898 )
...
Add X-Accept-Vulnerabilities header to the list/get artifact and get
artifact vulnerability addition APIs, and these APIs will traverse the
mime types in this header and return the first report and summary found
from the mime type.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-06 17:54:36 +08:00
Wenkai Yin
fb871dbbe8
Provide a mechanism to sweep the execution/task records in task manager
...
Provide a mechanism to sweep the execution/task records in task manager
Fixes #13888
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-06 16:41:46 +08:00
He Weiwei
e33ff932d1
test: fix the data race in the test of scan controller ( #13899 )
...
Closes #13876
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-06 16:17:47 +08:00
stonezdj(Daojun Zhang)
b748852ee8
Merge pull request #13805 from stonezdj/201218_add_content_type_length
...
Add content type and length in header
2021-01-06 15:02:34 +08:00
Will Sun
a1a5ef5e20
support quay registry as proxy cache ( #13902 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-06 14:15:15 +08:00
stonezdj
1d50be31aa
Refactor Manifest cache process
...
Separate manifest, manifest list and image index.
Signed-off-by: stonezdj <stonezdj@gmail.com>
2021-01-06 14:01:02 +08:00
Daniel Jiang
06e993ff76
Remove scanner-pull from system admin's permission ( #13901 )
...
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-01-06 12:35:58 +08:00
Wenkai Yin
d474750e9f
Fix replication filter bug
...
This commit fixes the bug of replication filter, see #13593 for more detail
Fixes #13593
Signed-off-by: Wenkai Yin <yinw@vmware.com>
2021-01-06 09:36:31 +08:00
Will Sun
839c36c876
Fix bugs for robot account UI ( #13894 )
...
Signed-off-by: AllForNothing <sshijun@vmware.com>
2021-01-05 22:28:56 +08:00
Ziming Zhang
8faa76a1b6
feat(retention) refactor task manager
...
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2021-01-05 12:08:03 +08:00
shaobo
434758b71e
reform job status compare method
...
Signed-off-by: shaobo <shaobo@caicloud.io>
2021-01-04 21:34:53 +08:00
Daniel Jiang
d0152cb446
Merge pull request #13872 from reasonerjt/token-scope
...
Refine the token scope generation
2021-01-04 11:16:59 +08:00
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