Commit Graph

271 Commits

Author SHA1 Message Date
yixingj
f63588855f Make Clair DB configurable
Make the HOST,PORT,USERNAME,DB configurable for
Clair
2017-12-20 18:29:50 +08:00
Tan Jiang
2ffc58a5d4 Refactor the configuraiton of UAA
Remove the attribute "uaa_ca_root" from harbor.cfg and introduce
"uaa_verify_cert".  Similar to LDAP settings, this allow user to
explicitly turn of the cert verification against UAA server, such that
the code will work with self-signed certificate.
2017-12-19 14:42:07 +08:00
stonezdj
9393d26fdc Fix ldap ping issue #3653 2017-12-15 14:47:54 +08:00
Wenkai Yin
a736cb7b09 Update the HTTP client according to the comments 2017-12-15 09:40:31 +08:00
Wenkai Yin
8b4fdfc2cc Add unit tests for replication related methods 2017-12-15 09:40:31 +08:00
Wenkai Yin
a54b7dd4c0 Merge remote-tracking branch 'upstream/master' into 171219_merge 2017-12-15 08:48:57 +08:00
stonezdj
ec67974104 Refactor ldap
Changes include:

1. Use Session to manage the lifecycle of ldap connections
2. Abstract common AuthenticateHelper interface for db_auth, ldap_auth,
uaa_auth mode
2017-12-13 14:57:04 +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
d13321f2b5
Support getting user info via token in UAA Client (#3686) 2017-11-27 18:13:36 +08:00
stonezdj
16243cfbbc Add LDAP remote certifcate validation
push test

Add unit test for ldap verify cert

remove common.VerifyRemoteCert

Update code with PR review comments

Add change ldaps config and add UT testcase for TLS feature

add ldap verfiy cert checkbox about #3513

Draft harbor ova install guide

Search and import ldap user when add project members

Add unit test case for SearchAndImportUser

ova guide

Add ova install guide

Add ova install guide 2

Add ova install guide 3

Call ValidateLdapConf before search ldap

trim space in username

Remove leading space in openLdap username

Remove doc change in this branch

Update unit test for ldap search and import user

Add test case about ldap verify cert checkbox

Modify ldap testcase
2017-11-24 12:41:51 +08:00
reasonerjt
19a13e8575 Deprivilege harbor-ui harbor-jobservice harbor-adminserver
Use non-root user to run the service within these docker images, and provide HEALTHCHECK
mechanism.
2017-11-09 03:09:09 -08:00
Tan Jiang
512384722a Make the internal URL of UI and JobService configurable 2017-11-03 20:43:25 +08:00
Daniel Jiang
d8634290e8 Merge pull request #3420 from reasonerjt/master
Add Unit test cases for Clair Client.
2017-10-23 12:18:05 +08:00
Tan Jiang
b925569767 Add Unit test cases for Clair Client. 2017-10-22 21:54:04 +08:00
Wenkai Yin
2156750b04 Move certificate verification to target level
The certificate verification is on system level before this commit. Moving it
to target level makes the configuration more flexible for different targets.
2017-10-20 15:36:56 +08:00
Wenkai Yin
66b2d0d3f3 Apply project level policies to standalone Harbor
The following features are only enabled in integration mode, this commit moves
these to standalone Harbor:
 - Content trust policy: only signed images can be pulled
 - Vulnerability policy: only images whose severity is below the threshold can be pulled
 - Automatic scan policy: automatic scan pushed images
2017-10-19 17:33:28 +08:00
Tan Jiang
eab6b43d99 Make the root CA certificate of UAA should be configurable 2017-10-16 17:40:29 +08:00
Tan Jiang
51286d9baa Provide UAA authenticator for password based authentication. 2017-10-07 00:16:53 +08:00
Wenkai Yin
e495357d98 implement the default project metadata manager 2017-09-28 16:17: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
923a8d65b1 expose insecure flag in api 2017-09-04 15:10:07 +08:00
Daniel Jiang
f41d2ff436 Merge pull request #3101 from ywk253100/170822_replica
Convert 500 error returned by Admiral to duplicate project error when creating duplicate project
2017-08-22 15:59:19 +08:00
Wenkai Yin
599d94be0c update 2017-08-22 15:22:25 +08:00
Wenkai Yin
ffb2f4201b update 2017-08-22 14:28:45 +08:00
Wenkai Yin
bb958a7f4b convert 500 error returned by Admiral to duplicate project error when creating duplicate project 2017-08-22 13:34:06 +08:00
Tan Jiang
c1bbcb5bab update the interval of clair updater to 12 hours, and update the interval for scan all to 2 hours 2017-08-21 13:45:23 +08:00
Tan Jiang
5b6c53a1bf add the json file required by UT 2017-08-07 21:12:49 +08:00
Tan Jiang
8f41be471d add tc for vulnerability transform 2017-08-07 17:14:51 +08:00
Daniel Jiang
6bd622196e Merge pull request #2972 from reasonerjt/master
Fix perf issue and connection leak in Clair.
2017-08-04 19:48:26 +08:00
Tan Jiang
fa0cb8731c Fix performance issue and connection leakage 2017-08-04 19:22:52 +08:00
Wenkai Yin
8963a15520 remove useless insecure flag 2017-07-31 13:45:49 +08:00
Wenkai Yin
a8dc75dd15 update 2017-07-28 13:10:26 +08:00
Wenkai Yin
1da9b8653b update according to the comments 2017-07-27 18:23:55 +08:00
Wenkai Yin
0a74a0f1e4 update 2017-07-27 08:17:29 +08:00
Wenkai Yin
cc264f85e7 do not ping if using raw token authorizer 2017-07-26 18:41:36 +08:00
Steven Zou
8f921db588 Refine scheduler 2017-07-19 16:57:22 +08:00
Steven Zou
db58ca673d Fix issue of detecting configuration changes 2017-07-17 17:39:41 +08:00
Tan Jiang
771e26a188 fix bug 2017-07-14 14:53:12 +08:00
Tan Jiang
72b3a020e3 provide default timestamp for all distros in system info api 2017-07-13 18:48:05 +08:00
Daniel Jiang
ca6bd3b585 Merge pull request #2741 from reasonerjt/fetch-timestamp-from-clairdb
read last update from clair db, return in system info
2017-07-12 17:16:30 +08:00
Tan Jiang
7fdb77f6d2 fix tc 2017-07-12 16:48:57 +08:00
Tan Jiang
436f0efab8 overall timestamp returns 0 when error happens, split check and mark into two func 2017-07-12 15:57:57 +08:00
Wenkai Yin
005d783463 Merge pull request #2732 from ywk253100/170710_bug_fix
Bug fix
2017-07-12 12:59:24 +08:00
Steven Zou
cbdf49c8e9 Merge remote-tracking branch 'upstream/master' 2017-07-11 15:44:32 +08:00
Steven Zou
7ee052b9dd Update policy scheduler according to comments 2017-07-11 15:22:00 +08:00
Wenkai Yin
0de64ed139 bug fix 2017-07-10 18:38:21 +08:00
Daniel Jiang
6fa12cdb1e Merge pull request #2730 from reasonerjt/scan-all-control
restrict scan all API, it should be called once every a period of time
2017-07-10 16:17:26 +08:00
Wenkai Yin
0b282039e9 Merge pull request #2725 from ywk253100/170707_status_code
Return real status code returned by admiral APIs
2017-07-10 10:12:50 +08:00
Tan Jiang
eb11cda596 restrict scan all API, it should be called once every a period of time 2017-07-09 22:06:13 +08:00
Steven Zou
ff889cedde Fix conflict 2017-07-07 20:15:40 +08:00
Steven Zou
a0718385c1 Fix the import cycle issue 2017-07-07 20:12:01 +08:00
Wenkai Yin
d668730ffa return real status code returned by admiral APIs 2017-07-07 18:40:57 +08:00
Tan Jiang
ca805759d9 update scan overview in notification handler, and return clair vuln timestamp in system info 2017-07-07 17:47:52 +08:00
Wenkai Yin
f7412b0c31 update auth context as Admiral's API changed 2017-07-06 18:32:22 +08:00
Tan Jiang
8b31715b34 provide Clair notification handler
update the timestamp in DB, when handling the notification
2017-07-05 15:35:53 +08:00
Daniel Jiang
ea827ffd6e Merge pull request #2658 from ywk253100/170627_registry
Provide a method to get token from token service
2017-06-29 17:56:38 +08:00
Wenkai Yin
4770aeba90 provide a method to get token from token service 2017-06-28 12:23:14 +08:00
Tan Jiang
00e86d86b6 provide an API to scan all images, and some refactory 2017-06-27 19:25:11 +08:00
Tan Jiang
ed296812f0 small refinement to clair client 2017-06-25 11:44:56 +08:00
Wenkai Yin
b8d17eeb79 replace trimleft with trimprefix 2017-06-16 16:30:40 +08:00
Tan Jiang
15384317e0 add with_clair flag in systeminfo 2017-06-15 16:15:46 +08:00
Tan Jiang
ae2d868fd4 handlers for image scan, store results overview in DB 2017-06-13 23:37:54 +08:00
Wenkai Yin
f0c47b990b Merge pull request #2495 from ywk253100/170605_pm
Implement project manager based on PMS
2017-06-13 15:46:48 +08:00
Wenkai Yin
5a25445096 update according to the comments 2017-06-13 15:28:48 +08:00
Wenkai Yin
b2380818fd support query logs according to conditions 2017-06-08 14:44:08 +08:00
Daniel Jiang
1c441b17be refactor job service (#2348) 2017-05-22 22:33:20 -07:00
Tan Jiang
fd8fd2fbe1 Enable project level content trust, controlled by environment variable 2017-05-09 15:36:58 +08:00
kunw
5ed47c0316 Merge release-1.1.0 2017-05-02 13:27:06 +08:00
Daniel Jiang
97e214c3d3 bypass some email test (#2184) 2017-05-02 12:48:44 +08:00
Daniel Jiang
eb39fbf814 Merge pull request #2157 from vmware/release-1.1.0
merge 1.1.0 fix code into master
2017-04-27 17:27:23 +08:00
Tan Jiang
da19700a1e replace math/rand with crypto/rand 2017-04-25 17:47:40 +08:00
Tan Jiang
e17526a495 fix ldap issue 2017-04-25 16:33:01 +08:00
Tan Jiang
480bbc1a0d fix issue in LDAP support 2017-04-21 19:06:10 +08:00
wy65701436
53f7cfb967 replace go header 2017-04-13 03:54:58 -07:00
maplain
be96a3b17c add a missing format string argument 2017-04-07 00:21:08 -07:00
Wenkai Yin
b99ae2496d shorten message 2017-03-30 18:53:39 +08:00
Wenkai Yin
4236d47653 Merge remote-tracking branch 'upstream/dev' into 170329_send_email 2017-03-30 14:03:25 +08:00
Wenkai Yin
ec27e2dc07 remove compress js flag 2017-03-30 12:59:47 +08:00
Wenkai Yin
705452ac04 add ut 2017-03-29 23:12:17 +08:00
Tan Jiang
9e0b16c492 fixes 1811 2017-03-27 16:34:24 +08:00
Tan Jiang
5e2598028f remove root.json after getting the targets 2017-03-25 17:00:26 +08:00
Daniel Jiang
e02dd11703 Merge pull request #1684 from ywk253100/170320_adminserver_client
Abstract adminserver client into a single package
2017-03-21 16:08:31 +08:00
Wenkai Yin
67612aa2e3 abstract adminserver client into a single package 2017-03-21 01:00:26 +08:00
Yan
92d9f8516f Merge pull request #1626 from ywk253100/170315_registry_upgrade
Upgrade registry to 2.6.0
2017-03-17 18:25:22 +08:00
Wenkai Yin
108aa21499 upgrade registry to 2.6.0 2017-03-16 13:44:16 +08:00
Wenkai Yin
c3626edd42 reset config 2017-03-16 11:27:45 +08:00
Tan Jiang
e8af73aff6 fix notary test error 2017-03-15 19:50:37 +08:00
Tan Jiang
ef906c96d0 provide systeminfo API for UI 2017-03-10 18:53:11 +08:00
Tan Jiang
42bc430cfd update swagger, fix minor issues in test 2017-03-08 13:57:34 +08:00
Tan Jiang
8ec94a6d0a fix golint issue 2017-03-07 19:34:02 +08:00
Tan Jiang
d983982d19 provide api to fetch repository's signature information from Harbor's nested notary intance 2017-03-07 19:14:00 +08:00
Daniel Jiang
b16a8843a2 Merge pull request #1512 from ywk253100/1703002_email_ping
Support email ping
2017-03-07 13:06:30 +08:00
Wenkai Yin
dfae869dce add test cases 2017-03-06 18:03:31 +08:00
Daniel Jiang
d5a4e5cc20 Merge pull request #1513 from reasonerjt/token-service-refactory
support generate UI token for notary
2017-03-06 15:59:13 +08:00
Daniel Jiang
c619bb9294 Merge pull request #1490 from ywk253100/170301_config
Read some configs from env when start up
2017-03-06 12:40:21 +08:00
Tan Jiang
109db458c3 support generate UI token for notary 2017-03-06 12:17:22 +08:00
Wenkai Yin
0a80d7fee2 fix bug in sending email 2017-03-03 18:10:28 +08:00
Wenkai Yin
23bf2f0ddf support ping email server 2017-03-03 16:36:13 +08:00
Wenkai Yin
a4cb261df9 read some configs from env 2017-03-02 13:24:41 +08:00
Wenkai Yin
c4606d0383 Merge pull request #1467 from yhua123/dev
add new ldap auth and import user feature
2017-02-27 16:17:14 +08:00
yhua
c48d908515 add new ldap auth and import user feature 2017-02-27 15:13:49 +08:00
Tan Jiang
776c34a0ae fix go vet and golint errors 2017-02-26 22:05:13 +08:00
Wenkai Yin
414e8a8bcf Merge remote-tracking branch 'upstream/dev' into 170224_merge_config
Conflicts:
	make/docker-compose.tpl
	src/ui/service/token/authutils.go
2017-02-24 13:52:19 +08:00
Wenkai Yin
385d76e6f2 Merge remote-tracking branch 'upstream/configuration' into 170214_encryption
Conflicts:
	src/common/utils/registry/auth/tokenauthorizer.go
	src/common/utils/test/adminserver.go
	src/jobservice/replication/transfer.go
	src/ui/api/config.go
2017-02-20 12:21:56 +08:00
Wenkai Yin
390f89ee0a encrypt passwords and secret 2017-02-17 18:23:21 +08:00
Wenkai Yin
2e3174f404 update 2017-02-15 15:28:50 +08:00
Wenkai Yin
06519bb3f2 update 2017-02-13 17:17:46 +08:00
Tan Jiang
1d2970c3c5 Merge branch 'master' into dev 2017-02-10 10:51:20 +08:00
Wenkai Yin
1fbb28ad8c update 2017-02-09 15:25:52 +08:00
Wenkai Yin
f113f4a54f update 2017-02-08 14:58:21 +08:00
Wenkai Yin
dc432d5575 support multiple namespace fix #1217 2017-02-07 13:13:42 +08:00
Wenkai Yin
f1f78a5649 update 2017-01-19 17:56:08 +08:00
Wenkai Yin
b62a958250 configure harbor 2017-01-12 17:15:32 +08:00
Penghao Cen
1e57166962 Remove http timeout option on getting catalog 2016-12-12 20:42:28 +08:00
Wenkai Yin
2e9b59a20a add test case 2016-12-08 15:18:51 +08:00
Wenkai Yin
fb9aa78f75 do not add the authentication header to requests which are not sent to registry 2016-12-07 18:20:25 +08:00
Tan Jiang
3f6301b587 remove timeout for replicating large image 2016-11-30 17:43:04 +08:00
Tan Jiang
c34b2872bc config refactory for common pkg 2016-11-16 13:33:14 +08:00
Phillip Gomez
0dfce1d837 Make mail identity configurable
The identity field parameter passed to smtp.SendMail is now
configurable instead of being hardcoded to 'Mail Config'.

This fixes issue #900
2016-11-06 18:05:46 -08:00
yhua
311cf8da07 change code 20161019 2016-10-21 18:39:10 +08:00