This document describes how yubikey authentication works
Owner: Fedora Infrastructure Team
Contact: #fedora-admin, sysadmin-main
Servers: fas*, db02
Purpose: Provides yubikey authentication in Fedora
Generated from fas, the /etc/yubikeyid works like a authroized_keys file and maps valid keys to users. It is downloaded from FAS:
Yubikey authentication takes place in 3 basic phases.
- User presses yubikey which generates a one time password
- The one time password makes its way to the yk-val application which verifies it is not a replay
- yk-val passes that otp on to the yk-ksm application which verifies the key itself is a valid key
If all of those steps succeed, the ykval application sends back an OK and authentication is considered successful. The two applications are defined below, if either of them is unavailable, yubikey authentication will fail.
The database contains 3 tables. clients: just a valid client. These are not users, these are systems able to authenticate against ykval. In our case Fedora is the only client so there's just one entry here queue: Used for distributed setups (we don't do this) yubikeys: maps which yubikey belongs to which user
ykval is installed on fas* and is located at: http://localhost/yk-val/verify
Purpose: Is to map keys to users and protect against replay attacks
The database contains one table: yubikeys: maps who created keys, what key was created, when, and the public name and serial number, whether its active, etc.
ykksm is installed on fas* at http://localhost/yk-ksm
Purpose: verify if a key is a valid known key or not. Nothing contacts this service directly except for ykval. This should be considered the “high security” portion of the system as access to this table would allow users to make their own yubikeys.
Physical Yubikey info
The actual yubikey contains information to generate a one time password. The important bits to know are the begining of the otp contains the identifier of the key (used similar to how ssh uses authorized_keys) and note the rest of it contains lots of bits of information, including a serial incremental.
Sample key: ccccfcdaivjrvdhvzfljbbievftnvncljhibkulrftt
Breaking this up, the first 12 characters are the identifier. This can be considered 'public'
The second half is the otp part.
Fas integration has two main parts. First is key generation, the next is activation. The fas-plugin-yubikey contains the bits for both, and verification. Users call on this page to generate the key info:
The fas password field automatically detects whether someone is using a otp or a regular password. It then sends otp requests to yk-val for verification.