|
5 | 5 | :toc: macro
|
6 | 6 | :toc-title:
|
7 | 7 |
|
8 |
| -This document describes how to enable, configure, and test CircleCI to authenticate users with OpenLDAP or Active Directory credentials. |
9 |
| - |
10 |
| -NOTE: LDAP is not supported with existing installations, only clean installations may use LDAP. |
| 8 | +This document describes the various ways users of your CircleCI Server installation can get access and authenticate their accounts. Currently OAuth and LDAP are supported as authentication methods. |
11 | 9 |
|
12 | 10 | toc::[]
|
13 | 11 |
|
14 |
| -== Prerequisites |
| 12 | +== OAuth with Github/GHE |
| 13 | + |
| 14 | +The default method for user account authentication in CircleCI Server is through GitHub.com/GitHub Enterprise OAuth. |
| 15 | + |
| 16 | +Once your installation is up and running, you can simply provide users with a link to access the application - for example `<your-circleci-hostname>.com` – and from there they will be prompted to set up an account by running through the GitHub/GitHub Enterprise OAuth flow and then redirected to the CircleCI login screen. |
| 17 | + |
| 18 | +.CircleCI Server Login Screen |
| 19 | +image::server_login.png[Server Login] |
| 20 | + |
| 21 | +== LDAP |
| 22 | +As an alternative to the OAuth/GitHub option described above, you can choose LDAP authentication. This section describes how to enable, configure, and test CircleCI to authenticate users with OpenLDAP or Active Directory credentials. |
| 23 | + |
| 24 | +CAUTION: Enabling LDAP will mean it is the **only** way for users to authenticate their account for your installation. Turning on LDAP Authentication is **not recommended for existing installations that previously had users authenticating with GitHub**. Please contact your account team if you need to switch to LDAP for an existing installation. |
| 25 | + |
| 26 | +=== Prerequisites |
| 27 | + |
| 28 | +* Install and configure your OpenLDAP server or Active Directory. |
| 29 | +* GitHub Enterprise or GitHub.com must be configured and be the source of organizations and projects to which users have access. |
| 30 | +* Install a new instance of CircleCI Server with no existing users. |
| 31 | + |
| 32 | +NOTE: After setting up LDAP, all users must log in to CircleCI with their LDAP credentials. After logging in, each user will then click the Connect button on the Accounts page to connect and authenticate their GitHub account. |
15 | 33 |
|
16 |
| -* Install and configure your LDAP server and Active Directory. |
17 |
| -* GitHub Enterprise must be configured and is the source of organizations and projects to which users have access. |
18 |
| -* Install a new instance of CircleCI 2.0 with no existing users. |
19 |
| -* Contact https://support.circleci.com[CircleCI support] and file a feature request for CircleCI Server. |
20 |
| -// still required? |
| 34 | +=== Configure LDAP Authentication |
21 | 35 |
|
22 |
| -NOTE: After completing this configuration, all users must log in to CircleCI with their LDAP credentials. After logging in to CircleCI, each user will then click the Connect button on the Accounts page to connect and authenticate their GitHub account. |
| 36 | +Below is an example configuration to give an idea of the information types required. The example shows OpenLDAP in use but settings will be comparable to what is required when using Active Directory: |
23 | 37 |
|
24 |
| -== Configure LDAP Authentication |
| 38 | +.LDAP Config Example |
| 39 | +image::LDAP_example.png[LDAP Example] |
25 | 40 |
|
26 | 41 | This section provides the steps to configure LDAP in the CircleCI Server Management Console:
|
27 | 42 |
|
28 | 43 | . Verify access over the LDAP/AD ports to your LDAP/AD servers.
|
29 |
| -. Log in as administrator to the Management Console for your newly installed CircleCI 2.0 instance. |
30 |
| -. Navigate to the Settings page and check the Enable LDAP-only Authentication button. Select either OpenLDAP or Active Directory. |
31 |
| -+ |
32 |
| -.Enable LDAP |
33 |
| -image::LDAP.png[Enable LDAP] |
| 44 | +. Log in as administrator to the Management Console for your newly installed CircleCI instance. |
| 45 | +. Navigate to the Settings page (for example `<your-circleci-hostname>.com:8800`) and scroll down to check the Enable LDAP-only Authentication button. Select either OpenLDAP or Active Directory. |
34 | 46 | . Fill in your LDAP instance Hostname and port number.
|
35 | 47 | . Select the encryption type (plain text is not recommended).
|
36 |
| -. Fill in the Search user field with the LDAP admin username using the format `cn=<admin>,dc=<example>,dc=<org>` replacing `admin`, `example`, and `org` with appropriate values for your datacenter. |
37 |
| -. Fill in the Search password field with the LDAP admin password. |
38 |
| -. Fill in the User search DN field with an approrpiate value using the format `ou=<users>` replacing `users` with the value used in your LDAP instance. |
39 |
| -. Fill in the Username field with an approriate unique identifier used for your users, for example, `mail`. |
40 |
| -. Fill in the Group Membership field with an appropriate value. By default, the value is `uniqueMember` for OpenLDAP and `member` for Active Directory. This field will list member `dn` for a group. |
41 |
| -. Fill in the Group Object Class field with an approrpiate value. By default, the value is `groupOfUniqueNames` for OpenLDAP and `group` for Active Directory. The value of the `objectClass` field indicates a `dn` is a group. |
42 |
| -. (Optional) Fill in the Test username and Test password fields with a test email and password for an LDAP user you want to test. |
| 48 | +. Fill in the Search user field with the Fully Distinguished Name for a user who is authorized to perform search queries over a LDAP database. Example: `cn=<admin>,dc=<example>,dc=<org>`. |
| 49 | +. Fill in the Search password field with the LDAP password for a user from the previous step. |
| 50 | +. Fill in the Base DN field with a Distinguished Name for a point in the directory from where CircleCI will be looking for users/groups. Example: `ou=company,dc=example,dc=org` |
| 51 | +. Fill in the User search DN field with a Relative Distinguished Name for a point in a directory where CircleCI will find users. Should be relative to the Base DN provided above. Example: `ou=users`. |
| 52 | +. Fill in the Username field with a name of an attribute that will be used as a source of usernames for Logging In. Example: `uid` (in this case users will have to use their UID for logging in) or `mail` (in this case users will be using emails for logging in). |
| 53 | +. Fill in the Email field with the name of an attribute that will be used as a source of a user email. Example: `mail` |
| 54 | +. Fill in the Group Membership field with a name of an attribute that will be used for user membership in a particular group. Example: `uniqueMember`. |
| 55 | +. Fill in the Group Object Class field with a name of an Object Class that will identify DN as a group. Example: `groupOfUniqueNames` |
| 56 | +. (Optional) Fill in the Test username and Test password fields with a test email and password for an LDAP user you want to test - this is a 3rd party infrastructure and this test option is not always reliable. |
43 | 57 | . Save the settings.
|
44 | 58 |
|
45 | 59 | A user who logs in will be redirected to the Accounts page of the CircleCI application with a Connect button that they must use to connect their GitHub account. After they click Connect, an LDAP section with their user information (for example, their email) on the page will appear and they will be directed to authenticate their GitHub account. After authenticating their GitHub account users are directed to the **Job page** to use CircleCI.
|
46 | 60 |
|
47 | 61 | NOTE: A user who has authenticated with LDAP and is then removed from LDAP/AD will be able to access CircleCI as long as they stay logged in (because of cookies). As soon as the user logs out or the cookie expires, they will not be able to log back in. A users' ability to see projects or to run builds is defined by their GitHub permissions. Therefore, if GitHub permissions are synced with LDAP/AD permissions, a removed LDAP/AD user will automatically lose authorization to view or access CircleCI as well.
|
48 | 62 |
|
49 |
| -== Troubleshooting |
| 63 | +=== Troubleshooting |
50 | 64 |
|
51 | 65 | Troubleshoot LDAP server settings with LDAP search as follows:
|
52 | 66 |
|
|
0 commit comments