13255: Edits
[arvados.git] / doc / admin / activation.html.textile.liquid
1 ---
2 layout: default
3 navsection: admin
4 title: User activation
5 ...
6
7 {% comment %}
8 Copyright (C) The Arvados Authors. All rights reserved.
9
10 SPDX-License-Identifier: CC-BY-SA-3.0
11 {% endcomment %}
12
13 After completing the authentication process with the SSO server and receiving a new @identity_url@, a new user object is always created.
14
15 h3. Setup
16
17 If @auto_setup_new_users@ is true, as part of creating the new user object, the user is immediately setup with:
18
19 * @can_login@ @permission@ link going (email address → user uuid) which records @identity_url_prefix@ (??? wtf does this mean)
20 * Membership in the "All users" group (can read all users, all users can see new user)
21 * A new git repo and @can_manage@ permission if @auto_setup_new_users_with_repository@ is true
22 * @can_login@ permission to a shell node if @auto_setup_new_users_with_vm_uuid@ is set to the uuid of a vm
23
24 Otherwise, an admin must explicitly call "setup" on the user.
25
26 h3. Activation
27
28 A newly created user is inactive (@is_active@ is false) by default unless @new_users_are_active@.
29
30 An inactive user cannot create or update any object, but can read Arvados objects that the user account has permission to read.  This implies that if @auto_setup_new_users@ is true, an "inactive" user who has been set up may still be able to do things, such as read things shared with "All users", clone and push to the git repository, or login to a vm.  (unless these services check is_active)
31
32 {% comment %}
33 (I believe that when this was originally designed, being able to access git and VM required an ssh key, and an inactive user could not register an ssh key because that required creating a record.  However, it is now possible to authenticate to shell VMs and http+git with just an API token).
34 {% endcomment %}
35
36 At this point, there are two ways a user can become active:
37
38 # An admin can set the @is_active@ field directly.  This runs @setup_on_activate@ which sets up oid_login_perm and group membership, but does not set repo or vm (even if if @auto_setup_new_users_with_repository@ and/or @auto_setup_new_users_with_vm_uuid@ are set).
39 # Calling to the @activate@ method of the users controller.   (see below).
40
41 h3. User agreements
42
43 The @activate@ method of the users controller.  This checks if the user @is_invited@ and whether the user has signed all the clickthrough agreements.
44
45 @is_invited@ is true if any of these are true:
46 * @is_active@ is true
47 * @new_users_are_active@ is true
48 * the user account has a permission link to read the system "all users" group.
49
50 Clickthrough agreements are accessed by getting a listing on the @user_agreements@ endpoint.  This returns a list of collection uuids.  This is executed as a system user, so it bypasses normal read permission checks.
51
52 The available user agreements are represented in the links table as @link_class: signature@ and @name: require@ and (system_user_uuid → uuid of collection containing user agreement text file)
53
54 On workbench, it checks @is_invited@.  If true, it displays the clickthrough agreements which the user can "sign".  If @is_invited@ is false, the user ends up at the "inactive user" page.
55
56 The @user_agreements/sign@ endpoint creates a Link with @link_class: signature@ and @name: click@ and (current user uuid → collection uuid). This is executed as a system user, so it bypasses the restriction that inactive users cannot create objects.
57
58 The @user_agreements/signatures@ endpoint returns the list of Link objects that represent signatures by the current user (created by @sign@).
59
60 h3. User profile
61
62 The user profile is checked by workbench after checking if user agreements need to be signed.  The requirement to fill out the user profile is not enforced by the API server.
63
64 h3. Pre-activated user accounts
65
66 It is possible to create a user account for a user that has not yet logged in.
67
68 # As an admin, create a user object.
69 # Create a link with @link_class: permission@ and @name: can_login@ and (email address → user_uuid) and @properties[identity_url_prefix] = 'xxxxx-tpzed-'@ where 'xxxxx' is the @uuid_prefix@ of the SSO server.
70 # When the user logs in the first time, the email address will be recognized and the user will be associated with the existing user uuid.
71
72 h3. Federated users
73
74 Hmmm?
75
76 h3. Deactivating users
77
78 Setting @is_active@ is not sufficient to lock out a user.  The user can call @activate@ to become active again.  Instead, use @unsetup@:
79
80 * Delete oid_login_perms
81 * Delete git repository permission links
82 * Delete VM login permission links
83 * Remove from "All users" group
84 * Delete any "signatures"
85 * Clear preferences / profile
86 * Mark as inactive
87
88 {% comment %}
89 Does not revoke @is_admin@ though!  Maybe we need to fix that?
90
91 Does not prevent user from reading things.
92
93 Does not revoke API tokens.
94 {% endcomment %}
95
96 h3. Activation flows
97
98 h4. Open instance
99
100 Policy: anybody who shows up and signs the agreements is activated.
101
102 <pre>
103 auto_setup_new_users: true
104 new_users_are_active: false
105 </pre>
106
107 # User is created and auto-setup.  At this point, @is_active@ is false, but user has been added to "All users" group.
108 # Workbench checks @is_invited@ and finds it is true, because the user is a member of "All users" group.
109 # Workbench presents user with list of user agreements, user reads and clicks "sign" for each one.
110 # Workbench tries to activate user.
111 # User is activated.
112
113 h4. Private instance
114
115 Policy: users must be manually approved.
116
117 <pre>
118 auto_setup_new_users: false
119 new_users_are_active: false
120 </pre>
121
122 # User is created.  Not set up.  @is_active@ is false.
123 # Workbench checks @is_invited@ and finds it is false.  User gets "inactive user" page.
124 # Admin goes to user page and clicks either "setup user" or manually @is_active@ to true.
125 # Clicking "setup user" sets up the user.  This includes adding the user to "All users" which qualifies the user as @is_invited@.
126 # On refreshing workbench, the user is still inactive, but is able to self-activate after signing clickthrough agreements (if any).
127 # Alternately, directly setting @is_active@ to true also sets up the user, but workbench won't display clickthrough agreements (because the user is already active).
128
129 h4. Developer instance
130
131 Policy: avoid wasting developer's time clicking through extra pages.
132
133 <pre>
134 auto_setup_new_users: true
135 new_users_are_active: true
136 </pre>
137
138 # User is created and auto-setup.  Also sets @is_active@ to true.
139 # User can immediately start using workbench.