Commit Graph

61 Commits

Author SHA1 Message Date
stonezdj
1ae5126bb4 Refactor adminserver stage 3: replace config api and change ut settings
Signed-off-by: stonezdj <stonezdj@gmail.com>
2019-02-18 14:06:19 +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
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
He Weiwei
6e95b98108 Standard actions for rbac
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-29 11:59:11 +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
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
He Weiwei
bacfe64979 Rename ram to rbac
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-01-16 18:20:30 +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
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
Daniel Jiang
0699980924 Add Scan All job to job service (#5934)
This commit adds the job to scan all images on registry.
It also makes necessary change to Secret based security context, to
job service has higher permission to call the API of core service.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2018-09-22 13:07:32 +08:00
clouderati
587459df15 Replacing copyright notices with "Copyright Project Harbor Authors".
Signed-off-by: clouderati <35942204+clouderati@users.noreply.github.com>
2018-09-19 16:59:36 +00:00
Qian Deng
7873a0312a Rename harbor-ui to harbor-core
1. Update the nginx.conf
2. Update Makefile
3. Update docker-compose
4. Update image name
5. Rename folder ui to core
6. Change the harbor-ui's package name to core
7. Remove unused static file on harbor-core
8. Remove unused code for harbor-portal

Signed-off-by: Qian Deng <dengq@vmware.com>
2018-09-19 16:35:13 +08:00
陈德
0582db9a82 Apply consistent format for comments
Signed-off-by: 陈德 <chende@caicloud.io>
2018-09-05 16:16:31 +08:00
wang yan
aab761ac8a Fix gofmt check results
Signed-off-by: wang yan <wangyan@vmware.com>
2018-08-29 11:50:00 +08:00
Daniel Jiang
dcf4e2ee78 Update import path in go code
vmware -> goharbor

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2018-08-23 17:50:53 +08:00
stonezdj
b8a48d0326 Update security context for assign role to project group member
The project list will contain all public projects, user is a member of this project, or user is in the group which is a member of this projects.
Change the behaviour of user roles, if the user is not a member of this project, then return the user's groups role of current project
2018-05-03 16:49:16 +08:00
Yan
ae257433cc
Fully migrate harbor db to postgresql (#4689)
* Merge harbor db to postgres
2018-04-27 02:27:12 -07:00
Wenkai Yin 79628
f6bd2f245d Fix bug #4688
Fix bug: the user can push images although he have no permisson by checking empty value before assign permissions.
2018-04-18 12:03:06 +08:00
stonezdj
de49165427 Refactor project member API
1) Remove the previous /api/projects/?:project_id/members/:userid
    2) Move the /api/projects/:project_id/projectmembers/?:pmid to
        /api/projects/:project_id/members/?:pmid
    3) Change the project member maintain ui to call new REST API
2018-04-11 17:49:33 +08:00
stonezdj
f138067242 Refactor project member 2018-02-09 10:38:51 +08:00
Wenkai Yin
e79334a445 Add interfaces to implement project level policy (#3271)
* add interfaces to implement project level policy
2017-09-26 16:41:08 +08:00
Wenkai Yin
dc4f2ece72 readjust package structure 2017-09-20 15:24:19 +08:00
Wenkai Yin
7fedca3a4a remove useless codes 2017-08-09 15:13:51 +08:00
Wenkai Yin
b127ba391d Merge pull request #2827 from ywk253100/170720_replic
Fix replicate issue
2017-07-20 18:48:33 +08:00
Wenkai Yin
2e427bffe2 fix replicate issue 2017-07-20 16:47:14 +08:00
Wenkai Yin
603d15671a delete the method of getting security context of specific user 2017-07-19 18:05:50 +08:00
Wenkai Yin
fc2bb51582 support basic auth in integration mode 2017-07-18 19:20:19 +08:00
Wenkai Yin
52f9e5f1c8 disable some APIs in integration mode 2017-07-11 18:13:48 +08:00
Wenkai Yin
d668730ffa return real status code returned by admiral APIs 2017-07-07 18:40:57 +08:00
Wenkai Yin
f7412b0c31 update auth context as Admiral's API changed 2017-07-06 18:32:22 +08:00
Wenkai Yin
b866200e4f Move some method of project manager to security context 2017-07-05 17:41:58 +08:00
Wenkai Yin
94507fc8a1 fix bugs found in test 2017-07-04 17:18:24 +08:00
Wenkai Yin
aac742e8ba update 2017-07-04 12:33:11 +08:00
Wenkai Yin
3ebe1a824b update codes of auth context 2017-07-03 13:37:55 +08:00
Wenkai Yin
f806adaac4 update test cases of PMS project manager 2017-06-28 15:44:40 +08:00
Wenkai Yin
ab65bca2fe Merge pull request #2649 from ywk253100/170627_service_account
Implement GetByMember function in PMS project manager
2017-06-28 15:25:21 +08:00
Tan Jiang
00e86d86b6 provide an API to scan all images, and some refactory 2017-06-27 19:25:11 +08:00
Wenkai Yin
016af6bc78 implement GetByMember function in PMS project manager 2017-06-27 18:44:20 +08:00
Wenkai Yin
b960565d11 Merge remote-tracking branch 'upstream/master' into 170621_auth
Conflicts:
	src/ui/filter/security.go
2017-06-23 18:49:08 +08:00
Wenkai Yin
94822746f1 implement admiral login 2017-06-23 18:17:45 +08:00
Wenkai Yin
4fe5881121 bug fix 2017-06-21 19:24:29 +08:00
Wenkai Yin
8191f4a476 add security context based on admiral 2017-06-18 22:19:12 +08:00
Wenkai Yin
e97d7dab85 refactor GET /projects 2017-06-09 16:41:02 +08:00
Wenkai Yin
9c4adbe8c9 Merge remote-tracking branch 'upstream/master' into 170525_log_pagination
Conflicts:
	src/common/security/rbac/context_test.go
	src/ui/api/statistic.go
	src/ui/projectmanager/pm.go
2017-06-05 16:53:15 +08:00
Wenkai Yin
1b83c0b076 support pagination in GET recent logs API 2017-05-26 17:51:20 +08:00
Wenkai Yin
97972028e1 refactor search API 2017-05-24 13:33:46 +08:00