jeedee wrote:
Simple question - can you only configure slot 1 to work with YubiCloud, or could you use both slot 1 and slot 2? Specifically, if I configure slot 2 and upload it, does it overwrite the existing (slot 1) configuration or can I use both slots for YubiCloud authentication?
The two slots are completely separate, you can store two different Yubico OTP credentials each validating against the YubiCloud (or your own self-hosted validation server).
jeedee wrote:
Secondly, I'm currently developing a MFA product and we want to add YubiKey integration. We already have a (PostgreSQL) database and a Java backend that's working with other MFA authentication methods. I've been looking into adding YubiKey support into the mix and I notice that there are a couple of different ways that I can authenticate with the YubiKey. One way is to use YubiCloud. Another option is to deploy my own YubiKey authentication server.
The problem with the server approach is that I can only find a tutorial that runs me through installing the server and the identity manager on Linux, which also includes a MySQL database. I don't need the identity manager or database (we already manage users in a PostgreSQL database in the existing product). I literally just need to validate the YubiKey OTP myself without having to go out to YubiCloud. I can't find an easy way to do that without having to install a lot of stuff that I don't need.
I'm not sure which guide you're referring to, but this is a good starting point:
https://developers.yubico.com/OTP/Guides/Self-hosted_OTP_validation.html. You will need a database for the validation layer for counter data, but you can re-use your existing PostgreSQL DB if you wish, as yubikey-val supports it. The KSM (python-pyhsm) can be used with or without an SQL database.
jeedee wrote:
If I use the Java client (
https://developers.yubico.com/yubico-java-client/), am I right in thinking that that authenticates against YubiCloud? Also, is JAAS integration necessary? Can't I just grab the key and fire it off to YubiCloud for authentication without having to hook into JAAS first?
That library can be used against the YubiCloud, or your own self-hosted instance. The JAAS plugin is a separate module which you would only use if you need JAAS. To just to OTP validation all you need is the v2 client module. The README contains information on using it.
jeedee wrote:
I've also looked into the U2F server (
https://github.com/Yubico/java-u2flib-server) but I'm not clear on whether I'll be able to actually use that. We'll be using a desktop client to prompt the user to authenticate but the U2F server seems to be geared towards using with a browser. Is U2F only available for browsers? I've been trying to read up on U2F but that part isn't particularly clear. Can U2F be used with a desktop client?
While U2F was designed primarily for browser-based usage, it can be used from a desktop client as well. In addition to handling the server aspects of U2F, you will also need to handle the client aspects. We provide some libraries for this:
https://developers.yubico.com/Software_Projects/FIDO_U2F/U2F_Host_Libraries/jeedee wrote:
Apologies again for the stupid questions. There's a lot of information out there and I'm having trouble wrapping my head around it. All I'm after is the easiest way for me to get a user to authenticate using their YubiKey via a desktop client that I'll be writing. If the easiest way is to get them to get a YubiCloud API key and then use the Java client to authenticate, then I'll do that. I'd much prefer to handle the authentication myself without having to go out to YubiCloud but there doesn't seem to be an easy way to do that without having to install a bunch of stuff that I don't need in order to use the server.
There is some complexity of running a self-hosted validation server (credentials will need to be programmed into YubiKeys, those credentials need to be safely transported to the KSM, multiple instances may be needed for redundancy, which introduces sync, etc.), but you do not need to install anything that isn't required. The two parts which are required are the KSM and Validation servers, which the guide I pointed to explains in more detail. If you go with the YubiCloud route, you wouldn't use an API key per user. Rather your users would send the OTP to your backend to validate (presumably together with a username and password), and that backend would then use a single API key to validate the OTP against the YubiCloud.
Hope I've cleared things up!