Commit Graph

252 Commits

Author SHA1 Message Date
guanxiatao
b40ee6edc9 Set Event.Type value to event.EventTypeImageDelete instead of event.EventTypeImagePush when deleting
Signed-off-by: guanxiatao <guanxiatao@corp.netease.com>
2019-06-20 09:39:45 +08:00
Steven Zou
9bac5e602d
Merge pull request #8030 from ywk253100/190605_replication_bugfix
Fix replication bug
2019-06-13 19:12:29 +08:00
Wenkai Yin
5fef7585c7 Fix replication bug
Fixes #7875, fixes #7968

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2019-06-13 17:17:29 +08:00
Daniel Jiang
c928924fa5
Merge pull request #8003 from reasonerjt/bump-up-go112
Bump up to go 1.12.5 enable go.mod
2019-06-11 13:21:32 +08:00
wang yan
a4b202d656 remove the id in the post body when to create a robot account
Signed-off-by: wang yan <wangyan@vmware.com>
2019-06-11 10:47:56 +08:00
Daniel Jiang
737eaa396c Bump up to go 1.12.5 enable go.mod
This commit bumps up the version of Go to compile the code to v1.12.5,
and shifts to go.mod for managing depedency.
Some code from "harbor/tests" to "harbor/src/testing" to avoid depedency
loop of modules.

Note that in short term we will still vendor the dependency.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-06-11 00:42:20 +08:00
Qian Deng
592e40bacf
Merge pull request #7859 from wy65701436/return-robot-id
Return account id when to issue a robot
2019-05-29 10:55:20 +08:00
wang yan
15ca9bfb81 Add ensure settings when to search user in auth proxy
This issue is regresssion that introduced by f92bc8076d (diff-42381e6df5f17ebd3d9165a325d5d8f4), the a.ensure() was removed from SearchUser(), which leads to the alwaysonboard cannot be updated.

Signed-off-by: wang yan <wangyan@vmware.com>
2019-05-22 17:16:16 +08:00
wang yan
056cfc7e31 Return account id when to issue a robot
Signed-off-by: wang yan <wangyan@vmware.com>
2019-05-22 10:39:26 +08:00
wang yan
2068732eef add validation for robot account registration
Signed-off-by: wang yan <wangyan@vmware.com>
2019-05-15 15:03:35 +08:00
Wang Yan
3be14b7997
fix issue7793: ping ldap server is always success (#7795)
Signed-off-by: stonezdj <stonezdj@gmail.com>
2019-05-15 11:35:57 +08:00
Wenkai Yin
e399ffca54
Merge pull request #7799 from reasonerjt/oidc-onboard-user-name
Set the real name of OIDC user when onboarding
2019-05-15 11:35:42 +08:00
Daniel Jiang
5f11dbe675 Set the real name of OIDC user when onboarding
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-15 00:44:51 +08:00
stonezdj
99c0a5a498 fix issue7793: ping ldap server is always success
Signed-off-by: stonezdj <stonezdj@gmail.com>
2019-05-14 19:20:54 +08:00
Qian Deng
f607c5177d Fix frontend failure caused by absolute path
Fix failures because front downlowd chart using relative path

Signed-off-by: Qian Deng <dengq@vmware.com>
2019-05-14 13:22:06 +08:00
Qian Deng
cd6c5a9f10 Enable absolute url in helm chart
assign public_url to chart-url
remove namespace merge in index.yaml

Signed-off-by: Qian Deng <dengq@vmware.com>
2019-05-14 12:56:20 +08:00
Daniel Jiang
e963ee88c7 Update login controller to return 403 for redirection
As the UI cannot handle 302, update the login controller to return 403
and put the redirection URL in a json response body.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-13 18:16:06 +08:00
Daniel Jiang
d81afe274c Add filter to handle request with ID token (#7759)
This commit allows request with a valid ID token to access the API.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-10 16:58:25 +08:00
Wenkai Yin
8348c1fa4b
Merge pull request #7635 from heww/validation-failed-status-code
Return 400 status code for validation failed
2019-05-10 14:22:05 +08:00
He Weiwei
58cbaaace8 Return 400 status code for validation failed
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-05-10 10:35:25 +08:00
Wang Yan
774a9f8d75
Remove unused configure item cfg_expiration (#7744)
Signed-off-by: wang yan <wangyan@vmware.com>
2019-05-09 22:07:18 +08:00
wang yan
5c12c7713d Return 200 when to post an none schedule
1, Throw the error of job service to UI when to create job schedule.
2, Return 200 when to save none without schedule.

Fixed #7675

Signed-off-by: wang yan <wangyan@vmware.com>
2019-05-09 13:32:46 +08:00
Daniel Jiang
cbbf2ea973 Redirect regular user to OIDC login page (#7717)
When the auth mode is OIDC, when a user login via Harbor's login form.
If the user does not exist or the user is onboarded via OIDC, he will be
redirected to the OIDC login page.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-09 10:53:40 +08:00
Wang Yan
095f7b2ff7
add scan all and gc schedule migration (#7628)
* add scan all and gc schedule migration

Signed-off-by: wang yan <wangyan@vmware.com>

* Fix gofmt errors

Signed-off-by: wang yan <wangyan@vmware.com>

* Update code according to review comments

Signed-off-by: wang yan <wangyan@vmware.com>

* remove convertschedule return name just return value

Signed-off-by: wang yan <wangyan@vmware.com>
2019-05-08 19:11:33 +08:00
Daniel Jiang
58aed3dde9
Merge pull request #7707 from renmaosheng/harbor-6838
Don't display password when calling api/users API.
2019-05-08 12:50:39 +08:00
Steven Ren
8311ff729a Don't display password when calling api/users API.
This change fixes github issue 6838

Signed-off-by: Steven Ren <stevenr@stevenr-a01.vmware.com>
2019-05-07 18:40:36 +08:00
wang yan
ab08a576e4 add multiple manifest intercepetor handler
1, Add a interceptor to block request to upload manifest list
2, Discard notiification without tag.

Signed-off-by: wang yan <wangyan@vmware.com>
2019-05-07 16:10:09 +08:00
Wenkai Yin
d27a6c0335 Fix a few bugs of replication (#7619)
1. handle the public/private property when creating the projects
2. extend the length of access_secret
3. update the task status by using orm functions

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2019-05-07 10:47:14 +08:00
stonezdj(Daojun Zhang)
86bfd7a733 fix issue7637: /api/systeminfo cannot return 500 when DB is down (#7650)
Signed-off-by: stonezdj <stonezdj@gmail.com>
2019-05-07 10:36:10 +08:00
Qian Deng
210081604c
Merge pull request #7648 from reasonerjt/rm-index-controller
Remove IndexController
2019-05-06 18:29:14 +08:00
Daniel Jiang
45210f7c40 Fix condition for OIDC security filter (#7645)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-06 16:30:09 +08:00
Daniel Jiang
28871b78ae Remove IndexController
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-06 14:04:06 +08:00
Daniel Jiang
6c3df3c8ce Disable CA download when hosted via HTTP
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-06 11:14:39 +08:00
Wenkai Yin
12d58370ad
Merge pull request #7503 from ywk253100/190424_stop_execution
Check the task status of execution whose status is running when deleting the policy
2019-04-30 11:28:49 +08:00
wang yan
02c7cbeec2 Fix get log issue of Periodic job
Use the latest error or success execution as the periodic job log

Signed-off-by: wang yan <wangyan@vmware.com>
2019-04-29 15:30:05 +08:00
Wenkai Yin
7e4c227318 Check the task status of execution whose status is running when deleting the policy
Check the task status of execution whose status is running when deleting the policy

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2019-04-29 15:04:41 +08:00
Daniel Jiang
56c7d55c73
Merge pull request #7593 from reasonerjt/ext-url-systeminfo
Add Ext URL to response of systeminfo API
2019-04-29 14:51:40 +08:00
Wenkai Yin
c53d73775a
Merge pull request #7590 from reasonerjt/oidc-wrong-secret-err
Return more details for error in exchange token
2019-04-29 14:22:37 +08:00
Daniel Jiang
02cf75c142 Add Ext URL to response of systeminfo API
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-04-29 13:31:52 +08:00
wang yan
2b99e148d9 Add gc parameters when to update gc schedule
Signed-off-by: wang yan <wangyan@vmware.com>
2019-04-28 18:17:08 +08:00
Wang Yan
c26f655bce
add periodic job UUID to upstream job id and use execution log as the… (#7530)
* add periodic job UUID to upstream job id and use execution log as the periodic log

Signed-off-by: wang yan <wangyan@vmware.com>

* add comments to fix codacy

Signed-off-by: wang yan <wangyan@vmware.com>

* Update code per comments

Signed-off-by: wang yan <wangyan@vmware.com>
2019-04-28 15:09:56 +08:00
Wenkai Yin
7af679af7e
Merge pull request #7567 from reasonerjt/oidc-google-refresh-token
Persist the new token in DB after login
2019-04-28 14:12:25 +08:00
Daniel Jiang
80176cc354 Check whether user is nil in Prepare() of users API (#7507)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-04-28 14:06:35 +08:00
Daniel Jiang
15626fcae0 Return more details for error in exchange token
This commit update the response off OIDC callback when there's error in exchange token.
Additionally add comments to clarify that by default 500 error will not
contain any details.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-04-28 13:41:53 +08:00
Wenkai Yin
2a463016a9 Upgrade the distribution and notary library (#7516)
* Return 404 when the log of task doesn't exist

Return 404 when the log of task doesn't exist

Signed-off-by: Wenkai Yin <yinw@vmware.com>

* Upgrade the distribution and notary library

Upgrade the distribution library to 2.7.1, the notary library to 0.6.1

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2019-04-28 12:00:26 +08:00
Daniel Jiang
473fed5689 Persist the new token in DB after login
This commit make sure the token is persist to DB after every time after
a user logs in via OIDC provider, to make sure the secret is usable for
the OIDC providers that don't provide refresh token.

It also updates the authorize URL for google to make sure the refresh
token will be returned.

Also some misc refinement included, including add comment to the
OIDC onboarded user, preset the username in onboard dialog.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-04-27 23:03:59 +08:00
Daniel Jiang
b9f5f1027c
Merge pull request #7504 from reasonerjt/reload-auth-proxy-cert-verify
Update Transport of HTTP cient in auth proxy client
2019-04-26 23:24:33 +08:00
Daniel Jiang
07d15a8553 Update Transport of HTTP cient in auth proxy client
This commit ensures that the TLS config of the HTTP client for auth
proxy is updated when the configuration is changed.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-04-26 18:39:28 +08:00
Wenkai Yin
6511417ba6
Merge pull request #7495 from stonezdj/const_debts
Replace string with const in metadatalist.go
2019-04-25 17:41:04 +08:00
stonezdj
504eab56c3 Replace string with const in metadatalist.go
Signed-off-by: stonezdj <stonezdj@gmail.com>
2019-04-25 17:01:43 +08:00