Commit Graph

2148 Commits

Author SHA1 Message Date
Meina Zhou
0d239cb1cb move gc to lib and add in registry config
Signed-off-by: Meina Zhou <meinaz@vmware.com>
2019-02-14 13:45:15 +08:00
Yogi_Wang
06eaa304da fixed_ciIssue
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2019-02-14 10:21:18 +08:00
Fangyuan Cheng
6d782e0fe4
Merge pull request #6902 from pureshine/cert-link
Download the certificate link by default on ui
2019-02-13 21:24:12 +08:00
Daniel Jiang
81639e2110
Merge pull request #6865 from wy65701436/remove-token
Remove the token attribute from robot table
2019-02-13 19:23:06 +08:00
Fangyuan Cheng
04c76d7f09 Modify the ui name and token that cannot be displayed due to backend api changes (#6914)
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2019-02-13 18:57:49 +08:00
FangyuanCheng
54f74ff91d Download the certificate link by default on ui
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2019-02-13 15:16:45 +08:00
Yan
e9556a4cec
Add post response for robot account API (#6906)
This commit is to do:
1, Add post response on creating robot account
2, Lower-case the attribute of response

Signed-off-by: wang yan <wangyan@vmware.com>
2019-02-13 14:40:04 +08:00
SDBrett
90529832a2 Additional unit tests for base.go (#6888)
Increased coverage for http functions in base.go.

Signed-off-by: Brett Johnson <brett@sdbrett.com>
2019-02-12 16:06:20 +08:00
jwangyangls
a95586034e
Merge pull request #6885 from jwangyangls/privilege_escalation
PermissionMasterRoleWithIsue
2019-02-01 21:17:48 +08:00
He Weiwei
f7218f80e0
Merge pull request #6852 from heww/protect-api-using-rbac
Protect API using rbac
2019-02-01 21:11:26 +08:00
Yogi_Wang
1b80e79ec4 fixPermissionIssue
Signed-off-by: Yogi_Wang <wang1084@126.com>
2019-02-01 20:48:38 +08:00
He Weiwei
1c4b9aa346 Protect API using rbac
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-02-01 18:55:06 +08:00
System Administrator
1a551690d3 promission reset
Signed-off-by: Yogi_Wang <wang1084@126.com>
2019-01-31 18:06:49 +08:00
wang yan
5d6a28d73e Remove the token attribute for robot table
This commit is to remove the token attribute as harbor doesn't store the token in DB.

Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-30 23:56:23 +08:00
FangyuanCheng
dacc0bd6bc Fixed display problems caused by formatting
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2019-01-30 10:29:49 +08:00
Fangyuan Cheng
829bfe031e
Merge pull request #6823 from pureshine/robot-account
Support Robot account in Harbor
2019-01-29 18:36:26 +08:00
wang yan
f4f4535304 Fix action and resouce of RBAC change
Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-29 17:05:15 +08:00
Daniel Jiang
bf663df0e7
Merge pull request #6820 from wy65701436/robot-service
Add robot account authn & authz implementation
2019-01-29 16:08:25 +08:00
FangyuanCheng
404ee307f3 Support Robot account in Harbor
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2019-01-29 15:49:15 +08:00
Wenkai Yin
daf81e2413
Merge pull request #6841 from heww/standard-rbac-actions
Standard actions for rbac
2019-01-29 13:49:41 +08:00
He Weiwei
6e95b98108 Standard actions for rbac
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-29 11:59:11 +08:00
Mia ZHOU
f202e5f738
Merge pull request #6827 from pureshine/tag-col
The tag column sets the Maximum  width
2019-01-29 11:09:56 +08:00
He Weiwei
1da0a66fe5
Merge pull request #6781 from heww/user-permissions-api
Implement api for get current user permissions
2019-01-29 01:58:51 +08:00
He Weiwei
0ab7c93e16 Replace casbin builtin keyMatch2 with custom match func
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-29 01:26:38 +08:00
wang yan
2d7ea9c383 update codes per review comments
Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-28 21:26:06 +08:00
He Weiwei
8b5e68073d Implement api for get current user permissions
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-28 18:06:52 +08:00
Yan
71f37fb820 * Add robot account authn & authz implementation.
This commit is to add the jwt token service, and do the authn & authz for robot account.

Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-28 17:39:57 +08:00
Daniel Jiang
20db0e737b Provide HTTP authenticator
An HTTP authenticator verifies the credentials by sending a POST request
to an HTTP endpoint.  After successful authentication he will be
onboarded to Harbor's local DB and assigned a role in a project.

This commit provides the initial implementation.
Currently one limitation is that we don't have clear definition about
how we would "search" a user via this HTTP authenticator, a flag for
"alway onboard" is provided to skip the search, otherwise, a user has
to login first before he can be assigned a role in Harbor.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-01-28 15:43:44 +08:00
FangyuanCheng
fe5820efee The tag column sets the minimum width
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2019-01-27 23:47:41 +08:00
Yogi_Wang
ebda1cda22 style_change
Signed-off-by: Yogi_Wang <wang1084@126.com>
2019-01-25 13:36:48 +08:00
He Weiwei
3f8e06a8bc Support master role for project member create and update apis (#6780)
* Support master role for project member create and update apis

Signed-off-by: He Weiwei <hweiwei@vmware.com>

* Fix description for role_id in swagger.yaml

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-23 14:56:23 +08:00
He Weiwei
ae061482ae Add Can method to securty.Context interface (#6779)
* Add Can method to securty.Context interface

Signed-off-by: He Weiwei <hweiwei@vmware.com>

* Improve mockSecurityContext Can method

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-23 14:32:37 +08:00
Mia ZHOU
1ca9fb59b5
Merge pull request #6770 from ninjadq/fix_issue_global_search_cannot_reload_data
Fix: data not reload when global serach navigate to same location
2019-01-18 14:30:36 +08:00
Qian Deng
276202cfa9 Fix issue data not reload when global serach going to a location that has the same url
Just add a reload option on router module. This feature is introduced in angular5, we can solve this issue easily.

Signed-off-by: Qian Deng <dengq@vmware.com>
2019-01-18 13:34:32 +08:00
wang yan
903e15235e Update validation and error message per comments 2019-01-17 15:33:05 +08:00
wang yan
4cde11892a update the conflict check with DB unique constrain error message
Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-17 13:13:55 +08:00
Yan
1af0f3c3b9 Add API implementation of robot account
Add API implementation of robot account

1. POST /api/project/pid/robots
2, GET /api/project/pid/robots/id?
3, PUT /api/project/pid/robots/id
4, DELETE /api/project/pid/robots/id

Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-17 13:13:55 +08:00
He Weiwei
8dab10bbed
Merge pull request #6765 from heww/rename-ram
Rename ram to rbac
2019-01-17 11:50:14 +08:00
He Weiwei
bacfe64979 Rename ram to rbac
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-16 18:20:30 +08:00
Wenkai Yin
f8d9653419
Merge pull request #6737 from ywk253100/190109_health_check
Implement the unified health check API
2019-01-16 18:14:14 +08:00
He Weiwei
76bee7a9fc
Merge pull request #6710 from heww/security-by-ram
Implement current security interfaces using ram
2019-01-16 17:47:13 +08:00
Wenkai Yin
be4455ec1b Implement the unified health check API
The commit implements an unified health check API for all Harbor services

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2019-01-16 17:21:04 +08:00
He Weiwei
ebd26c0105 Implement current security interfaces using ram
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-16 16:08:17 +08:00
Steven Zou
464bdf71cd
Merge pull request #6727 from wy65701436/robot-dao
Add dao of robot account
2019-01-14 19:34:23 +08:00
wang yan
d349c256e8 add support for query nil
Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-11 16:19:42 +08:00
Daniel Jiang
a1d4bfd332
Merge pull request #6344 from reasonerjt/bump-up-golang
Bump up golang to 1.11.2
2019-01-11 16:15:59 +08:00
Daniel Jiang
5d59d6fab8 Bump up golang to 1.11.2
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-01-11 14:44:32 +08:00
wang yan
6bd6fbd4ad Add fuzzy match and delete funt per review comments
Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-11 14:26:49 +08:00
System Administrator
27c180bf20 fix_bug
Signed-off-by: Yogi_Wang <wang1084@126.com>
2019-01-11 11:00:46 +08:00
wang yan
c6ae1388ec Add dao of robot account
Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-10 14:51:33 +08:00
Daniel Jiang
80af81154c
Merge pull request #6702 from wy65701436/robot-db-scheme
Add DB table for robot account
2019-01-10 14:25:58 +08:00
wang yan
db09f9f101 Update token length and upper case the sql key words
Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-09 10:00:54 +08:00
wang yan
362a0638d0 Add DB table for robot account
This commit is to add DB scheme for robot account and update the db orm releated.

Signed-off-by: wang yan <wangyan@vmware.com>
2019-01-08 18:46:16 +08:00
Daniel Jiang
b5788f0695
Merge pull request #6671 from heww/ram
Add ram pkg
2019-01-08 15:39:36 +08:00
Mia ZHOU
45685b49d6
Merge pull request #6708 from zhoumeina/cherry_pick_disable_retag
disable retag function if with admiral
2019-01-08 15:04:10 +08:00
Meina Zhou
b7153798b5 disable retag function if with admiral
Signed-off-by: Meina Zhou <meinaz@vmware.com>
2019-01-08 13:49:54 +08:00
Yogi_Wang
10d74eabd7 upgrade clarity components to 1.0 and fix issue
Signed-off-by: Yogi_Wang <Yogiwang@Yogi-WangdeMacBook-Pro.local>
2019-01-08 12:50:26 +08:00
Wenkai Yin
f9c1a528cb
Merge pull request #6689 from jkroepke/patch-1
Remove user agent check for docker notifications
2019-01-04 18:23:09 +08:00
He Weiwei
79f786ecbe Add ram pkg
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-04 13:17:13 +08:00
Fangyuan Cheng
5967537daa
Merge pull request #6609 from pureshine/devcenter-btn
Modify the location to open the Developer Center
2019-01-04 11:24:02 +08:00
Jan-Otto Kröpke
8b65e4f424
Remove user agent check for docker notifications
Fixes #5729

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2019-01-03 21:17:29 +01:00
Wenkai Yin
75d45ebd9d
Merge pull request #6547 from cd1989/retag-input-validation
Validate repo and tag names in retag
2019-01-03 17:45:44 +08:00
FangyuanCheng
7a22f895ab Modify the location to open the Developer Center
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2019-01-03 14:57:26 +08:00
Yogi_Wang
aee07fff96 upgrade clarity components to 1.0
Signed-off-by: Yogi_Wang <Yogiwang@Yogi-WangdeMacBook-Pro.local>
2019-01-03 10:32:52 +08:00
Mia ZHOU
4f291e34eb
Merge pull request #6630 from pureshine/refactor-config
Config component nav tabs to use clarity component
2018-12-26 12:18:54 +08:00
Fangyuan Cheng
1456d1d326
Merge pull request #6628 from zhoumeina/add_swagger_title
add harbor swagger title for api explorer
2018-12-26 10:37:57 +08:00
Meina Zhou
92539a4bec add harbor swagger title for api explorer
Signed-off-by: Meina Zhou <meinaz@vmware.com>
2018-12-26 09:41:54 +08:00
FangyuanCheng
4ad66b6d9b Config component nav tabs to use clarity component
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2018-12-25 18:36:18 +08:00
FangyuanCheng
a4e17ec183 When harbor is deployed in http mode, the registry certificate download button is not displayed in the project page.
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2018-12-25 14:31:29 +08:00
cd1989
c117a23133 Validate repo and tag names in retag
Signed-off-by: cd1989 <chende@caicloud.io>
2018-12-24 16:49:39 +08:00
FangyuanCheng
256289810d Fix download certificate link bug
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2018-12-24 00:06:04 +08:00
Daniel Jiang
93c0a18b06
Merge pull request #6537 from stonezdj/ref_admin_driver
Refactor config settings stage2
2018-12-21 15:12:56 +08:00
stonezdj
2446878f6b Refactor config settings stage2
Signed-off-by: stonezdj <stonezdj@gmail.com>
2018-12-21 10:59:11 +08:00
He Weiwei
f403e50234
Merge pull request #6577 from heww/master
Include os version in image tag detail page
2018-12-20 18:18:44 +08:00
Qian Deng
c4ecd4e0f6 Fix i18n switch issue (#6579)
This issue is caused by error formated json file

Signed-off-by: Qian Deng <dengq@vmware.com>
2018-12-20 15:52:59 +08:00
He Weiwei
e7f09643bd Include os version in image tag detail page
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2018-12-20 15:12:19 +08:00
Qian Deng
1430a24b55 Update i18n files of project_detail
Add `helmchart` item in `project_detail` entry

Signed-off-by: Qian Deng <dengq@vmware.com>
2018-12-20 10:09:26 +08:00
Meina Zhou
66c1beb467 fix retag project list can not select
Signed-off-by: Meina Zhou <meinaz@vmware.com>
2018-12-19 14:39:49 +08:00
Mia ZHOU
ac47500eb6
Merge pull request #6552 from pureshine/inline-css
Move inline css style to scss
2018-12-19 13:40:16 +08:00
Mia ZHOU
2062c436d3
Merge pull request #6553 from zhoumeina/fix_retag_ui
show retag tooltip use regex, reset the dialog form when retagged
2018-12-19 13:32:07 +08:00
Meina Zhou
a3e357bb7f show retag tooltip use regex, reset the dialog form when retagged
Signed-off-by: Meina Zhou <meinaz@vmware.com>
2018-12-19 13:07:46 +08:00
Fangyuan Cheng
bb15f67316
Merge branch 'master' into inline-css 2018-12-19 10:07:21 +08:00
FangyuanCheng
c36e9daea1 Move inline css style to scss
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2018-12-18 21:19:08 +08:00
Wenkai Yin
b28bca7af4
Merge pull request #6541 from salkin/proxy-transport
Add support for http proxy in transport
2018-12-18 15:46:29 +08:00
Niklas Wik
138bc69f0f Add support for http proxy in transport
Signed-off-by: Niklas Wik <niklas.wik@nokia.com>
2018-12-17 10:35:27 +02:00
Mia ZHOU
da0f1d2831
Merge pull request #6525 from zhoumeina/dev-center1
add developer center in swagger ui way
2018-12-13 16:27:55 +08:00
Meina Zhou
d45ccbbb29 add developer center in swagger ui way
Signed-off-by: Meina Zhou <meinaz@vmware.com>
2018-12-13 15:17:38 +08:00
SDBrett
0e260d180c Added tests for failure conditions (#6501)
Added unit tests for registryctl auth to cover failure conditions to increase test coverage.
New tests cover no secret specified and incorrect harbor secret prefix

Signed-off-by: Brett Johnson <brett@sdbrett.com>
2018-12-13 11:35:17 +08:00
stonezdj(Daojun Zhang)
13511d74ed Refactor config settings encrypt + metadata (#6387)
Signed-off-by: stonezdj <stonezdj@gmail.com>
2018-12-12 12:14:33 +08:00
Wenkai Yin
f7a28ee2a2 Remove the duplicate http error struct (#6516)
There are two different types to represent http error in the current code. This commit updates the codes to keep only one.

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2018-12-12 11:51:19 +08:00
Wenkai Yin
5388eb4db6 Read ssl mode param from the adminserver to init the connection with database (#6504)
This commit adds the ssl mode as a param when establishing the connection with database

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2018-12-11 13:58:37 +08:00
Fangyuan Cheng
7f4dac2101
Merge pull request #6497 from pureshine/error-message
Modify the error message when deleting a signed images in harbor-helm
2018-12-11 11:29:47 +08:00
Mia ZHOU
e9a34224e4
Merge pull request #6499 from cd1989/retag-button-for-guest
Enable retag button to project guest
2018-12-11 10:55:50 +08:00
Mia ZHOU
53858fe2f1
Merge pull request #6482 from pureshine/default-version
Return unknow when about dialog cannot get harbor version
2018-12-11 10:30:40 +08:00
Mia ZHOU
4fc0716005
Merge pull request #6500 from pureshine/svg-format
Change the image in png format to the image in svg format
2018-12-11 10:24:04 +08:00
cd1989
fdddb37545 Enable retag button to project guest
Signed-off-by: cd1989 <chende@caicloud.io>
2018-12-10 15:46:48 +08:00
FangyuanCheng
892a76c27e Modify the error message when deleting a signed images in harbor-helm
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2018-12-10 14:39:04 +08:00
FangyuanCheng
cce22d569d Return unknow when about dialog cannot get harbor version
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2018-12-10 13:20:20 +08:00
FangyuanCheng
13686cbe83 Change the image in png format to the image in svg format
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2018-12-07 13:54:13 +08:00
Meina Zhou
073cacd9b3 fix helm chart did not get global label
The root cause is helm chart does not get glboal labels

Signed-off-by: Meina Zhou <meinaz@vmware.com>
2018-12-07 12:33:25 +08:00