Skip to content

Commit 7e22045

Browse files
joshtrichardssusnux
authored andcommitted
refactor(admin): 2FA chapter clean-up
- Document the three bundled (shipped) 2FA providers. - Clarify what "providers" are and why they're important. - Re-order the sections. - Remove some outdated bits. - Eliminate some redundancies. - Misc tidying up. Signed-off-by: Josh <[email protected]>
1 parent df41c3e commit 7e22045

File tree

1 file changed

+47
-29
lines changed

1 file changed

+47
-29
lines changed

admin_manual/configuration_user/two_factor-auth.rst

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,64 @@ Two-factor authentication
55
=========================
66

77
Two-factor authentication adds an additional layer of security to user accounts. In order to log
8-
in on an account with two-factor authentication (2FA) enabled, it is necessary to provide both the
9-
login password and another factor. 2FA in Nextcloud is pluggable, meaning that they are not part
10-
of the Nextcloud Server component but provided by featured and 3rd-party Nextcloud apps.
8+
in on an account when two-factor authentication (2FA) enabled, it is necessary to provide both the
9+
login password and another factor.
1110

11+
To use 2FA two things must happen:
1212

13-
Several 2FA apps are already available including
14-
`TOTP <https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm>`_,
15-
a Telegram/Signal/SMS gateway and `U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_.
13+
- At least one 2FA provider must be enabled by the administrator.
14+
- A user must activate 2FA on their account (or) the administrator must enforce the use of 2FA.
1615

17-
18-
Developers can `build new two-factor provider apps <https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/two-factor-provider.html>`_.
19-
20-
.. TODO ON RELEASE: Update version number above on release
16+
Both steps are described below.
2117

2218
Enabling two-factor authentication
2319
----------------------------------
2420

25-
You can enable 2FA by installing and enabling a 2FA app like TOTP which works
26-
with Google Authenticator and compatible apps. The apps are available in the
27-
Nextcloud App store so by navigating there and clicking **enable** for the app
28-
you want, 2FA will be installed and enabled on your Nextcloud server.
21+
2FA in Nextcloud is pluggable, meaning that various 2FA providers can be used to support different
22+
types of factors. Three providers are automatically installed (but may need to be enabled):
2923

30-
.. figure:: ../images/2fa-app-install.png
24+
**Two-Factor TOTP Provider**
3125

32-
Once 2FA has been enabled, users have to `activate it in their personal settings. <https://docs.nextcloud.com/server/latest/user_manual/en/user_2fa.html>`_
26+
- A 2FA factor provider that enables the use of a `TOTP <https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm>`_
27+
(RFC 6238) app installed on a phone (or other device) to be used as the secondary factor
28+
- Compatible with any RFC 6238 compliant TOTP client app (such as `Aegis <https://github.com/beemdevelopment/aegis>`_ or Google Authenticator).
29+
- Disabled by default. Go to *Apps->Disabled apps* and find *Two-Factor TOTP Provider* to enable this factor.
3330

34-
.. TODO ON RELEASE: Update version number above on release
31+
**Two-Factor Authentication via Nextcloud notifications**
3532

36-
Disabling two-factor authentication
37-
-----------------------------------
33+
- A 2FA factor provider that enables the use of a logged in device as the secondary factor.
34+
- Disabled by default. Go to *Apps->Disabled apps* and find *Two-Factor Authentication via Nextcloud
35+
notification* to enable this factor.
3836

39-
Two-factor providers can be disabled via :ref:`occ <occ>`::
37+
**Two-Factor Backup Codes**
4038

41-
sudo -u www-data php occ twofactorauth:disable <uid> <provider_id>
39+
- A special 2FA factor provider enables users to generate backup codes provider.
40+
- Facilitates recovery of access if a a 2FA device is unavailable (i.e. gets stolen or is not working).
41+
- Generates ten backup codes (which can, of course, only be use once).
42+
- Always enabled.
4243

43-
User are free to enable this provider again via their personal settings.
44+
Other 2FA providers may be found in the App Store.
4445

45-
.. note:: This operation has to be supported by the provider. If this support is missing, Nextcloud will abort and show an error.
46+
.. TODO ON RELEASE: Update version number above on release
47+
48+
.. figure:: ../images/2fa-app-install.png
49+
50+
Developers can also `implement new two-factor provider
51+
apps <https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/two-factor-provider.html>`_.
52+
53+
.. TODO ON RELEASE: Update version number above on release
4654
4755
Enforcing two-factor authentication
4856
-----------------------------------
4957

5058
By default 2FA is *optional*, hence users are given the choice whether to enable
51-
it for their account. Admins may enforce the use of 2FA.
52-
53-
54-
Enforcement is possible system-wide (all users), for selected groups only and can
55-
also be excluded for certain groups.
59+
it for their account `under their personal settings <https://docs.nextcloud.com/server/latest/user_manual/en/user_2fa.html>`_.
60+
Admins may, however, enforce the use of 2FA.
5661

62+
Enforcement is possible system-wide (all users) or for selected groups only. Select groups
63+
can also be excluded from 2FA requirements.
5764

58-
These settings can be found in the administrator's security settings.
65+
These settings can be found under *Administration Settings->Security*.
5966

6067
.. figure:: ../images/2fa-admin-settings.png
6168

@@ -76,3 +83,14 @@ The associations of removed providers can be cleaned up via :ref:`occ <occ>`::
7683
sudo -u www-data php occ twofactorauth:cleanup <provider_id>
7784

7885
.. warning:: This operation is irreversible. Only run it for providers you do not intend to enable again.
86+
87+
Disabling two-factor authentication
88+
-----------------------------------
89+
90+
Two-factor providers can be disabled via :ref:`occ <occ>`::
91+
92+
sudo -u www-data php occ twofactorauth:disable <uid> <provider_id>
93+
94+
User are free to enable this provider again via their personal settings.
95+
96+
.. note:: This operation has to be supported by the provider. If this support is missing, Nextcloud will abort and show an error.

0 commit comments

Comments
 (0)