Commit Graph

8445 Commits

Author SHA1 Message Date
Daniel Jiang
2064a1cd6d Switch to basic authentication for registry
1. Add basic authorizer for registry which modify the request
to add basic authorization header to request based on configuration.
2. Set basic auth header for proxy when accessing registry
3. Switche the registry to use basic auth by default and use the basic
authorizer to access Harbor.
4. Make necessary change to test cases, particularly
"test_robot_account.py" and "docker_api.py", because the error is
changed after siwtched to basic auth from token auth.  #10604 is opened
to track the follow up work.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-01-31 21:46:47 +09:00
Wenkai Yin(尹文开)
a1b25e1fec
Switch to new registry API handlers (#10596)
Switch to new registry API handlers

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-01-30 21:21:07 +08:00
Michael Michael
79427e757d
Merge pull request #10572 from lucperkins/lperkins/docs-restructure
Restructure docs directory to be Hugo-able
2020-01-29 14:52:59 -06:00
Wenkai Yin(尹文开)
dee70f7deb
Merge pull request #10561 from ywk253100/200120_artifact_controller
Implement the get/delete handler for registry API
2020-01-29 12:33:43 +08:00
Wenkai Yin
d0ac70d26c Implement the get/delete handler for registry API
Implement the get/delete handler for registry API

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-01-28 11:01:17 +08:00
lucperkins
c2d9315bd4 Merge remote-tracking branch 'upstream/master' into lperkins/docs-restructure 2020-01-27 12:34:16 -08:00
lucperkins
37e1b74724 Fixes to links, images, code samples, etc.
Signed-off-by: lucperkins <lucperkins@gmail.com>
2020-01-27 10:15:46 -08:00
Daniel Jiang
0b468dffb7
Merge pull request #10571 from reasonerjt/middlware-registry-basic-auth
Add middlewares for permission checking for v2 API
2020-01-28 01:46:09 +08:00
lucperkins
c50b8b9752 Remove manual TOC from main docs page
Signed-off-by: lucperkins <lucperkins@gmail.com>
2020-01-27 09:35:24 -08:00
Daniel Jiang
5f8acc3896 Add middlewares for permission checking for v2 API
When the registry shifts from token auth to basic auth, we'll use the middleware to check permission.
This commit add middlewares for populate the artifact info and check
permission based on request to /v2/* api via security context

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-01-27 12:53:15 +08:00
lucperkins
a3264b1001 Fix error in admonition names
Signed-off-by: lucperkins <lucperkins@gmail.com>
2020-01-24 15:13:01 -08:00
lucperkins
7beeba6889 Begin restructuring Markdown and file names
Signed-off-by: lucperkins <lucperkins@gmail.com>
2020-01-24 14:59:18 -08:00
Michael Michael
302b210938
Merge pull request #10523 from stuclem/quick-start-script
Added quickstart script
2020-01-23 07:53:30 -06:00
Wenkai Yin(尹文开)
d79a0e6030
Merge pull request #10550 from heww/transtaction-middleware
feat(middleware): add transaction middleware for v2 and v2.0 APIs
2020-01-22 16:58:10 +08:00
He Weiwei
b594861658 feat(middleware): add transaction middleware for v2 and v2.0 APIs
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-01-22 05:00:39 +00:00
Wenkai Yin(尹文开)
f9d8951aed
Merge pull request #10519 from ywk253100/200116_router
Wrap the beego router and provide a unified view for users to register routes
2020-01-22 10:20:36 +08:00
Wenkai Yin(尹文开)
a774a19823
Merge pull request #10537 from ywk253100/200115_artifact_api
Implement the listing artifact API
2020-01-22 08:05:12 +08:00
Wenkai Yin
19f4bad042 Implement the listing artifact API
Implement the listing artifact API

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-01-22 07:35:29 +08:00
Wenkai Yin(尹文开)
17318aedc3
Merge pull request #10547 from ywk253100/200120_artifact
Add foreign key to avoid the concurrent issue
2020-01-21 17:44:27 +08:00
Wenkai Yin
8aeabc7717 Wrap the beego router and provide a unified view for users to register routes
Wrap the beego router and provide a unified view for users to register routes

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-01-21 17:26:20 +08:00
Stuart Clements
463bffd10a Fixed heading 2020-01-21 09:46:02 +01:00
Stuart Clements
3435c89a50 Used full URL for community articles 2020-01-21 09:44:09 +01:00
Stuart Clements
f7315b710d Added link to community articles 2020-01-21 09:42:55 +01:00
Stuart Clements
79d1f0ffba Changed sub indexes to README files 2020-01-21 09:38:35 +01:00
Wenkai Yin
7dc28bcff9 Add foreign key to avoid the concurrent issue
Add foreign key to avoid the concurrent issue when operating the artifacts, tags and references

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-01-21 16:03:51 +08:00
Wenkai Yin(尹文开)
8b3313a1ce
Merge pull request #10525 from ywk253100/200117_chart_resolver
Implement the resolver for helm chart
2020-01-21 15:12:57 +08:00
Wenkai Yin(尹文开)
4dc59c5e39
Merge pull request #10541 from ywk253100/200120_default_resolver
Try to parse the type of the artifact based on the media type when no resolver found
2020-01-21 14:41:35 +08:00
Wenkai Yin
f759c8fd64 Implement the resolver for helm chart
Implement the resolver for helm chart

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-01-21 14:38:53 +08:00
Wenkai Yin
1f3fcbde36 Try to parse the type of the artifact based on the media type when no resolver found
Try to parse the type of the artifact based on the media type when no resolver found, if parse failed, set it's type to unknown. This won't block the pushing for artifacts that has no resolver registered in Harbor

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2020-01-21 14:15:33 +08:00
Wang Yan
9ac5fa0c83
Merge pull request #10535 from wy65701436/middleware-immutabletag
add immutable tag middleware into new v2 handler
2020-01-20 23:28:35 +08:00
wang yan
8fae15b803 add immutable tag middleware into new v2 handler
Signed-off-by: wang yan <wangyan@vmware.com>
2020-01-20 22:41:08 +08:00
Stuart Clements
e5bfa79a51 Added info about reconfiguring 2020-01-20 14:52:31 +01:00
Steven Zou
e8a617e0bd
Merge pull request #10429 from steven-zou/fix/job_hung_issue
fix[jobservice]:job status is hung after restart
2020-01-20 16:46:22 +08:00
He Weiwei
33dfa1ea11
feat(beego): upgrade beego to v1.12 which support middleware (#10524)
1. Upgrade beego to v1.12.0
2. Add RequestID middleware to all HTTP requests.
3. Add Orm middleware to v2 and v2.0 APIs.
4. Remove OrmFilter from all HTTP requests.
5. Fix some test cases which cause panic in API controllers.
6. Enable XSRF for test cases of CommonController.
7. Imporve ReadOnly middleware.

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-01-20 16:41:49 +08:00
Wenkai Yin(尹文开)
603cc0f5f3
Merge pull request #10526 from heww/send-error
feat(swagger): implement SendError for BaseAPI handler
2020-01-20 14:51:01 +08:00
Ziming
cdd717ef77
Merge pull request #10543 from bitsf/fix_githubactions_testcase_timeout
Fix githubactions testcase timeout
2020-01-20 14:46:49 +08:00
Wang Yan
36661af85e
Merge pull request #10542 from wy65701436/middleware-regtoken
add regtoken middleware in new v2 handler
2020-01-20 13:59:21 +08:00
Ziming Zhang
9f1d538b5f feat(cicd): try fix sometimes docker push time out
Signed-off-by: Ziming Zhang <zziming@vmware.com>
Change-Id: I67193a7c5b80d169237a884895627f68a1f65933
2020-01-20 11:57:03 +08:00
wang yan
7ebb337e3f add regtoken middleware in new v2 handler
To move the regtoken middlware to new v2 handler framework, it parses the docker pull bearer token and check whether it's a scanner pull.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-01-20 11:02:10 +08:00
Wang Yan
63ef743ba7
Merge pull request #10482 from wy65701436/api-list-repo
add code for catalog and list tag API
2020-01-19 15:26:13 +08:00
Wang Yan
2fa9d0ce45
Merge pull request #10516 from wy65701436/middleware-mf
add get manifest information middleware in new v2 hanlder
2020-01-19 14:21:42 +08:00
wang yan
986989af3c add code for catalog and list tag API
Signed-off-by: wang yan <wangyan@vmware.com>
2020-01-19 13:00:02 +08:00
wang yan
bffbc4009b add get manifest information middleware in new v2 hanlder
To add a new middleware to resolve the manifest information from request path, then pass
it into the request context for later use.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-01-19 12:31:38 +08:00
He Weiwei
5daa3f4fb3 feat(swagger): implement SendError for BaseAPI handler
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-01-19 00:46:18 +00:00
Daniel Jiang
c4dd6c077e
Merge pull request #10456 from bitsf/stop_travis
feat(cicd):stop use travis
2020-01-18 02:59:41 +08:00
Stuart Clements
6e358e8889 Added quickstart script 2020-01-17 17:56:20 +01:00
Wenkai Yin(尹文开)
8809b7aa5d
Merge pull request #9887 from chlins/fix/replication-huawei-adapter-authorization
fix(replication): huawei adapter multi authorization
2020-01-17 19:04:52 +08:00
Wang Yan
2ea41ca78a
Merge pull request #10481 from ywk253100/200114_orm
Get the ormer from context instead of creating a new one
2020-01-17 17:54:00 +08:00
xaleeks
d1df285b7e
Merge pull request #10493 from stuclem/sclements-remove-old-doc
Finalizing the doc reorg and removing old content
2020-01-17 17:22:13 +08:00
Wang Yan
6baed99548
Merge pull request #10514 from bitsf/cicd_smaller_image
feat(cicd) use a smaller docker image for test
2020-01-17 16:32:23 +08:00