Commit Graph

34 Commits

Author SHA1 Message Date
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
Wenkai Yin
db844d42f6 Fix "gob: name not registered for interface" error
This commits fixes the "gob: name not registered for interface" error when restarting Harbor by registering models.User

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2018-08-16 22:31:47 +08:00
Daniel Jiang
97fb67f835 No scan all policy if Clair is not installed.
This commit fixes #5283 by not registering scan all policy when Harbor
is not deployed with Clair.
2018-07-25 19:52:16 +08:00
Steven Zou
0227a1315a Keep the chart server related configurations in adminserver
append chart server related config options to the supporting list of adminserver
provide chart server related config access method in the API layer
update prepare script and ui env template file to enable cache driver config for chart server API
append flag info in the systeminfo API to indicate if chart server is deployed with Harbor
refactor the response rewriting logic to return structual error object
add api init method to initilizing objects required in API handlers
chage owner of the storage folder
update offline/online package scripts in Harbor-Util.robot
2018-07-20 19:40:33 +08:00
Steven Zou
726d81803b Fix conflicts in Makefiles and prepare script files with upstream 2018-07-19 03:17:05 -07:00
Steven Zou
b572e64a68 Refactor chart API endpoints
add /chartrepo after /api
add /chartrepo before /index.yaml,/:repo/index.yaml and /:repo/charts/:filename
add debug messages to the potential debug points
add more supporting mime types "multipart/form-data", "application/octet-stream" to the API endpoints

update travis file to inject ENV for UT cases of chart repo
2018-07-16 14:33:39 +08:00
Daniel Jiang
0d6ea995e1 Let adminserver initialise the DB schema.
This commit make update to remove the code from ui container to init the
DB schema.  As UI has dependency on admin server, so it's safe to assume
adminserver has to be ready first.  Regardless the setting of the config
store of admin server, it will try to access and intialize the schema of
database.
2018-07-13 17:32:17 +08:00
timchenxiaoyu
a912a55ac2 add sync registry env (#5294)
By default Harbor will call catalog API of registry and sync the result to DB, this becomes problematic when registry is configured to custom storage service, there maybe inconsistent result and the whole process may be very time consuming.
So in this commit a env var SYNC_REGISTRY is introduced if user want Harbor to sync the repo when it starts up, by default it's false.
2018-07-13 11:15:41 +08:00
Daniel Jiang
c9b1962b1e Initialise Harbor DB schema in Harbor UI/adminserver container
This commit fixes #5040, the harbor-db image will only contain empty
databases, and harbor ui container will use migrate tool to run initial
SQL scripts to do initialization.  This is helpful for the case to
configure Harbor against external DB or DBaaS like RDS for HA deployment
However, this change will results some confusion as there are two tables
to track schema versions have been using alembic for migration, for this
release we'll try to use alembic to mock a `migration` table during
upgrade so the migrator will be bypassed, in future we'll consider to
consolidate to the golang based migrator.
Another issue is that the UI and adminserver containers will access DB
after start up in different congurations, can't ensure the sequence, so
both of them will try to update the schema when started up.
2018-06-28 16:22:53 +08:00
Yan
cbcca015b0
add read only mode to stop docker push (#4433) 2018-03-23 03:16:08 -07:00
Wenkai Yin
9022abfc13 Fix code issues found by Gas 2018-01-29 15:17:03 +08:00
Wenkai Yin
96a63c56b1 Merge remote-tracking branch 'upstream/master' into 180103_merge 2018-01-03 10:32:03 +08:00
Wenkai Yin
3be1d5a7fd Assign read-only privilege of replication policy to project admin and add stopping replication jobs API. 2017-12-25 23:49:21 +08:00
yixingj
f63588855f Make Clair DB configurable
Make the HOST,PORT,USERNAME,DB configurable for
Clair
2017-12-20 18:29:50 +08:00
Wenkai Yin
8b4fdfc2cc Add unit tests for replication related methods 2017-12-15 09:40:31 +08:00
Wenkai Yin
c5ccb7e53c Enable filter chain in replication 2017-12-15 09:40:30 +08:00
Wenkai Yin
665a54edc3 Merge remote-tracking branch 'upstream/master' into 171213_merge 2017-12-13 13:40:24 +08:00
Wenkai Yin
594d213630 Publish replication notification for manual, scheduel and immediate trigger 2017-12-04 15:07:30 +08:00
Daniel Jiang
795d33a45a
Add filter on API endpoints to mitigate XSRF (#3542)
Add filter for all API endpoints to allow the POST requests which have
application/json header.
Make update to UI code to make sure all requests contain the header.
2017-11-03 14:43:27 +08:00
Tan Jiang
51286d9baa Provide UAA authenticator for password based authentication. 2017-10-07 00:16:53 +08:00
Tan Jiang
629cf29850 The password to access clair db can be configured in harbor.cfg, skip auto-scan if clair-db is not ready 2017-07-17 15:25:47 +08:00
Tan Jiang
543cf62e14 read last update from clair db, return in system info 2017-07-11 21:26:31 +08:00
Steven Zou
7ee052b9dd Update policy scheduler according to comments 2017-07-11 15:22:00 +08:00
Steven Zou
44be165edf Enable policy scheduler in ui main 2017-07-07 00:38:38 +08:00
Wenkai Yin
8191f4a476 add security context based on admiral 2017-06-18 22:19:12 +08:00
Wenkai Yin
2e059eb85a refactor sync registry API 2017-05-25 13:42:25 +08:00
Tan Jiang
785298e6b9 create reverseproxy 2017-05-02 20:27:45 +08:00
Wenkai Yin
f8f56ad555 auth integration 2017-04-26 18:54:46 +08:00
wy65701436
53f7cfb967 replace go header 2017-04-13 03:54:58 -07:00
Tan Jiang
7620cd3b86 refactor token service 2017-02-26 19:53:13 +08:00
Wenkai Yin
b62a958250 configure harbor 2017-01-12 17:15:32 +08:00
Tan Jiang
9d7a18a0a3 fix issue in golint, support project creation restriction at backend 2016-11-16 20:31:04 +08:00
yhua
99223fc29f update code for statics testing 2016-11-16 11:42:16 +08:00
yhua
311cf8da07 change code 20161019 2016-10-21 18:39:10 +08:00