Verwendung der Zwei-Faktor-Authentifizierung
Die Zwei-Faktor-Authentifizierung (2FA) ist eine Möglichkeit, Ihr Nextcloud-Konto vor unberechtigtem Zugriff zu schützen. Sie funktioniert, indem zwei verschiedene ‚Beweise‘ Ihrer Identität erforderlich sind. Zum Beispiel etwas, das Sie wissen (wie ein Passwort) und etwas, das Sie haben wie einen physischen Schlüssel. Typischerweise ist der erste Faktor ein Passwort, wie Sie es bereits haben, und der zweite kann eine Textnachricht sein, die Sie erhalten oder ein Code, den Sie auf Ihrem Telefon oder einem anderen Gerät generieren (etwas, das Sie haben). Nextcloud unterstützt eine Vielzahl von 2. Faktoren und weitere können hinzugefügt werden.
Once a two-factor authentication app has been enabled by your administrator, you can enable and configure it in Einstellungen vornehmen.
Einrichtung der Zwei-Faktor Authentifizierung
In your personal settings, look up the Second-factor Auth setting. In this example this is TOTP, a Google Authenticator compatible time-based code:
Sie sehen Ihr Geheimnis und einen QR-Code, der von der TOTP-App auf Ihrem Smartphone (oder einem anderen Gerät) gescannt werden kann. Je nach App oder Tool geben Sie den Code ein oder scannen den QR-Code und Ihr Gerät zeigt einen Anmeldecode an, der sich alle 30 Sekunden ändert.
Recovery codes if you lose your second factor
You should always generate backup codes for 2FA. If your second factor device gets stolen or stops working, you can use one of these codes to unlock your account. It effectively functions as a backup second factor. To get the backup codes, go to your personal settings and look under Second-factor Auth settings. Choose Generate backup codes:
You will then see a list of one-time-use backup codes:
Store these codes somewhere safe where you can find them. Do not keep them with your second factor (such as your mobile phone), but store them separately so that losing one does not mean losing the other.
Anmelden mit der Zwei-Faktor Authentifizierung
After you log out and log in again, you will see a prompt to enter the TOTP code in your browser. If you have enabled more than one second factor, you will see a selection screen where you can choose which method to use for this login. Select TOTP:
Jetzt geben Sie einfach Ihren Code ein:
Wenn der Code korrekt war, werden Sie zu Ihrem Nextcloud-Konto weitergeleitet.
Bemerkung
Since the code is time-based, it is important that your server’s and your smartphone’s clock are almost in sync. A time drift of a few seconds won’t be a problem.
Verwendung der Zwei-Faktor-Authentifizierung mit Hardware-Schlüsseln
Sie können die Zwei-Faktor-Authentifizierung basierend auf Hardware-Tokens verwenden. Bezüglich folgender Geräte wurde die Kompatibilität mit Nextcloud bestätigt:
TOTP-basiert:
FIDO basiert:
Verwenden von Clientanwendungen mit Zwei-Faktor-Authentifizierung
Once you have enabled 2FA, your clients will no longer be able to connect with just your password unless they also have support for two-factor authentication. To solve this, you should generate device-specific passwords for them. See Verwaltung verbundener Browser und Geräte for more information on how to do this.
Überlegungen
If you use WebAuthn to log in to your Nextcloud, be sure to not use the same token for 2FA, as this would mean you are again only using a single factor.