20123: Add hints about OpenID Connect configuration.
[arvados.git] / doc / install / setup-login.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Set up web based login
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 Select one of the following login mechanisms for your cluster.
13
14 # If all users will authenticate with Google, "configure Google login":#google.
15 # If all users will authenticate with an OpenID Connect provider (other than Google), "configure OpenID Connect":#oidc.
16 # If all users will authenticate with an existing LDAP service, "configure LDAP":#ldap.
17 # If all users will authenticate using PAM as configured on your controller node, "configure PAM":#pam.
18
19 h2(#google). Google login
20
21 With this configuration, users will sign in with their Google accounts.
22
23 Use the <a href="https://console.developers.google.com" target="_blank">Google Developers Console</a> to create a set of client credentials.
24 # Select or create a project.
25 # Click *+ Enable APIs and Services*.
26 #* Search for *People API* and click *Enable API*.
27 #* Navigate back to the main "APIs & Services" page.
28 # On the sidebar, click *OAuth consent screen*.
29 #* On consent screen settings, enter your identifying details.
30 #* Under *Authorized domains* add your domain (@example.com@).
31 #* Click *Save*.
32 # On the sidebar, click *Credentials*, then click *Create credentials*&rarr;*OAuth client ID*
33 # Under *Application type* select *Web application*.
34 # Add the JavaScript origin: @https://ClusterID.example.com/@
35 # Add the Redirect URI: @https://ClusterID.example.com/login@
36 # Copy the values of *Client ID* and *Client secret* to the @Login.Google@ section of @config.yml@.
37
38 {% codeblock as yaml %}
39     Login:
40       Google:
41         Enable: true
42         ClientID: "0000000000000-zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.apps.googleusercontent.com"
43         ClientSecret: "zzzzzzzzzzzzzzzzzzzzzzzz"
44 {% endcodeblock %}
45
46 h2(#oidc). OpenID Connect
47
48 With this configuration, users will sign in with a third-party OpenID Connect provider such as GitHub, Auth0, Okta, or PingFederate.
49
50 Similar to the Google login section above, you will need to register your Arvados cluster with the provider as an application (relying party). When asked for a redirect URL or callback URL, use @https://ClusterID.example.com/login@ (the external URL of your controller service, plus @/login@).
51
52 The provider will supply an issuer URL, client ID, and client secret. Add these to your Arvados configuration.
53
54 {% codeblock as yaml %}
55     Login:
56       OpenIDConnect:
57         Enable: true
58         Issuer: https://accounts.example.com/
59         ClientID: "0123456789abcdef"
60         ClientSecret: "zzzzzzzzzzzzzzzzzzzzzzzz"
61 {% endcodeblock %}
62
63 Arvados can also be configured to accept provider-issued access tokens as Arvados API tokens. This can be useful for integrating third party applications.
64
65 Check the OpenIDConnect section in the "default config file":{{site.baseurl}}/admin/config.html for more details and configuration options.
66
67 h2(#ldap). LDAP
68
69 With this configuration, authentication uses an external LDAP service like OpenLDAP or Active Directory.
70
71 Enable LDAP authentication and provide your LDAP server's host, port, and credentials (if needed to search the directory) in @config.yml@:
72
73 {% codeblock as yaml %}
74     Login:
75       LDAP:
76         Enable: true
77         URL: ldap://ldap.example.com:389
78         SearchBindUser: cn=lookupuser,dc=example,dc=com
79         SearchBindPassword: xxxxxxxx
80         SearchBase: ou=Users,dc=example,dc=com
81 {% endcodeblock %}
82
83 The email address reported by LDAP will be used as primary key for Arvados accounts. This means *users must not be able to edit their own email addresses* in the directory.
84
85 Additional configuration settings are available:
86 * @StartTLS@ is enabled by default.
87 * @StripDomain@ and @AppendDomain@ modify the username entered by the user before searching for it in the directory.
88 * @SearchAttribute@ (default @uid@) is the LDAP attribute used when searching for usernames.
89 * @SearchFilters@ accepts LDAP filter expressions to control which users can log in.
90
91 Check the LDAP section in the "default config file":{{site.baseurl}}/admin/config.html for more details and configuration options.
92
93 h2(#pam). PAM
94
95 With this configuration, authentication is done according to the Linux PAM ("Pluggable Authentication Modules") configuration on your controller host.
96
97 Enable PAM authentication in @config.yml@:
98
99 {% codeblock as yaml %}
100     Login:
101       PAM:
102         Enable: true
103 {% endcodeblock %}
104
105 Check the "default config file":{{site.baseurl}}/admin/config.html for more PAM configuration options.
106
107 The default PAM configuration on most Linux systems uses the local user/password database in @/etc/passwd@ and @/etc/shadow@ for all logins. In this case, in order to log in to Arvados, users must have a UNIX account and password on the controller host itself. This can be convenient for a single-user or test cluster. Configuring a user account with a shell of @/bin/false@ will enable the user to log into Arvados but not log into shell login on the controller host.
108
109 PAM can also be configured to use other authentication systems such such as NIS or Kerberos. In a production environment, PAM configuration should use the service name ("arvados" by default) and set a separate policy for Arvados login.  In this case, Arvados users should not have shell accounts on the controller node.
110
111 For information about configuring PAM, refer to the "PAM System Administrator's Guide":http://www.linux-pam.org/Linux-PAM-html/Linux-PAM_SAG.html.