Commit Graph

35 Commits

Author SHA1 Message Date
Tan Jiang
d5d913f51d Read Email from UAA while onboarding user.
Will call the userinfo API of UAA to get user info and generage user
model based on the response.  Also this commit include a change that
whenever the UAA Client is to be used it will update the configuraiton,
this is needed as we enable user to update the configuration of UAA via
UI.
2018-01-17 10:28:49 +08:00
Tan Jiang
a392a8dc29 Provide API to rename admin
This is to provide a workaround for very corner case that in user's
authentication backend (LDAP, UAA) has a user called "admin" and because
Harbor's super user is hard coded to "admin" it's not possible to login
the "admin" with credentials in LDAP or UAA.

To minimize the impact, we'll provide an internal API for user to update
the super user's username from "admin" to "admin@harbor.local", this API
can be called by "admin" only, and is not reversible.
2018-01-11 23:01:06 +08:00
stonezdj
26b86984d2 Ambiguous UI and internal values ldap_scope #3764 2018-01-05 15:51:37 +08:00
Daniel Jiang
8e5115c832
Merge pull request #3870 from stonezdj/ldap_syncuser2
Sync user email in ldap #3663
2018-01-04 13:28:51 +08:00
Tan Jiang
e02de2068a Enable configuring the CA Certificate for UAA
Enable configuring the path of root cert of UAA in harbor.cfg.  It only
takes effects if the verify_cert is set to "true" If the file does not
exist, the configuration is skipped.
The intention for this commit is to support integration with nested UAA
in PAS or PKS, we don't expect user to manually configure this value,
though he can do it if he wants.
2018-01-03 16:21:29 +08:00
stonezdj
35716dedd3 Sync user email in ldap #3663 2017-12-26 18:53:32 +08:00
stonezdj
9f99d0400c Call EscapeFilter for filter to avoid security issue 2017-12-26 15:34:14 +08:00
Tan Jiang
da20e4f11c Search UAA when adding member to a project.
1)Enable UAA client to search UAA by calling '/Users' API.
2)Implement 'SearchUser' in UAA auth helper, register it to auth
package.
2017-12-26 00:25:32 +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
Tan Jiang
224f75b9a6 Refactor /users API, add more restircation in password reset
Simplified the code when checking if a user is modiable in different
auth modes.
Also add restriction in password, such that when the auth mode is not DB
auth, only the super user can choose to reset his password.
2017-12-18 14:32:29 +08:00
stonezdj
9393d26fdc Fix ldap ping issue #3653 2017-12-15 14:47:54 +08:00
Tan Jiang
5da894bcf2 Small refactory. 2017-12-13 20:58:27 +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
Daniel Jiang
d13321f2b5
Support getting user info via token in UAA Client (#3686) 2017-11-27 18:13:36 +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
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
689994fa93 return isSystem when using ldap 2017-08-09 18:02:55 +08:00
Daniel Jiang
4f66279c33 Fail authentication when username is empty (#2300) (#2303) 2017-05-15 14:35:38 -07:00
Tan Jiang
7487095dd8 handle unexpected error in ldap search 2017-05-03 18:54:41 +08:00
Tan Jiang
2f6dd6f102 do not return error when ldap bind failed 2017-04-26 16:29:00 +08:00
Tan Jiang
e17526a495 fix ldap issue 2017-04-25 16:33:01 +08:00
wy65701436
53f7cfb967 replace go header 2017-04-13 03:54:58 -07:00
Wenkai Yin
b99ae2496d shorten message 2017-03-30 18:53:39 +08:00
Wenkai Yin
ec27e2dc07 remove compress js flag 2017-03-30 12:59:47 +08:00
Wenkai Yin
67612aa2e3 abstract adminserver client into a single package 2017-03-21 01:00:26 +08:00
yhua
c48d908515 add new ldap auth and import user feature 2017-02-27 15:13:49 +08:00
Wenkai Yin
f113f4a54f update 2017-02-08 14:58:21 +08:00
Wenkai Yin
75f660fa77 Merge remote-tracking branch 'upstream/dev' into 161228_config
Conflicts:
	make/common/templates/ui/env
	src/ui/auth/ldap/ldap.go
	src/ui/config/config.go
2017-01-12 17:41:14 +08:00
Wenkai Yin
b62a958250 configure harbor 2017-01-12 17:15:32 +08:00
Ricardo Katz
160e22f0fe Changes LDAP Library and other LDAP improvements (#1277)
* Changes LDAP library to go-ldap and creates new ldap timeout directive

* Add support for connection on LDAP using TLS
2016-12-30 16:03:30 +08:00
Tan Jiang
9d7a18a0a3 fix issue in golint, support project creation restriction at backend 2016-11-16 20:31:04 +08:00
Tan Jiang
0e3cb2e3f4 ui config refactory 2016-11-16 13:33:14 +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