If you are here for the first time, you probably want to setup your first 2nd factor. To start, we suggest you go with the PUSH token or a TOTP token. You find detailed instruction how to set them up below.
If you feel completely overwhelmed and/or do not understand a word, we suggest to to dive in first with enrolling a PUSH or a TOTP token (scroll down for the step-by-step guides) and read then read the rest of this document afterwards. Chances are good, that things are much clearer then :)
The main goal of 2-factor authentication (2FA) is to mitigate the impact of successful phishing and malware attacks, whereby attackers might get hold of your if credentials (username + password). Without 2FA, such an attacker could use IfI account credentials to impersonate you, read/delete all your data, etc. With 2FA, there is a second line of defense, namely the 2nd factor which needs to be entered (besides username + password), which is much more difficult to obtain for a remote attacker.
2-factor authentication (2FA) and single sign-on (SSO)
When loggin in to services that are 2FA-enabled you will be redirected to our keycloak server ⇒ kc.ifi.uzh.ch.
Here you enter your IfI credentials and the 2nd factor. Before logging in, please double-check the URL. If you have any suspicions that you are not on the correct page for logging in, please do not enter your passwors / 2nd factor and let us know.
Check the screenshot (to the right) to see how the SSO login on the keycloak server looks like.
With the above goal in mind, we suggest the following best practices:
| Token type | Application / Hardware Token | Devices | Security notes (see also Best Practices) |
|---|---|---|---|
| PUSH | PrivacyIDEA authenticator | mobile phone | enable locking |
| OTP | PrivacyIDEA / MS / Google / etc. authenticator | mobile phone / laptop | enable locking |
| Passkey | stored on Yubikey | yubikey | enable PIN |
| Passkey | stored in your password manager | mobile phone / laptop | enable locking |
| yubico OTP | stored on Yubikey | yubikey | remove Yubikey / Yubikey with fingerprint |
Notes:
The PrivacyIDEA Authenticator is an app for Android or IOS mobile phones. Besides the standard TOTP (6-digit one-time password) token it also provides the PUSH token, which is a very unobtrusive way to provide the 2nd factor. You only need to confirm the login on your phone and authenticate that with your fiingerprint.
To setup the PUSH token, do the following:
Your PUSH token is now ready to be used.
We strongly recommend to protect/lock your tokens in the PrivacyIDEA Authenticator app. To do so, swipe right on the token and choose lock.
This is a very common token type which you most probably already use somewhere. You can use it with any Authenticator App, such as Microsoft Authenticator, Google Authenticator, FreeOTP, etc. If you use or plan to use the PUSH token (see above), you can use the PrivacyIDEA Authenticator App.
For all Authenticator apps the procedure is basically the same:
Your TOTP token is now ready to be used.
We strongly recommend to protect/lock your tokens in the PrivacyIDEA Authenticator app. To do so, swipe right on the token and choose lock. If you use another Authenticator app, please also make sure that is used some kind of authentication (fingerprint) before usage.
Please check also the official website and setup guide. You can store various kinds of tokens on the Yubikey. We decribe Passkeys and Yubikey OTP tokens here. To work with the yubikey, you will need the Yubico Authenticator, are available at the yubico website.
You can work with passkeys in several ways. One possibility is to store them on the Yubikey, which is much better than to store them in your password manager (or any other software client) on your laptop.
Your passkey is now ready to be used a 2nd factor.
You can configure the YubiKey to generate an one-time password (OTP) when simply pressing the button of the yubikey, and you can use this as a 2nd factor.
Your token is now ready to be used a 2nd factor. When asked for it, place the cursor in the field where you need to enter the 2nd factor and press the button on the YubiKey.
If you plan to leave the Yubikey plugged into your laptop, this token is not safe, since it can be issued simply by touch, and does not need a pin, fingerprint or any other form of authentication. Thus if someone gets hold of your laptop, that someone also has access to your 2nd factor. To be safe, use a Yubkey with fingerprint sensor (see also Overview).
We enforce 2FA also for SSH and sudo. For technical reasons, it is not possible authenticate over keycloak and therefore there is no single sign-on (SSO) for SSH and sudo. This means, that you will have to present your 2nd factor each time you login (SSH) or use sudo. When using SSH and sudo a lot, this can become painful, so there are two mechanisms in place to mitigate this situation a bit:
Always protect your ssh (private) key with a passphrase. Never use a ssh keys with an empty passphrase, as everybody that gets hold on your keys could use them.
Of course you want to avoid typing the passphrase each time you login. you can do that using ssh-agent. Here, you can unlock your (private) key once you login to your laptop/desktop and use it without passphrase (until you logout or shutdown your laptop/desktop).
To setup key-based authentication and use the ssh-agent, please check the following tutorials (if necessary):
The second tutorial also explains how to use the ssh-agent.