Our Kerberos implementation supports three forms of two-factor authentication: TOTP, HOTP, and Yubikey. In addition, Google authenticator can be used, as in the past.
TOTP and HOTP both work with an application on your phone or other device. The application displays a 6-digit number, which you need to add at the end of your password to login.
TOTP and HOTP use slightly different algorithms. TOTP is based on the time. The same code works for about 30 sec. HOTP is based on count. That is, the next number applies no matter when you use it. That means you can generate numbers from HOTP and keep them in your wallet. With TOTP you need your phone with you to login.
There are things to think about before using two-factor authentication. See the section at the end.
For more detailed documentation, see the Redhat one-time password documentation.
Enabling Two-factor Authentication
Two-factor authentication uses "tokens." For TOTP and HOTP, a token is simply an item that shows in your mobile app. The same mobile app can have tokens for many different systems. You can also have more than one token for a system, e.g. one for TOTP and one for HOTP.
To enable two-factor authentication, log into one of our systems. To add a TOTP token, type
ipa otptoken-addThis command will display a QR code. In the phone app, hit the QR icon and use the camera to scan the QR code displayed. This uses TOTP. To add a HOTP token, use
ipa otptoken-add --type=hotp
Yubikey is a physical device that you carry with you and plug into a USB port. If you have a Yubikey, you can use it with our system. Insert your key, and then type the command
If you use Yubikey, we recommend also using the other type of OTP, since Yubikey won't let you ssh from a non-CS system such as your home computer.
Mobile Device Clients
Clients for TOTP and HOTP are available for many devices. For IOS and Android, look for "FreeOTP" in the appropriate app store. The ipa otptoken-add command will display a QR code, which you scan with the phone application to configure it.
Because the TOTP and HOTP standards are also used by Google authenticator, you can also use a Google authenticator implementation on your device. For devices other than IOS and Android, we recommend looking for a Google authenticator implementation.
USING THE CLIENT
FreeOTP on your mobile device will display a 6-digit code. To login, type your normal password, adding the 6 digits to the end.
If you're worried about forgetting or losing your phone, one approach is to add both HOTP and TOTP. Generate several keys using HOTP and keep them in your wallet. Then use TOTP for normal use. If you lose your phone, you can login with the keys from your wallet until you can replace it or remove two-factor authentication. (Use "ipa otptoken-find" to list your tokens, and "ipa otptoken-del UNIQUEID" to remove one.)
You can also set up two-factor on more than one portable device, e.g. your phone and a tablet.
Two-factor authentication is inconsistent with Kerberos key tables. Cron support via kgetcred now works. Generally anyplace you could use a key table you should be able to use kgetcred instead.